Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits: 08662692 by Cédric Krier at 2023-01-09T00:37:15+01:00 Rename check_fifo_quantity_out constraint to check_fifo_quantity Closes #1781 - - - - - 1 changed file: - modules/product_cost_fifo/move.py Changes: ===================================== modules/product_cost_fifo/move.py ===================================== @@ -29,8 +29,8 @@ t = cls.__table__() cls._sql_constraints += [ - ('check_fifo_quantity_out', + ('check_fifo_quantity', Check(t, t.quantity >= t.fifo_quantity), 'product_cost_fifo.msg_move_fifo_quantity_greater'), ] @@ -33,7 +33,16 @@ Check(t, t.quantity >= t.fifo_quantity), 'product_cost_fifo.msg_move_fifo_quantity_greater'), ] + @classmethod + def __register__(cls, module): + table_h = cls.__table_handler__(module) + super().__register__(module) + + # Migration from 6.6: rename check_fifo_quantity_out to + # check_fifo_quantity + table_h.drop_constraint('check_fifo_quantity_out') + @staticmethod def default_fifo_quantity(): return 0.0 View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/086626927118555c18f2c90519ead2de9de1303e -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/086626927118555c18f2c90519ead2de9de1303e You're receiving this email because of your account on foss.heptapod.net.