12345678910111213141516171819202122 |
- # -*- encoding: utf-8 -*-
- from openerp import models, fields, api
- class AccountInvoice(models.Model):
- _name = 'account.invoice'
- _inherit = 'account.invoice'
- attachment_ids = fields.One2many('ir.attachment', 'res_id', 'Attachment')
- timbrado = fields.Char('Nº de timbrado del proveedor', size=8)
- contado = fields.Boolean('Contado')
- credito = fields.Boolean('Crédito')
- @api.one
- @api.onchange('credito')
- def cambiar_estado_credito(self):
- self.contado = not self.credito
- @api.one
- @api.onchange('contado')
- def cambiar_estado_contado(self):
- if self.contado == True:
- self.credito = not self.contado
|