From 1526648ee657b07d130980da08b236362a5f9bc2 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 27 May 2015 21:49:06 +0200 Subject: [PATCH] Add index=True on some fields on which we often search, as suggested by Yannick --- intrastat_product/intrastat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intrastat_product/intrastat.py b/intrastat_product/intrastat.py index 5242514..db416f4 100644 --- a/intrastat_product/intrastat.py +++ b/intrastat_product/intrastat.py @@ -40,7 +40,7 @@ class ReportIntrastatCode(models.Model): self.display_name = display_name name = fields.Char( - string='H.S. code', + string='H.S. code', index=True, help="Full length Harmonized System code (digits only). Full list is " "available from the World Customs Organisation, see " "http://www.wcoomd.org") @@ -50,7 +50,7 @@ class ReportIntrastatCode(models.Model): compute='_compute_display_name', string="Display Name", readonly=True, store=True) intrastat_code = fields.Char( - string='European Intrastat Code', size=9, required=True, + string='European Intrastat Code', size=9, required=True, index=True, help="Code used for the Intrastat declaration. Must be part " "of the 'Combined Nomenclature' (CN), cf " "http://en.wikipedia.org/wiki/Combined_Nomenclature"