mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
33 lines
948 B
Python
33 lines
948 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class AccountInvoiceReport(models.Model):
|
|
_inherit = 'account.invoice.report'
|
|
|
|
cost_center_id = fields.Many2one(
|
|
'account.cost.center',
|
|
string='Cost Center',
|
|
readonly=True
|
|
)
|
|
account_analytic_id = fields.Many2one(
|
|
'account.analytic.account',
|
|
string='Analytic Account',
|
|
readonly=True
|
|
)
|
|
|
|
def _select(self):
|
|
return super(AccountInvoiceReport, self)._select() + \
|
|
", sub.cost_center_id as cost_center_id"
|
|
|
|
def _sub_select(self):
|
|
return super(AccountInvoiceReport, self)._sub_select() + \
|
|
", ail.cost_center_id as cost_center_id"
|
|
|
|
def _group_by(self):
|
|
return super(AccountInvoiceReport, self)._group_by() + \
|
|
", ail.cost_center_id"
|