Skip to content
Snippets Groups Projects
Commit 93de1fc04c4c authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: add index for performance

parent 83fbcddbec09
No related branches found
No related tags found
No related merge requests found
11.0.1.1
--------
Add index on columns for performance
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
Inspired from what used to be available in previous Odoo versions. Inspired from what used to be available in previous Odoo versions.
""", """,
"version": "11.0.1.0", "version": "11.0.1.1",
"category": "Accounting", "category": "Accounting",
"author": "XCG Consulting", "author": "XCG Consulting",
"website": "http://odoo.consulting/", "website": "http://odoo.consulting/",
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
default=lambda rec: rec.env.user.company_id, default=lambda rec: rec.env.user.company_id,
help="The company the fiscal year is in.", help="The company the fiscal year is in.",
required=True, required=True,
index=True,
) )
name = fields.Char( name = fields.Char(
...@@ -119,7 +120,7 @@ ...@@ -119,7 +120,7 @@
def create_period(self): def create_period(self):
""" Call by the "Create Periods" Button. """ Call by the "Create Periods" Button.
This function use "end date" field to generate This function use "date_stop" field to generate
automatically all periods. automatically all periods.
""" """
for fy in self: for fy in self:
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
help="The company the fiscal year is in.", help="The company the fiscal year is in.",
readonly=True, readonly=True,
store=True, store=True,
index=True,
) )
date_cutoff = fields.Date( date_cutoff = fields.Date(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment