1234567891011121314151617 |
- # -*- coding: utf-8 -*-
- from openerp import api, models, fields
- class account_analytic_account(models.Model):
- _inherit = "account.analytic.account"
- employee_id = fields.Many2one(string='Cobrador', related="partner_id.employee_id")
- def _prepare_invoice_data(self, cr, uid, contract, context=None):
- context = context or {}
- invoice = super(account_analytic_account, self)._prepare_invoice_data(
- cr, uid, contract, context=context)
- invoice.update({
- 'employee_id': contract.employee_id})
- return invoice
|