correct computation of lot relations in account_invoice.py
parent
f871e94789
commit
60fffbd1e5
|
|
@ -48,6 +48,7 @@ class AccountInvoiceLine(models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
lot_formatted_note = fields.Html(
|
lot_formatted_note = fields.Html(
|
||||||
|
comodel_name='stock.production.lot',
|
||||||
string='Formatted Note',
|
string='Formatted Note',
|
||||||
compute='_compute_line_lots',
|
compute='_compute_line_lots',
|
||||||
)
|
)
|
||||||
|
|
@ -57,9 +58,8 @@ class AccountInvoiceLine(models.Model):
|
||||||
for line in self:
|
for line in self:
|
||||||
if not line.order_line_ids:
|
if not line.order_line_ids:
|
||||||
return
|
return
|
||||||
line.prod_lot_ids = self.mapped(
|
line.prod_lot_ids = line.mapped(
|
||||||
'order_line_ids.move_ids.move_line_ids.lot_id')
|
'order_line_ids.move_ids.move_line_ids.lot_id')
|
||||||
print('End')
|
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _compute_line_lots(self):
|
def _compute_line_lots(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue