changeset 7ecd287ef609 in modules/stock_lot:6.2 details: https://hg.tryton.org/modules/stock_lot?cmd=changeset&node=7ecd287ef609 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 9b8265a34f42 -r 7ecd287ef609 stock.py --- a/stock.py Mon Nov 01 17:12:15 2021 +0100 +++ b/stock.py Sat Oct 22 00:53:43 2022 +0200 @@ -444,9 +444,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') @@ -456,7 +456,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