[MODULE] +v1.1.0 from https://www.odoo.com/apps/7.0/account_financial_report_webkit/
[burette/account_financial_report_webkit.git] / wizard / partner_balance_wizard_view.xml
diff --git a/wizard/partner_balance_wizard_view.xml b/wizard/partner_balance_wizard_view.xml
new file mode 100644 (file)
index 0000000..7d3c0f0
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!-- inheriting views from more than 2 differents inherited models like
+        partner.balance.webkit -> account.common.balance.report -> account.common.account.report
+        is not supported so we have to copy paste the same view for partner balance, balance sheet
+          -->
+        <record id="account_partner_balance_view_webkit" model="ir.ui.view">
+            <field name="name">Partner Balance</field>
+            <field name="model">partner.balance.webkit</field>
+            <field name="inherit_id" ref="account.account_common_report_view"/>
+            <field name="arch" type="xml">
+                <data>
+                    <xpath expr="/form/label[@string='']" position="replace">
+                        <separator string="Partner Balance" colspan="4"/>
+                        <label nolabel="1" colspan="4" string="This report is an analysis done by a partner, It is a PDF report containing one line per partner representing the cumulative credit balance"/>
+                    </xpath>
+                    <field name="chart_account_id" position='attributes'>
+                        <attribute name="colspan">4</attribute>
+                    </field>
+                    <field name="target_move" position="after">
+                        <newline/>
+                        <field name="result_selection" colspan="4"/>
+                    </field>
+                    <page name="filters" position="after">
+                        <page string="Accounts Filters" name="accounts">
+                            <separator string="Print only" colspan="4"/>
+                            <field name="account_ids" colspan="4" nolabel="1" domain="[('type', 'in', ['receivable', 'payable'])]">
+                                <tree>
+                                    <field name="code"/>
+                                    <field name="name"/>
+                                    <field name="type"/>
+                                    <field name="company_id"/>
+                                </tree>
+                            </field>
+                        </page>
+                        <page string="Partners Filters" name="accounts">
+                            <separator string="Print only" colspan="4"/>
+                            <field name="partner_ids" colspan="4" nolabel="1"/>
+                        </page>
+                        <page name="placeholder"/>
+                    </page>
+                    <page name="journal_ids" position="attributes">
+                        <attribute name="invisible">True</attribute>
+                    </page>
+                    <page name="filters" position="attributes">
+                        <attribute name="string">Time Filters</attribute>
+                    </page>
+                    <field name="period_from" position="attributes">
+                        <attribute name="domain">[('fiscalyear_id', '=', fiscalyear_id), ('special', '=', False)]</attribute>
+                    </field>
+                    <field name="period_to" position="attributes">
+                        <attribute name="domain">[('fiscalyear_id', '=', fiscalyear_id), ('special', '=', False)]</attribute>
+                    </field>
+                    <field name="fiscalyear_id" position="attributes">
+                        <attribute name="attrs">{'required': [('filter', '=', 'filter_opening')]}</attribute>
+                    </field>
+                </data>
+            </field>
+        </record>
+
+        <record id="action_account_partner_balance_menu_webkit" model="ir.actions.act_window">
+            <field name="name">Partner Balance</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">partner.balance.webkit</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="account_partner_balance_view_webkit"/>
+            <field name="target">new</field>
+        </record>
+
+        <record model="ir.values" id="action_account_partner_balance_values_webkit">
+            <field name="model_id" ref="account.model_account_account"/>
+            <field name="object" eval="1"/>
+            <field name="name">Partner Balance</field>
+            <field name="key2">client_print_multi</field>
+            <field name="value"
+                eval="'ir.actions.act_window,' +str(ref('action_account_partner_balance_menu_webkit'))"/>
+            <field name="key">action</field>
+            <field name="model">account.account</field>
+        </record>
+
+    </data>
+</openerp>