diff --git a/account_move_template/models/account_move_template.py b/account_move_template/models/account_move_template.py index 8f2e6962..a331bd6b 100644 --- a/account_move_template/models/account_move_template.py +++ b/account_move_template/models/account_move_template.py @@ -173,7 +173,7 @@ class AccountMoveTemplateLine(models.Model): ) opt_account_id = fields.Many2one( "account.account", - string="Account Opt.", + string="Account if Negative", domain="[('company_id', '=', company_id), ('deprecated', '=', False)]", check_company=True, help="When amount is negative, use this account instead", diff --git a/account_move_template/tests/test_account_move_template_options.py b/account_move_template/tests/test_account_move_template_options.py index dc157f5c..bc152f18 100644 --- a/account_move_template/tests/test_account_move_template_options.py +++ b/account_move_template/tests/test_account_move_template_options.py @@ -243,7 +243,7 @@ class TestAccountMoveTemplateEnhanced(TransactionCase): f.template_id = self.move_template f.overwrite = str({"P0": {"amount": 100}}) template_run = f.save() - msg_error = "Keys must be line sequence, i..e, L1, L2, ..." + msg_error = "Keys must be line sequence i.e. L1, L2, ..." with self.assertRaisesRegex(ValidationError, msg_error): template_run.load_lines() diff --git a/account_move_template/wizard/account_move_template_run.py b/account_move_template/wizard/account_move_template_run.py index 52b12299..9187f534 100644 --- a/account_move_template/wizard/account_move_template_run.py +++ b/account_move_template/wizard/account_move_template_run.py @@ -120,7 +120,7 @@ Valid dictionary to overwrite template lines: # First level keys must be L1, L2, ... keys = overwrite_vals.keys() if list(filter(lambda x: x[:1] != "L" or not x[1:].isdigit(), keys)): - raise ValidationError(_("Keys must be line sequence, i..e, L1, L2, ...")) + raise ValidationError(_("Keys must be line sequence i.e. L1, L2, ...")) # Second level keys must be a valid keys try: if dict(