|
@ -1,4 +1,3 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
# © 2016 ACSONE SA/NV (<http://acsone.eu>) |
|
|
# © 2016 ACSONE SA/NV (<http://acsone.eu>) |
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
@ -19,7 +18,8 @@ class DateRange(models.Model): |
|
|
date_start = fields.Date(string='Start date', required=True) |
|
|
date_start = fields.Date(string='Start date', required=True) |
|
|
date_end = fields.Date(string='End date', required=True) |
|
|
date_end = fields.Date(string='End date', required=True) |
|
|
type_id = fields.Many2one( |
|
|
type_id = fields.Many2one( |
|
|
comodel_name='date.range.type', string='Type', index=1, required=True) |
|
|
|
|
|
|
|
|
comodel_name='date.range.type', string='Type', index=1, required=True, |
|
|
|
|
|
ondelete='restrict') |
|
|
type_name = fields.Char( |
|
|
type_name = fields.Char( |
|
|
string='Type', related='type_id.name', readonly=True, store=True) |
|
|
string='Type', related='type_id.name', readonly=True, store=True) |
|
|
company_id = fields.Many2one( |
|
|
company_id = fields.Many2one( |
|
|