Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16][FIX] base_delivery_carrier_label : qty from operation for any uom #719

Conversation

florian-dacosta
Copy link
Contributor

For stock move, the weight is computed no matter of the uom of the product.
I think there is no point on doing differently for stock.move.line
Also fix uom qty conversion as qty_done and reserved_qty are not necessarly in the same UOM

@hparfr @bealdav

@florian-dacosta florian-dacosta force-pushed the 16-base-delivery-carrier-label-fix-operation-weight branch from ddb58c3 to 260e668 Compare October 10, 2023 11:51
Copy link
Contributor

@hparfr hparfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my memory is a bit rusty on this topic; why removing the test instead of fixing it ?

and operation.product_uom_id._compute_quantity(
operation.qty_done, operation.product_id.uom_id
)
or operation.reserved_qty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the quantity is converted only if it's done ; if it's only reserved there is no convertion ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qty done is meant to be consistent with the uom of the stock move (it should named uom_qty_done actually) while reserved_qty consistent with the uom of the product. (reserved_uom_qty exists and is consistent with the uom of the stock move).

@florian-dacosta
Copy link
Contributor Author

my memory is a bit rusty on this topic; why removing the test instead of fixing it ?

Because the test was testing something that does not seem to be the right behavior, so there is nothing to fix IMO.

If the uom of the product is the cm and the weight is 1, it means the wieght of the product is 1kg per cm, no?
The only case where we can have an inconsistency is if the uom of the product is of the weight type. We could have a product with uom the gram but its weight beeing 10 gram for instance, but this is a confiuration issue/inconsistency, not sure we really need to solve this here (Odoo does not on the stock move weight).

@florian-dacosta florian-dacosta force-pushed the 16-base-delivery-carrier-label-fix-operation-weight branch from 260e668 to eb81591 Compare January 31, 2024 12:06
Copy link

github-actions bot commented Jun 2, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 2, 2024
@github-actions github-actions bot closed this Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants