Skip to content

Commit

Permalink
account_move_template: fix and improve strings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Nov 5, 2023
1 parent 7a74f0f commit 6c97f74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion account_move_template/models/account_move_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_move_template_exceptions(self):
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()

Expand Down
2 changes: 1 addition & 1 deletion account_move_template/wizard/account_move_template_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _get_overwrite_vals(self):
# 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(
Expand Down

0 comments on commit 6c97f74

Please sign in to comment.