diff --git a/account.py b/account.py index d684a7bf88..e596e75cdc 100644 --- a/account.py +++ b/account.py @@ -5,7 +5,6 @@ from decimal import Decimal from trytond.i18n import gettext from trytond.model import ModelSQL, fields from trytond.modules.account.exceptions import AccountMissing -from trytond.modules.account_invoice.exceptions import PaymentTermComputeError from trytond.modules.company.model import CompanyValueMixin from trytond.pool import Pool, PoolMeta from trytond.pyson import Eval @@ -130,6 +129,8 @@ class Invoice(metaclass=PoolMeta): 'payment_term_date') def _cash_round_total_amount(self, amount): "Round total amount according to cash rounding" + from trytond.modules.account_invoice.exceptions import ( + PaymentTermComputeError) pool = Pool() Date = pool.get('ir.date') if self.currency: diff --git a/purchase.py b/purchase.py index f5cab31714..304e2c7f84 100644 --- a/purchase.py +++ b/purchase.py @@ -1,7 +1,6 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from trytond.model import fields -from trytond.modules.account_invoice.exceptions import PaymentTermComputeError from trytond.pool import Pool, PoolMeta from trytond.pyson import Eval from trytond.transaction import Transaction @@ -55,6 +54,8 @@ class Purchase(metaclass=PoolMeta): @fields.depends('currency', 'payment_term', 'company') def _cash_round_total_amount(self, amount): + from trytond.modules.account_invoice.exceptions import ( + PaymentTermComputeError) pool = Pool() Date = pool.get('ir.date') if self.currency: diff --git a/sale.py b/sale.py index 6122a34d84..bc7b1eb913 100644 --- a/sale.py +++ b/sale.py @@ -1,7 +1,6 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from trytond.model import fields -from trytond.modules.account_invoice.exceptions import PaymentTermComputeError from trytond.pool import Pool, PoolMeta from trytond.transaction import Transaction @@ -39,6 +38,8 @@ class Sale(metaclass=PoolMeta): @fields.depends('currency', 'payment_term', 'company') def _cash_round_total_amount(self, amount): + from trytond.modules.account_invoice.exceptions import ( + PaymentTermComputeError) pool = Pool() Date = pool.get('ir.date') if self.currency: