|
@ -12,11 +12,23 @@ class Agreement(models.Model): |
|
|
code = fields.Char(required=True, copy=False) |
|
|
code = fields.Char(required=True, copy=False) |
|
|
name = fields.Char(required=True) |
|
|
name = fields.Char(required=True) |
|
|
partner_id = fields.Many2one( |
|
|
partner_id = fields.Many2one( |
|
|
'res.partner', string='Partner', ondelete='restrict', required=True, |
|
|
|
|
|
|
|
|
'res.partner', string='Partner', ondelete='restrict', |
|
|
domain=[('parent_id', '=', False)]) |
|
|
domain=[('parent_id', '=', False)]) |
|
|
company_id = fields.Many2one( |
|
|
company_id = fields.Many2one( |
|
|
'res.company', string='Company', |
|
|
'res.company', string='Company', |
|
|
default=lambda self: self.env['res.company']._company_default_get()) |
|
|
default=lambda self: self.env['res.company']._company_default_get()) |
|
|
|
|
|
is_template = fields.Boolean( |
|
|
|
|
|
string="Is a Template?", |
|
|
|
|
|
default=False, |
|
|
|
|
|
copy=False, |
|
|
|
|
|
help="Set if the agreement is a template. " |
|
|
|
|
|
"Template agreements don't require a partner." |
|
|
|
|
|
) |
|
|
|
|
|
agreement_type_id = fields.Many2one( |
|
|
|
|
|
'agreement.type', |
|
|
|
|
|
string="Agreement Type", |
|
|
|
|
|
help="Select the type of agreement", |
|
|
|
|
|
) |
|
|
active = fields.Boolean(default=True) |
|
|
active = fields.Boolean(default=True) |
|
|
signature_date = fields.Date() |
|
|
signature_date = fields.Date() |
|
|
start_date = fields.Date() |
|
|
start_date = fields.Date() |
|
|