diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/l10n_latam_invoice_document/report | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/l10n_latam_invoice_document/report')
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> |
