12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- # -*- coding: utf-8 -*-
- from openerp import api, models, fields
- class ProjectTask(models.Model):
- _inherit = 'project.task'
- higher = fields.Boolean('Superior')
- lower = fields.Boolean('Inferior')
- a1 = fields.Boolean('A1(0,5)')
- a2 = fields.Boolean('A2(0,8)')
- _defaults = {
- 'higher': True,
- 'a1': True,
- }
- @api.one
- @api.onchange('lower')
- def change_model_higher(self):
- self.higher = not self.lower
- @api.one
- @api.onchange('higher')
- def change_model_lower(self):
- self.lower = not self.higher
- @api.one
- @api.onchange('a2')
- def change_model_a1(self):
- self.a1 = not self.a2
- @api.one
- @api.onchange('a1')
- def change_model_a2(self):
- self.a2 = not self.a1
- phase_start = fields.Integer(
- string='Fase',
- )
- phase_end = fields.Integer(
- string='de'
- )
- aligner = fields.Selection(
- selection = [
- ('A1', 'Utilidad'),
- ('gross_amount', 'Monto Bruto'),
- ]
- )
|