I need to add a default filter, for the tree view of my module.
I saw some code example in openerp, like this one:
<filter
string="Partner"
icon="terp-partner"
domain="[]"
context="{'group_by':'partner_id'}"
/>
This one in the purchase
module, grouped by partner_id
, as an example.
Now, I have a custom module, which I need to have a 'default' filter when you click on its menu.
And this filter must show all the records which aren't 'expired', or that hasn't passed the actual date when I'm browsing the records in the module.
I have this field in my custom module:
'Fecha_de_Vence': fields.date(
'Fecha de Vencimiento',
required=True,
select=True,
),
This is the field I need to take as a filter for all the records in this module.
Right now, in the 'advanced search' I can put for example Fecha de Vencimiento
not more than actual date
, well, I need to have this as a 'default' filter.
Anyone could shed some light in how to get this by default in openerp's xml view?