From 55ae04fbacc51275877bea49130ac92346de81ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20L=C3=B3pez?= Date: Mon, 14 Nov 2016 09:24:46 -0600 Subject: [PATCH] [REF] date_range: Use 'index' instead of 'select' --- date_range/models/date_range.py | 4 ++-- date_range/models/date_range_type.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/date_range/models/date_range.py b/date_range/models/date_range.py index a7926e6bf..7f1fb9493 100644 --- a/date_range/models/date_range.py +++ b/date_range/models/date_range.py @@ -19,11 +19,11 @@ class DateRange(models.Model): date_start = fields.Date(string='Start date', required=True) date_end = fields.Date(string='End date', required=True) type_id = fields.Many2one( - comodel_name='date.range.type', string='Type', select=1, required=True) + comodel_name='date.range.type', string='Type', index=1, required=True) type_name = fields.Char( string='Type', related='type_id.name', readonly=True, store=True) company_id = fields.Many2one( - comodel_name='res.company', string='Company', select=1, + comodel_name='res.company', string='Company', index=1, default=_default_company) active = fields.Boolean( help="The active field allows you to hide the date range without " diff --git a/date_range/models/date_range_type.py b/date_range/models/date_range_type.py index 119f1ffd4..bff6e4f5d 100644 --- a/date_range/models/date_range_type.py +++ b/date_range/models/date_range_type.py @@ -20,7 +20,7 @@ class DateRangeType(models.Model): help="The active field allows you to hide the date range without " "removing it.", default=True) company_id = fields.Many2one( - comodel_name='res.company', string='Company', select=1, + comodel_name='res.company', string='Company', index=1, default=_default_company) _sql_constraints = [