diff --git a/addons/account/tests/common.py b/addons/account/tests/common.py index dc840167e40..27301f76957 100644 --- a/addons/account/tests/common.py +++ b/addons/account/tests/common.py @@ -363,7 +363,7 @@ class AccountTestInvoicingCommon(TransactionCase): @classmethod def init_invoice(cls, move_type, partner=None, invoice_date=None, post=False, products=[], amounts=[], taxes=None): - move_form = Form(cls.env['account.move'].with_context(default_move_type=move_type)) + move_form = Form(cls.env['account.move'].with_context(default_move_type=move_type, account_predictive_bills_disable_prediction=True)) move_form.invoice_date = invoice_date or fields.Date.from_string('2019-01-01') move_form.partner_id = partner or cls.partner_a @@ -376,6 +376,9 @@ class AccountTestInvoicingCommon(TransactionCase): for amount in amounts: 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()