[FIX] account: create sequence index for account.move

missed call of the super method leads to missed initialization of mixins.
Particually, the sequence indexes [1] were not created, which led to perofrmance
issues [2]

[1]
https://github.com/odoo/odoo/blame/8b8c94ca90c9d1faa4d735d357af316736b43562/addons/account/models/sequence_mixin.py#L38-L39
[2] opw-2825975

closes odoo/odoo#90351

X-original-commit: aa5778582a332a481339483c4d432d1c535dbc83
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Ivan Yelizariev
2022-05-03 08:38:52 +02:00
parent 8f748a212e
commit 95eaaf7e71
+1
View File
@@ -50,6 +50,7 @@ class AccountMove(models.Model):
_sequence_index = "journal_id"
def init(self):
super().init()
self.env.cr.execute("""
CREATE INDEX IF NOT EXISTS account_move_to_check_idx
ON account_move(journal_id) WHERE to_check = true;