From e576fcacc98c49419409a0dd5a1e5724fb591b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 21 Feb 2024 15:07:52 +0100 Subject: [PATCH] Rename _get_invoice_purchase in _get_invoice on purchase --- modules/account_cash_rounding/purchase.py | 4 ++-- modules/purchase/purchase.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/account_cash_rounding/purchase.py b/modules/account_cash_rounding/purchase.py index 304e2c7f84..5b15b5eb59 100644 --- a/modules/account_cash_rounding/purchase.py +++ b/modules/account_cash_rounding/purchase.py @@ -72,7 +72,7 @@ class Purchase(metaclass=PoolMeta): 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 --git a/modules/purchase/purchase.py b/modules/purchase/purchase.py index b4ef25aff2..88c664b483 100644 --- a/modules/purchase/purchase.py +++ b/modules/purchase/purchase.py @@ -813,7 +813,7 @@ class Purchase( 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 @@ class Purchase( 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