correct computation of lot relations in account_invoice.py

develop
Andreas Osim 2018-10-25 14:06:01 +02:00
parent f871e94789
commit 60fffbd1e5
1 changed files with 2 additions and 2 deletions

View File

@ -48,6 +48,7 @@ class AccountInvoiceLine(models.Model):
)
lot_formatted_note = fields.Html(
comodel_name='stock.production.lot',
string='Formatted Note',
compute='_compute_line_lots',
)
@ -57,9 +58,8 @@ class AccountInvoiceLine(models.Model):
for line in self:
if not line.order_line_ids:
return
line.prod_lot_ids = self.mapped(
line.prod_lot_ids = line.mapped(
'order_line_ids.move_ids.move_line_ids.lot_id')
print('End')
@api.multi
def _compute_line_lots(self):