1234567891011121314151617 |
- # -*- coding: utf-8 -*-
- from openerp import models, fields, api
- from openerp.exceptions import except_orm, Warning, RedirectWarning
- class ProjectServiceCarWorkShop(models.Model):
- _inherit = 'project.service'
- agent_id = fields.Many2one('res.partner', string='Agente de Seguro')
- policy = fields.Boolean(string="Policy")
- @api.one
- @api.onchange('name')
- def onchange_name(self):
- self.partner_id = self.name.partner_id.id
- self.agent_id = self.name.agent_id.id
- self.policy = self.name.policy
|