[RFR] mis_template_financial_report: make horizontal rendering optional
This commit is contained in:
committed by
Geraldo Lopez
parent
458475146d
commit
eb46d97851
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="mis_report_instance_view_form">
|
||||
<field name="name">Add horizontal option to MIS report instance form</field>
|
||||
<field name="model">mis.report.instance</field>
|
||||
<field name="inherit_id" ref="mis_builder.mis_report_instance_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<group name="layout" position="inside">
|
||||
<field name="allow_horizontal" invisible="1" />
|
||||
<field
|
||||
name="horizontal"
|
||||
attrs="{'invisible': [('allow_horizontal', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -20,7 +20,7 @@
|
||||
inherit_id="mis_builder.report_mis_report_instance"
|
||||
>
|
||||
<xpath expr="//div[hasclass('mis_table')]" position="attributes">
|
||||
<attribute name="t-if">not o._is_horizontal()</attribute>
|
||||
<attribute name="t-if">not o.horizontal</attribute>
|
||||
</xpath>
|
||||
<!-- the following is a somewhat convoluted way to duplicate the table /-->
|
||||
<xpath expr="//div[hasclass('mis_table')]" position="replace">
|
||||
@@ -35,7 +35,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//t[@t-marker='unwrap']" position="replace" />
|
||||
<xpath expr="//t[@t-marker='wrap_in_table']" position="after">
|
||||
<div t-if="o._is_horizontal()" class="mis_builder_horizontal">
|
||||
<div t-if="o.horizontal" class="mis_builder_horizontal">
|
||||
<div>
|
||||
<div t-foreach="o._compute_horizontal_matrices()" t-as="matrix" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user