Skip to content

Conversation

@gfcapalbo
Copy link

The module adds an extra orderline for products that have a deposit product.
These deposit product orderlines are then saved in the backend upon confirmation.

Unfortunately, when loading history, the deposit product orderline , is both loaded from the backend and then re-added with the same logic, resulting in a double deposit product line. We need to distinguish orders loaded from backend from live orders loaded from pos.db.

We have found that the order state is a reliable criteria to stop re-adding the deposit product , and determine it is already coming from the backend. https://github.com/odoo/odoo/blob/16.0/addons/point_of_sale/static/src/js/models.js#L2664

Keeping the connection between the product, and it's added deposit would also be a solution, and stop the addition , but if the user changes the backend in any way (quantity, removing or adding deposit products) this type of sync would force additions customer may not want. We do not want this module to force modifications the user may have overridden.

@legalsylvain
Copy link

I know that order lines looks duplicated, but avoid to duplicate issues also !
Ref : #1448

@thomaspaulb
Copy link

Ah sorry, we felt the original PR got a bit convoluted with all our discussions happening, so we wanted to open a new clean one.

@gfcapalbo gfcapalbo deleted the 16.0-duplicate-container-prd branch November 7, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants