Thanks! That was exactly the info I was looking for :) I'm mainly trying to create different views of the same objects to display a different set of editable fields based on state. Not sure if my approach is the correct one here.
Best, Elver [email protected] +372 5661 6933 http://memeresearch.com/ skype: elver.loho On 31 August 2010 21:23, Cédric Krier <[email protected]> wrote: > On 31/08/10 20:46 +0300, Elver Loho wrote: >> Hi, >> >> I'm trying to set up a filtered version of an existing treeview using: >> >> <record model="ir.ui.view" id="orderline_confirmed_view_tree"> >> <field name="model">my.orderline</field> >> <field name="type">tree</field> >> <field name="inherit" ref="orderline_view_tree"/> >> <field name="domain">[("status", "=", "1")]</field> >> <field name="arch" type="xml"> >> <![CDATA[ >> <data> >> <xpath expr="/tree" >> position="replace_attributes"> >> <tree string="Confirmed"/> >> </xpath> >> </data> >> ]]> >> </field> >> </record> >> >> For some reason the filtering does not work. I see the view, but it >> shows all orderlines, not just the ones that have a status="1". >> >> What could I be doing wrong? > > The domain on view is not a domain on record but a way to apply or not the > xpath depending of the context. > > What you are looking for is to update the domain of the act_window action. > But it is not a good design to modify existing xml record, it is better to > create a new menu entry with a new act_window. > > -- > 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/ > -- [email protected] mailing list
