[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:
parent
855e061e5c
commit
c08d76e211
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.",
|
||||
),
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user