This commit is contained in:
2026-02-02 16:23:27 +01:00
parent 10aaff4cc8
commit 5b32a402a6
3 changed files with 3 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ class LotMove(ModelSQL,ModelView):
class Lot(metaclass=PoolMeta):
__name__ = 'lot.lot'
line = fields.Many2One('purchase.line',"Purchase")
line = fields.Many2One('purchase.line',"Purchase",ondelete='CASCADE')
move = fields.Function(fields.Many2One('stock.move',"Move"),'get_current_move')
lot_move = fields.One2Many('lot.move','lot',"Move")
invoice_line = fields.Many2One('account.invoice.line',"Purch.Invoice line")

View File

@@ -172,7 +172,7 @@ class Summary(ModelSQL,ModelView):
class Lot(metaclass=PoolMeta):
__name__ = 'lot.lot'
sale_line = fields.Many2One('sale.line',"Sale")
sale_line = fields.Many2One('sale.line',"Sale",ondelete='CASCADE')
lot_quantity_sale = fields.Function(fields.Numeric("Net weight",digits='lot_unit'),'get_qt')
lot_gross_quantity_sale = fields.Function(fields.Numeric("Gross weight",digits='lot_unit'),'get_gross_qt')

View File

@@ -476,7 +476,7 @@ class ShipmentIn(metaclass=PoolMeta):
for m in self.incoming_moves:
if m.lot:
lines.append(
f"Lot nb: {m.lot.lot_number} | "
f"Lot nb: {m.lot.lot_name} | "
f"Net Qt: {m.lot.get_current_quantity()} {m.lot.lot_unit.symbol} | "
f"Gross Qt: {m.lot.get_current_gross_quantity()} {m.lot.lot_unit.symbol}"
)