Skip to content
Snippets Groups Projects
Commit ec5475ee authored by Akim Juillerat's avatar Akim Juillerat
Browse files

[IMP] sale_stock: Check package qty in sale.order.line product_uom_qty onchange


On sale.order.line, the onchange on product_packaging ensures that a warning
is raised when changing the package if the qty on the line is not a multiple
of the package qty.
With this commit, a same warning is raised when changing the qty if the qty
on the line is not a multiple of the package qty.

closes odoo/odoo#78405

X-original-commit: ee9ea35a
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent c4878947
Branches
Tags
No related merge requests found
......@@ -496,6 +496,8 @@ class SaleOrderLine(models.Model):
'message' : _('You are decreasing the ordered quantity! Do not forget to manually update the delivery order if needed.'),
}
return {'warning': warning_mess}
if self.product_packaging:
return self._check_package()
return {}
def _prepare_procurement_values(self, group_id=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment