view_res_partner_owned_share.xml 2.73 KB
Newer Older
François C. committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_res_partner_owned_share_tree" model="ir.ui.view">
        <field name="name">res.partner.owned.share.tree</field>
        <field name="model">res.partner.owned.share</field>
        <field name="arch" type="xml">
            <tree create='false' edit='false' delete='false'>
                <field name="name"/>
                <field name="partner_id"/>
                <field name="category_id"/>
                <field name="owned_share" sum="Total Owned Shares"/>
            </tree>
        </field>
    </record>

    <record id="view_res_partner_owned_share_form" model="ir.ui.view">
        <field name="model">res.partner.owned.share</field>
        <field name="arch" type="xml">
            <form create='false' edit='false' delete='false'>
                <sheet>
                    <group>
                        <div class="oe_title">
                            <h1>
                                <label for="name" class="oe_edit_only"/>
                                <field name="name"  placeholder="Name" />
                            </h1>
                        </div>
                    </group>
                    <group>
                        <group>
                            <field name="partner_id" />
                            <field name="category_id"/>
                        </group>
                        <group>
                            <field name="owned_share"/>
                        </group>
                    </group>

                    <group string="Related Invoices">
                        <field name="related_invoice_ids" context="{'form_view_ref' : 'account.invoice_form', 'tree_view_ref' : 'account.invoice_tree'}" readonly="1" nolabel="1"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record model="ir.ui.view" id="view_res_partner_owned_share_search">
        <field name="name">res.partner.owned.share.search</field>
        <field name="model">res.partner.owned.share</field>
        <field name="arch" type="xml">
            <search string="Partner Owned Shares">
                <field name="partner_id"/>
                <field name="category_id"/>
            </search>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_res_partner_owned_share">
       <field name="name">Partner Owned Shares</field>
       <field name="type">ir.actions.act_window</field>
       <field name="res_model">res.partner.owned.share</field>
       <field name="view_type">form</field>
       <field name="view_mode">tree,form</field>
       <field name="context">{'search_default_partner_id': active_id, 'default_partner_id': active_id}</field>
    </record>

</odoo>