Task 2206699
* All the amounts are now expressed in the company currency
- The amounts are taken from debit/credit on the aml
- When opening the report for multiple companies, convert in the
current company's currency
* New default view:
- Group by month instead of category
- Line chart instead of bar chart
- Filter on customers
* Remove useless fields:
- name
- invoice_partner_bank_id
- invoice_payment_term_id
- residual (including taxes)
- amount_total (including taxes)
- nbr_lines as it is a generic feature
* Rename currency_id to the more correct company_currency_id
* Remove useless group_by clause from the SQL query
closes odoo/odoo#47066
Related: odoo/upgrade#1021
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
22 lines
705 B
Python
22 lines
705 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
from odoo import models, fields
|
|
|
|
|
|
class AccountInvoiceReport(models.Model):
|
|
|
|
_inherit = 'account.invoice.report'
|
|
|
|
l10n_ar_state_id = fields.Many2one('res.country.state', 'State', readonly=True)
|
|
date = fields.Date(readonly=True, string="Accounting Date")
|
|
|
|
_depends = {
|
|
'account.move': ['partner_id', 'date'],
|
|
'res.partner': ['state_id'],
|
|
}
|
|
|
|
def _select(self):
|
|
return super()._select() + ", contact_partner.state_id as l10n_ar_state_id, move.date"
|
|
|
|
def _from(self):
|
|
return super()._from() + " LEFT JOIN res_partner contact_partner ON contact_partner.id = move.partner_id"
|