当我单击“数据透视视图”数据时,通常会转到“数据透视视图”模型(pivot.analysis
)中被单击数据的树视图。
取而代之的是,我要转到源模型的树视图(account.move.line
)。
代码XML
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_pivot" model="ir.ui.view">
<field name="name">name_pivot</field>
<field name="model">pivot.analysis</field>
<field name="arch" type="xml">
<pivot string="Analysis">
<field name="user_type_id" type="row"/>
<field name="balance" type="measure"/>
</pivot>
</field>
</record>
<record id="view_analysis_tree" model="ir.ui.view">
<field name="name">analysis_tree</field>
<field name="model">pivot.analysis</field>
<field name="arch" type="xml">
<tree string="Analysis">
<field name="date"/>
<field name="account_id"/>
<field name="name"/>
<field name="ref"/>
<field name="payment_id"/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="invoice_id"/>
<field name="cost_center_id"/>
<field name="analytic_account_id"/>
<field name="product_id"/>
<field name="debit" sum="Total"/>
<field name="credit" sum="Total"/>
</tree>
</field>
</record>
<record id="menu_action_orchid_entry_analysis" model="ir.actions.act_window">
<field name="name">Entry Analysis</field>
<field name="res_model">pivot.analysis</field>
<field name="view_type">form</field>
<field name="view_mode">pivot,tree</field>
</record>
谢谢。