Black, isort, etc...
This commit is contained in:
@@ -6,17 +6,21 @@ from odoo import models
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
|
||||
_inherit = 'account.move.line'
|
||||
_inherit = "account.move.line"
|
||||
|
||||
def init(self):
|
||||
res = super().init()
|
||||
self._cr.execute("""
|
||||
self._cr.execute(
|
||||
"""
|
||||
SELECT indexname FROM pg_indexes
|
||||
WHERE indexname = 'account_move_line_date_tax_line_id_idx'
|
||||
""")
|
||||
"""
|
||||
)
|
||||
if not self._cr.fetchone():
|
||||
self._cr.execute("""
|
||||
self._cr.execute(
|
||||
"""
|
||||
CREATE INDEX account_move_line_date_tax_line_id_idx
|
||||
ON account_move_line (date, tax_line_id)
|
||||
""")
|
||||
"""
|
||||
)
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user