summaryrefslogtreecommitdiff
path: root/addons/l10n_latam_invoice_document/report
diff options
context:
space:
mode:
Diffstat (limited to 'addons/l10n_latam_invoice_document/report')
-rw-r--r--addons/l10n_latam_invoice_document/report/__init__.py3
-rw-r--r--addons/l10n_latam_invoice_document/report/invoice_report.py13
-rw-r--r--addons/l10n_latam_invoice_document/report/invoice_report_view.xml18
3 files changed, 34 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+
+ <record model="ir.ui.view" id="view_account_invoice_report_search">
+ <field name="name">account.invoice.report.search</field>
+ <field name="model">account.invoice.report</field>
+ <field name="inherit_id" ref="account.view_account_invoice_report_search"/>
+ <field name="arch" type="xml">
+ <search>
+ <field name="l10n_latam_document_type_id"/>
+ </search>
+ <filter name="user" position="after">
+ <filter domain="[]" string="Document Type" name="l10n_latam_document_type" context="{'group_by':'l10n_latam_document_type_id'}"/>
+ </filter>
+ </field>
+ </record>
+
+</odoo>