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.
19 lines
522 B
19 lines
522 B
# -*- coding: utf-8 -*-
|
|
|
|
from openerp import models, fields, api
|
|
|
|
|
|
class AccountInvoice(models.Model):
|
|
_inherit = 'account.invoice'
|
|
|
|
@api.one
|
|
@api.depends('invoice_line.account_analytic_id')
|
|
def _analytic_account_ids(self):
|
|
self.analytic_account_ids = \
|
|
self.mapped('invoice_line.account_analytic_id')
|
|
|
|
analytic_account_ids = fields.Many2many(
|
|
comodel_name='account.analytic.account',
|
|
compute='_analytic_account_ids',
|
|
store=True,
|
|
string='Contracts')
|