From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- addons/l10n_latam_invoice_document/report/__init__.py | 3 +++ .../report/invoice_report.py | 13 +++++++++++++ .../report/invoice_report_view.xml | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 addons/l10n_latam_invoice_document/report/__init__.py create mode 100644 addons/l10n_latam_invoice_document/report/invoice_report.py create mode 100644 addons/l10n_latam_invoice_document/report/invoice_report_view.xml (limited to 'addons/l10n_latam_invoice_document/report') diff --git a/addons/l10n_latam_invoice_document/report/__init__.py b/addons/l10n_latam_invoice_document/report/__init__.py new file mode 100644 index 00000000..a622bd9b --- /dev/null +++ b/addons/l10n_latam_invoice_document/report/__init__.py @@ -0,0 +1,3 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import invoice_report diff --git a/addons/l10n_latam_invoice_document/report/invoice_report.py b/addons/l10n_latam_invoice_document/report/invoice_report.py new file mode 100644 index 00000000..a62d1270 --- /dev/null +++ b/addons/l10n_latam_invoice_document/report/invoice_report.py @@ -0,0 +1,13 @@ +# 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_latam_document_type_id = fields.Many2one('l10n_latam.document.type', 'Document Type', index=True) + _depends = {'account.move': ['l10n_latam_document_type_id'],} + + def _select(self): + return super()._select() + ", move.l10n_latam_document_type_id as l10n_latam_document_type_id" diff --git a/addons/l10n_latam_invoice_document/report/invoice_report_view.xml b/addons/l10n_latam_invoice_document/report/invoice_report_view.xml new file mode 100644 index 00000000..1b38f6cf --- /dev/null +++ b/addons/l10n_latam_invoice_document/report/invoice_report_view.xml @@ -0,0 +1,18 @@ + + + + + account.invoice.report.search + account.invoice.report + + + + + + + + + + + + -- cgit v1.2.3