I am trying to apply some filters in my tree view. I have these this XML:
<record model="ir.ui.view" id="view_generic_request_search">
<field name="name">generic_request.search</field>
<field name="model">generic.request</field>
<field name="arch" type="xml">
<search string="Search Request">
<filter icon="terp-mail-message-new" string="My Requests" name="my_requests_filter" domain="[('requestor','=',user.id)]"}"/>
<filter icon="terp-mail-message-new" string="Requests I'm responsible" name="request_im_responsible_filter" domain="[('responsible_name','=',user.id)]" />
<filter icon="terp-mail-message-new" string="Requests I own" name="requests_i_own_filter" domain="[('owner','=',user.id)]" />
<separator />
<filter icon="terp-mail-message-new" string="Denied Requests" name="denied_requests_filter" domain="[('state','=','denied')]"/>
<filter icon="terp-mail-message-new" string="Authorized Requests" name="authorized_requests_filter" domain="[('state','=','authorized')]"/>
<filter icon="terp-mail-message-new" string="Confirmed Requests" name="confirmed_requests_filter" domain="[('state','=','confirmed')]"/>
<separator/>
<group expand="0" string="Group By...">
<filter string="Requested by" domain="[]" context="{'group_by' : 'requestor'}" />
<filter string="Responsible person" domain="[]" context="{'group_by' : 'responsible_name'}" />
<filter string="Status" domain="[]" context="{'group_by': 'state'}"/>
</group>
</search>
</field>
</record>
All filters and groups by are working fine, except the 3 based on user.id (ex. <filter icon="terp-mail-message-new" string="My Requests" name="my_requests_filter" domain="[('requestor','=',user.id)]"}"/> )
I get diffent error, on different browsers:
Chrome & IE
Uncaught TypeError: Cannot read property 'length' of undefined
http://myserveraddress:8069/web/webclient/js?db=may_9:3256
Firefox:
TypeError: results.group_by is undefined
http://myserveraddress:8069/web/webclient/js?db=may_9:3256
I tryed to add context="{'group_by' : 'requestor'}", just in case, but I get the same error! Any ideia of what I'm missing here?