diff --git a/l10n_ar_ux/__init__.py b/l10n_ar_ux/__init__.py index d4d4cbcb4..1ef6a4522 100644 --- a/l10n_ar_ux/__init__.py +++ b/l10n_ar_ux/__init__.py @@ -5,7 +5,6 @@ from . import controllers from . import models from odoo import api -from . import reports from . import wizards from .hooks import post_init_hook diff --git a/l10n_ar_ux/reports/__init__.py b/l10n_ar_ux/reports/__init__.py deleted file mode 100644 index d0f0eb015..000000000 --- a/l10n_ar_ux/reports/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -############################################################################## -# For copyright and license notices, see __manifest__.py file in module root -# directory -############################################################################## -from . import invoice_report diff --git a/l10n_ar_ux/reports/account_invoice_report_view.xml b/l10n_ar_ux/reports/account_invoice_report_view.xml index 093aa685c..1e6deaa81 100644 --- a/l10n_ar_ux/reports/account_invoice_report_view.xml +++ b/l10n_ar_ux/reports/account_invoice_report_view.xml @@ -4,70 +4,12 @@ account.invoice.report.tree account.invoice.report + - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - account.invoice.report.search - account.invoice.report - - - - - - - - - - - - - - - - account.invoice.report.pivot - account.invoice.report - - - - - - - - - - Invoices Lines Analysis - account.invoice.report - tree,graph,pivot - {'search_default_current':1} - - - - diff --git a/l10n_ar_ux/reports/invoice_report.py b/l10n_ar_ux/reports/invoice_report.py deleted file mode 100644 index 445690a61..000000000 --- a/l10n_ar_ux/reports/invoice_report.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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' - - # TODO mover todo esto a account_ux - # agregamos widgets monetary, referencia a company currency en string y help - price_subtotal = fields.Monetary( - currency_field='company_currency_id', string="Untaxed Total (CC)", help="Untaxed Total in company currency") - price_total = fields.Monetary(string='Total', currency_field='invoice_currency_id') - price_average = fields.Monetary( - currency_field='company_currency_id', string='Average Price (CC)', help="Average Price in company currency") - # creamos nuevos campos para tener descuentos, vinculos e importes en moneda de compañía - total_cc = fields.Monetary( - string='Total (CC)', readonly=True, help="Untaxed Total in company currency", - currency_field='company_currency_id') - invoice_currency_id = fields.Many2one('res.currency', string='Invoice Currency', readonly=True) - line_id = fields.Many2one('account.move.line', string='Journal Item', readonly=True) - price_subtotal_ic = fields.Monetary('Untaxed Total', readonly=True, currency_field='invoice_currency_id',) - price_unit = fields.Monetary('Unit Price', readonly=True, currency_field='invoice_currency_id',) - discount = fields.Float('Discount (%)', readonly=True) - discount_amount = fields.Monetary( - 'Discount Amount', readonly=True, group_operator="sum", currency_field='invoice_currency_id',) - - _depends = {'account.move.line': ['price_unit', 'discount']} - - def _select(self): - return super()._select() + """, - line.price_unit, - line.id as line_id, - move.currency_id as invoice_currency_id, - line.discount, - line.price_unit * line.quantity * line.discount/100 * - (CASE WHEN move - .move_type IN ('in_refund','out_refund','in_receipt') THEN -1 ELSE 1 END) as discount_amount, - -line.balance * (line.price_total / NULLIF(line.price_subtotal, 0.0)) AS total_cc, - line.price_subtotal * (CASE WHEN move.move_type IN ('in_refund', 'out_invoice') THEN 1 ELSE -1 END) as price_subtotal_ic - """ - - def _group_by(self): - return super()._group_by() + ", move.invoice_currency_id"