account_search_ruc.py 349 B

123456789101112
  1. from openerp import models,fields,api
  2. class account_invoice(models.Model):
  3. _name = 'account.invoice'
  4. _inherit = 'account.invoice'
  5. @api.one
  6. @api.depends('partner_id')
  7. def _partner_data(self):
  8. self.partner_ruc = self.partner_id.ruc
  9. partner_ruc = fields.Char('R.U.C.',compute='_partner_data',store=True, update=True)