changeset ab4571421db3 in modules/stock_lot:6.4
details: https://hg.tryton.org/modules/stock_lot?cmd=changeset&node=ab4571421db3
description:
Rename unit into quantity_unit on add lots wizard
This is to avoid name collision with the stock_lot_unit module.
issue11796
review418381003
(grafted from 292408420b2e63ac5fbd939d2213ff7ab4b9dd91)
diffstat:
stock.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r e09e5d905a7b -r ab4571421db3 stock.py
--- a/stock.py Mon May 02 17:03:14 2022 +0200
+++ b/stock.py Sat Oct 22 00:53:43 2022 +0200
@@ -573,9 +573,9 @@
__name__ = 'stock.move.add.lots.start.lot'
parent = fields.Many2One('stock.move.add.lots.start', "Parent")
- quantity = fields.Float("Quantity", digits='unit', required=True)
- unit = fields.Function(
- fields.Many2One('product.uom', "Unit"), 'on_change_with_unit')
+ quantity = fields.Float("Quantity", digits='quantity_unit', required=True)
+ quantity_unit = fields.Function(
+ fields.Many2One('product.uom', "Unit"), 'on_change_with_quantity_unit')
@fields.depends(
'parent', '_parent_parent.quantity_remaining')
@@ -585,7 +585,7 @@
self.quantity = self.parent.quantity_remaining
@fields.depends('parent', '_parent_parent.unit')
- def on_change_with_unit(self, name=None):
+ def on_change_with_quantity_unit(self, name=None):
if self.parent and self.parent.unit:
return self.parent.unit.id