account_invoice.py 610 B

1234567891011121314
  1. # -*- encoding: utf-8 -*-
  2. from openerp import models, api, fields
  3. class aa_invoice_custom_lines(models.Model):
  4. _inherit = 'account.invoice.line'
  5. medic_id = fields.Many2one('res.partner',"Médico", domain="[('is_medic', '=', True)]")
  6. # def _prepare_order_line_invoice_line(self, cr, uid, line, account_id=False, context=None):
  7. # ret = super(aa_invoice_custom_lines, self)._prepare_order_line_invoice_line(cr, uid, line, account_id=False, context=context)
  8. # if line.product_id:
  9. # if line.medic_id:
  10. # ret['medic_id'] = line.medic_id
  11. # return ret