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/

Attachment: pgp5Mqym1MmJn.pgp
Description: PGP signature

Reply via email to