2
0

Merge PR #1615 into 16.0

Signed-off-by moylop260
This commit is contained in:
OCA-git-bot 2023-03-16 08:52:41 +00:00
commit b31317eb2f
2 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,9 @@ class AccountJournal(models.Model):
)
# Redefine the default to True as <=v13.0
refund_sequence = fields.Boolean(default=True)
# has_sequence_holes is not relevant anymore (since based on sequence_prefix/number)
# -> compute=False to improve perf and to avoid displaying warning
has_sequence_holes = fields.Boolean(compute=False)
@api.constrains("refund_sequence_id", "sequence_id")
def _check_journal_sequence(self):

View File

@ -9,11 +9,14 @@ class AccountMove(models.Model):
_inherit = "account.move"
name = fields.Char(compute="_compute_name_by_sequence")
# highest_name, sequence_prefix and sequence_number are not needed any more
# highest_name, sequence_prefix, sequence_number are not needed any more
# -> compute=False to improve perf
highest_name = fields.Char(compute=False)
sequence_prefix = fields.Char(compute=False)
sequence_number = fields.Integer(compute=False)
# made_sequence_hole is not relevant anymore (since based on sequence_prefix/number)
# -> compute=False to improve perf and to avoid displaying warning
made_sequence_hole = fields.Boolean(compute=False)
_sql_constraints = [
(