details: https://code.tryton.org/tryton/commit/8e15abd1a20c
branch: default
user: Cédric Krier <[email protected]>
date: Wed Feb 21 15:07:52 2024 +0100
description:
Rename _get_invoice_purchase in _get_invoice on purchase
diffstat:
modules/account_cash_rounding/purchase.py | 4 ++--
modules/purchase/purchase.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r fee96f0f00e8 -r 8e15abd1a20c modules/account_cash_rounding/purchase.py
--- a/modules/account_cash_rounding/purchase.py Wed Feb 21 15:07:05 2024 +0100
+++ b/modules/account_cash_rounding/purchase.py Wed Feb 21 15:07:52 2024 +0100
@@ -72,7 +72,7 @@
amount = sum(map(self.currency.cash_round, amounts))
return amount
- def _get_invoice_purchase(self):
- invoice = super()._get_invoice_purchase()
+ def _get_invoice(self):
+ invoice = super()._get_invoice()
invoice.cash_rounding = self.cash_rounding
return invoice
diff -r fee96f0f00e8 -r 8e15abd1a20c modules/purchase/purchase.py
--- a/modules/purchase/purchase.py Wed Feb 21 15:07:05 2024 +0100
+++ b/modules/purchase/purchase.py Wed Feb 21 15:07:52 2024 +0100
@@ -813,7 +813,7 @@
purchase.total_amount_cache = purchase.total_amount
cls.save(purchases)
- def _get_invoice_purchase(self):
+ def _get_invoice(self):
'Return invoice'
pool = Pool()
Invoice = pool.get('account.invoice')
@@ -844,7 +844,7 @@
if not invoice_lines:
return
- invoice = self._get_invoice_purchase()
+ invoice = self._get_invoice()
if getattr(invoice, 'lines', None):
invoice_lines = list(invoice.lines) + invoice_lines
invoice.lines = invoice_lines