When making Tryton module, when we define act_window object, we specity 
res_model. Why, since we already specify model in definition of view which 
is to be displayed in the act window?

For example, in trytond/modules/party/party.xml we have:

        <record model="ir.ui.view" id="party_view_tree">
            <field name="model">party.party</field>
            <field name="type">tree</field>
            <field name="name">party_tree</field>
        </record>
        <record model="ir.ui.view" id="party_view_form">
            <field name="model">party.party</field>
            <field name="type">form</field>
            <field name="name">party_form</field>
        </record>
        <record model="ir.action.act_window" id="act_party_form">
            <field name="name">Parties</field>
            <field name="res_model">party.party</field>
        </record>

First we specify model for party_view_tree with this line:

            <field name="model">party.party</field>

Then we do the same for party_view_form.

And finally we specify the same model in definition of act_party_form:
            <field name="res_model">party.party</field>

I am asking this because this looks to me as unnecessary complication. Can 
someone explain to me why we have to do this way?

Regards,
Marko

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/faa951e6-3cf8-4803-900f-f110d33d007b%40googlegroups.com.

Reply via email to