This commit is contained in:
2026-04-28 11:27:35 +02:00
parent 98893647f6
commit 2cdcbe7303
2 changed files with 15 additions and 3 deletions

View File

@@ -181,7 +181,11 @@ class InvoiceLine(metaclass=PoolMeta):
company=self.invoice.company.id, date=accounting_date):
anglo_saxon_move_lines = self._get_anglo_saxon_move_lines(
cost, type_)
if type_ == 'in_supplier' and (self.lot.sale_invoice_line_prov or self.lot.sale_invoice_line) and not self.fee:
lot_has_sale_invoice = (
self.lot
and (self.lot.sale_invoice_line_prov
or self.lot.sale_invoice_line))
if type_ == 'in_supplier' and lot_has_sale_invoice and not self.fee:
anglo_saxon_move_lines_ = self._get_anglo_saxon_move_lines(cost, 'out_customer')
result.extend(anglo_saxon_move_lines)
result.extend(anglo_saxon_move_lines_)