The problem I'm about to describe I already solve it but in localhost:8069->Settings->Security->Rules. But, what I really want is to give this rule in code..maybe in XML code?
The following rule "([('employees_id.user_id','=',user.id)])", works like a charm in 'Wizard mode', but I want it on XML because it's more dynamic.
<record model="ir.ui.view" id="classA_tree">
<field name="name">tree view</field>
<field name="model">classA.classA</field>
<field name="type">tree</field>
<field name="domain">[('employees_id.user_id','=',user.id)]</field>
<field name="arch" type="xml">
<tree string="jobsopen tree">
<field name="status"/>
<field name="the_name"/>
</tree>
</field>
</record>
Just to be sure, I'm currently restricting users for viewing certain menus of my module, they cannot create in this "tree" any contact, they can only view it. I tried the XML above, but without success.