[FIX] delivery: Fix renaming of field
Fix a forgotten field after a renaming after a forward conflict:
[REF] *{stock,mrp}*: rename reserved fields
This commit rename product_uom_qty into reserved_uom_qty and product_qty
into reserved_qty on stock move line to stop mistake them with the stock
move quantities fields.
Task: 2648449
Part-of: #80434
opw-3225854
closes odoo/odoo#115501
X-original-commit: 022de9edabb9993bfab6dd4e45feed788b7e1c38
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -200,7 +200,7 @@ class DeliveryCarrier(models.Model):
|
||||
def _get_commodities_from_stock_move_lines(self, move_lines):
|
||||
commodities = []
|
||||
for line in move_lines.filtered(lambda line: line.product_id.type in ['product', 'consu']):
|
||||
qty = line.qty_done if line.state == 'done' else line.product_uom_qty
|
||||
qty = line.qty_done if line.state == 'done' else line.reserved_uom_qty
|
||||
unit_quantity = line.product_uom_id._compute_quantity(qty, line.product_id.uom_id)
|
||||
rounded_qty = max(1, float_round(unit_quantity, precision_digits=0))
|
||||
country_of_origin = line.product_id.country_of_origin.code or \
|
||||
|
||||
Reference in New Issue
Block a user