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