Community mailing list archives

community@mail.odoo.com

How to apply domain filter in one2many field

by
Emna Ragheb
- 03/13/2015 04:27:04

Hello community!


I added a boolean field 'active' to 'account_analytic_account' , In all the many2one fields related to the 'account_analytic_account' I wish to get only the list of active analytic accounts, for example when we create an invoice line when we add an analytic_account we should get only the list of active analytic account .... etc


I added this context to the act_window in xml : 

<field name="context">{'search_default_active':1}</field>


but I got this filter only in the menu analytic acoounts


I'm looking for a function to do that instead of inherit all the views wich contain a many2one analytic account fields and add a domain.


Help me please ! 


Thank you