summaryrefslogtreecommitdiff
path: root/addons/l10n_cl
diff options
context:
space:
mode:
authorNasreddin (bon) <bon@odoo.com>2020-10-23 11:01:20 +0000
committerNicolas Martinelli <nim@odoo.com>2020-10-23 13:42:12 +0000
commitee1580a85c9942e9a98748fa568f9f664c67a320 (patch)
treebf0dc1ce970130b2ebcafa6d43ba663fd014fa4b /addons/l10n_cl
parentc51867b785aab707b1059d6545b9fce7e95a2488 (diff)
[FIX] account, l10n_ar, l10n_cl: web_studio broken due to dynamic view call
Issue - Install "Accounting" & "Studio" modules - Go to "Accounting" and switch studio editor - Go to "Reports" tab and select "Invoices" report - Click on any block to edit. Not possible to edit document. Cause Studio cannot parse dynamic `t-call` and therefore not able to render the corrects hooks to edit the report. The issue has been introduced by this commit: https://github.com/odoo/odoo/commit/5c5710ae8ea045569fd94504f9d8dd5209f7b662 Solution In the corresponding localization report template, add an 'Inheritance Specs' (position="after") that will add a condition where it will retrieve the rigth report name in case localization enabled. opw-2362257 closes odoo/odoo#60609 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/l10n_cl')
-rw-r--r--addons/l10n_cl/views/report_invoice.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/l10n_cl/views/report_invoice.xml b/addons/l10n_cl/views/report_invoice.xml
index e0dfade0a02..13df416d002 100644
--- a/addons/l10n_cl/views/report_invoice.xml
+++ b/addons/l10n_cl/views/report_invoice.xml
@@ -201,4 +201,20 @@
</template>
+
+ <!-- FIXME: Temp fix to allow fetching invoice_documemt in Studio Reports with localisation -->
+ <template id="report_invoice" inherit_id="account.report_invoice">
+ <xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
+ <t t-if="o._get_name_invoice_report() == 'l10n_cl.report_invoice_document'"
+ t-call="l10n_cl.report_invoice_document" t-lang="lang"/>
+ </xpath>
+ </template>
+
+ <template id="report_invoice_with_payments" inherit_id="account.report_invoice_with_payments">
+ <xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
+ <t t-if="o._get_name_invoice_report() == 'l10n_cl.report_invoice_document'"
+ t-call="l10n_cl.report_invoice_document" t-lang="lang"/>
+ </xpath>
+ </template>
+
</odoo>