I wanted to set the domain criteria dynamically on the window action (ir.actions.act_window) for specific user.
Note: I don't want to use any Security Rules on the object, though it gives the result what am looking for, but it is a hindrance in couple of places wherein it fails to perform my internal functionality.
In other words, User should not have visual access to couple of records, but should be available to perform the internal actions.
Best Example, I can take is Partners:
Under "Contacts" menu, Both Supplier & Customer contacts are been shown.
Now I want to filter the contacts which are shown in that Contact menu according to the User.
Say User A (belonging to SalesGroup) should access to view Customer Contacts in that menu, User B (belonging to PurchaseGroup) should be able to see only Suppliers in that menu.
But this should not affect Sale/Purchase Contacts w.r.t Sale/Purchase orders.
Any help appreciated.
please post code , you have done so far