2
0

[FIX] account_journal_general_sequence: unique entry number per journal

The sequence is applied per journal. Thus, we can't require one number per company, but per journal.

@moduon MT-3082
This commit is contained in:
Jairo Llopis 2023-06-23 12:33:22 +01:00
parent 855e061e5c
commit c08d76e211
No known key found for this signature in database
GPG Key ID: E47E3BE44B940490
3 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ msgstr ""
#. module: account_journal_general_sequence
#: model:ir.model.constraint,message:account_journal_general_sequence.constraint_account_move_entry_number_unique
msgid "Entry number must be unique per company."
msgid "Entry number must be unique per journal."
msgstr ""
#. module: account_journal_general_sequence

View File

@ -79,8 +79,8 @@ msgstr "Número de asiento"
#. module: account_journal_general_sequence
#: model:ir.model.constraint,message:account_journal_general_sequence.constraint_account_move_entry_number_unique
msgid "Entry number must be unique per company."
msgstr "El número de asiento debe ser único por compañía."
msgid "Entry number must be unique per journal."
msgstr "El número de asiento debe ser único por diario."
#. module: account_journal_general_sequence
#: model:ir.model.fields,field_description:account_journal_general_sequence.field_account_journal__id

View File

@ -15,8 +15,8 @@ class AccountMove(models.Model):
_sql_constraints = [
(
"entry_number_unique",
"UNIQUE(entry_number, company_id)",
"Entry number must be unique per company.",
"UNIQUE(entry_number, journal_id)",
"Entry number must be unique per journal.",
),
]