diff --git a/addons/account/tests/common.py b/addons/account/tests/common.py index 76ef5b1dc33..5152b33706a 100644 --- a/addons/account/tests/common.py +++ b/addons/account/tests/common.py @@ -375,7 +375,7 @@ class AccountTestInvoicingCommon(TransactionCase): def init_invoice(cls, move_type, partner=None, invoice_date=None, post=False, products=None, amounts=None, taxes=None, company=False): move_form = Form(cls.env['account.move'] \ .with_company(company or cls.env.company) \ - .with_context(default_move_type=move_type, account_predictive_bills_disable_prediction=True)) + .with_context(default_move_type=move_type)) move_form.invoice_date = invoice_date or fields.Date.from_string('2019-01-01') # According to the state or type of the invoice, the date field is sometimes visible or not # Besides, the date field can be put multiple times in the view @@ -398,8 +398,6 @@ class AccountTestInvoicingCommon(TransactionCase): for amount in (amounts or []): with move_form.invoice_line_ids.new() as line_form: line_form.name = "test line" - # We use account_predictive_bills_disable_prediction context key so that - # this doesn't trigger prediction in case enterprise (hence account_predictive_bills) is installed line_form.price_unit = amount if taxes: line_form.tax_ids.clear() diff --git a/addons/account/tests/test_account_move_in_invoice.py b/addons/account/tests/test_account_move_in_invoice.py index 1cfe6b1e2ed..f43a5c578c4 100644 --- a/addons/account/tests/test_account_move_in_invoice.py +++ b/addons/account/tests/test_account_move_in_invoice.py @@ -151,7 +151,7 @@ class TestAccountMoveInInvoiceOnchanges(AccountTestInvoicingCommon): @freeze_time('2021-09-16') def test_in_invoice_onchange_invoice_date_2(self): - invoice_form = Form(self.env['account.move'].with_context(default_move_type='in_invoice', account_predictive_bills_disable_prediction=True)) + invoice_form = Form(self.env['account.move'].with_context(default_move_type='in_invoice')) invoice_form.partner_id = self.partner_a invoice_form.invoice_payment_term_id = self.env.ref('account.account_payment_term_30days') with invoice_form.invoice_line_ids.new() as line_form: diff --git a/addons/account/tests/test_account_move_reconcile.py b/addons/account/tests/test_account_move_reconcile.py index 014e9974f2a..4403042f380 100644 --- a/addons/account/tests/test_account_move_reconcile.py +++ b/addons/account/tests/test_account_move_reconcile.py @@ -3787,7 +3787,7 @@ class TestAccountMoveReconcile(AccountTestInvoicingCommon): self.env.company.tax_exigibility = True # Create an invoice with a CABA tax using 'Include in analytic cost' - move_form = Form(self.env['account.move'].with_context(default_move_type='in_invoice', account_predictive_bills_disable_prediction=True)) + move_form = Form(self.env['account.move'].with_context(default_move_type='in_invoice')) move_form.invoice_date = fields.Date.from_string('2019-01-01') move_form.partner_id = self.partner_a self.cash_basis_tax_a_third_amount.analytic = True @@ -4000,7 +4000,7 @@ class TestAccountMoveReconcile(AccountTestInvoicingCommon): self.tax_account_1.reconcile = True # Create an invoice with a CABA tax using 'Include in analytic cost' - move_form = Form(self.env['account.move'].with_context(default_move_type='in_invoice', account_predictive_bills_disable_prediction=True)) + move_form = Form(self.env['account.move'].with_context(default_move_type='in_invoice')) move_form.invoice_date = fields.Date.from_string('2019-01-01') move_form.partner_id = self.partner_a diff --git a/addons/account_edi_ubl_cii/models/account_edi_common.py b/addons/account_edi_ubl_cii/models/account_edi_common.py index 093b76dc0e8..1b528f7ee6d 100644 --- a/addons/account_edi_ubl_cii/models/account_edi_common.py +++ b/addons/account_edi_ubl_cii/models/account_edi_common.py @@ -262,7 +262,6 @@ class AccountEdiCommon(models.AbstractModel): return with (existing_invoice or self.env['account.move']).with_context( - account_predictive_bills_disable_prediction=True, default_move_type=move_type, default_journal_id=journal.id, )._get_edi_creation() as invoice: