You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
403 B

  1. # -*- coding: utf-8 -*-
  2. from openerp import models, api
  3. class AccountAnalyticAccount(models.Model):
  4. _inherit = 'account.analytic.account'
  5. @api.model
  6. def _prepare_invoice_data(self, contract):
  7. invoice_vals = super(AccountAnalyticAccount, self).\
  8. _prepare_invoice_data(
  9. contract)
  10. invoice_vals['contract_id'] = contract.id
  11. return invoice_vals