This commit is contained in:
2026-02-16 19:55:09 +01:00
parent bb313d29bf
commit 0e5c40e9a2

View File

@@ -1287,9 +1287,11 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
if self.payment_term:
payment_date = self.payment_term_date or self.invoice_date or today
model = str(self.lines[0].origin).split(",")[0] if self.lines[0].origin else None
logger.info("MODEL:%s",model)
if model:
Line = Pool().get(model)
line = Line(int(str(self.lines[0].origin).split(",")[1]))
logger.info("LINE:%s",line)
term_lines = self.payment_term.compute(
self.total_amount, self.currency, payment_date, line)
else: