This question has been flagged

Am a new odoo developer and have created a module for real estate management system, am stuck in the creation of record rules..

My need is 'I want the tenant to see only his record like his estate contract, his maintenance request etc....'' I have tried many ways to create a record rules for the same but in vain, can anyone please help me for creating the same?

The field name is "x_tname" which is a many2one type and related to res.partner I want the tenant with his name to see only his records...

tried this already : [('x_tname', '=' , user.partner_id.id)]           

[('x_tname', '=' , user.id)]

am using ODOO Community v11, and please help in creating it with the 'frontend' because am not so familiar with the python codes still...



Avatar
Discard
Best Answer

Try the following in your domain_force:

[('x_tname.user_id', '=', user.id)]

I am assuming you have assigned a user to the partner.

Avatar
Discard