On 01/12/11 09:47 -0500, Oscar Andres Alvarez Montero wrote:
> 2011/12/1 Cédric Krier <[email protected]>
> 
> > On 01/12/11 04:49 -0800, oscar_andres_col wrote:
> > > Hi,
> > >
> > > I developing several modules and I would like that trytond core
> > > simplify the xml coding in action windows, please let me show :
> > >
> > > Nowadays : (party.xml)
> > >
> > >         <record model="ir.action.act_window" id="act_party_form">
> > >             <field name="name">Parties</field>
> > >             <field name="res_model">party.party</field>
> > >         </record>
> > >         <record model="ir.action.act_window.view"
> > > id="act_party_form_view1">
> > >             <field name="sequence" eval="10"/>
> > >             <field name="view" ref="party_view_tree"/>
> > >             <field name="act_window" ref="act_party_form"/>
> > >         </record>
> > >         <record model="ir.action.act_window.view"
> > > id="act_party_form_view2">
> > >             <field name="sequence" eval="20"/>
> > >             <field name="view" ref="party_view_form"/>
> > >             <field name="act_window" ref="act_party_form"/>
> > >         </record>
> > >
> > > Total: 14 lines
> > >
> > > I think that this section could do more easy coding for newbies:
> > >
> > >         <record model="ir.action.act_window" id="act_party_form">
> > >             <field name="name">Parties</field>
> > >             <field name="res_model">party.party</field>
> > >             <field name="view" ref="party_view_tree"/>
> > >             <field name="view" ref="party_view_form"/>
> > >         </record>
> > >
> > > Total: 6 lines
> >
> > How will you add a 3th views between the tree and the form?
> >
> 
> Ok, good question. Maybe:
> 
>              <field name="view" order="1" ref="party_view_tree"/>
>              <field name="view" order="2" ref="party_view_form"/>
>              <field name="view" order="n" ref="party_view_nnnn"/>

Indeed, we already removed a lot of small shortcuts like this one that
were inherited from OE. It was because at the end they are not flexible
enough. So here the design is as close as possible to the database
record which give us a lot of power.

An other issue with your design is how do you know that a view has been
removed between 2 versions?
I think I can find issues in your design until you will get all the tags
from current design as attributes ;-)

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpezbeZnXeum.pgp
Description: PGP signature

Reply via email to