02.02.26
This commit is contained in:
@@ -48,7 +48,7 @@ class LotMove(ModelSQL,ModelView):
|
|||||||
class Lot(metaclass=PoolMeta):
|
class Lot(metaclass=PoolMeta):
|
||||||
__name__ = 'lot.lot'
|
__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')
|
move = fields.Function(fields.Many2One('stock.move',"Move"),'get_current_move')
|
||||||
lot_move = fields.One2Many('lot.move','lot',"Move")
|
lot_move = fields.One2Many('lot.move','lot',"Move")
|
||||||
invoice_line = fields.Many2One('account.invoice.line',"Purch.Invoice line")
|
invoice_line = fields.Many2One('account.invoice.line',"Purch.Invoice line")
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class Summary(ModelSQL,ModelView):
|
|||||||
class Lot(metaclass=PoolMeta):
|
class Lot(metaclass=PoolMeta):
|
||||||
__name__ = 'lot.lot'
|
__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_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')
|
lot_gross_quantity_sale = fields.Function(fields.Numeric("Gross weight",digits='lot_unit'),'get_gross_qt')
|
||||||
|
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ class ShipmentIn(metaclass=PoolMeta):
|
|||||||
for m in self.incoming_moves:
|
for m in self.incoming_moves:
|
||||||
if m.lot:
|
if m.lot:
|
||||||
lines.append(
|
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"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}"
|
f"Gross Qt: {m.lot.get_current_gross_quantity()} {m.lot.lot_unit.symbol}"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user