تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1427 أدوات العرض

In my module, there is a project.project module in which there is one field object_ids = fields.One2many("domova.object", inverse_name="project_id", string="Object", tracking=True), I tried to make a record rule for this module in which the partner should see only those tasks in which there are objects in which this partner is specified

I wrote this co, but it does not work
I have a working code that does the same thing, but only for the domova.object module

can you help me to understand this? Thanks.

الصورة الرمزية
إهمال
الكاتب

code for domova.object
<record id="domova_partner_self_object_record" model="ir.rule">
<field name="name">Domova partner self object record rules</field>
<field name="model_id" ref="domova.model_domova_object"/>
<field name="domain_force">[('exclusive_partner_id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('domova.domova_partner'))]"/>
</record>
code for project.project
<record id="domova_partner_self_object_project_record" model="ir.rule">
<field name="name">Domova partner self object project record rules</field>
<field name="model_id" ref="domova.model_project_project"/>
<field name="domain_force">[('object_ids.exclusive_partner_id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('domova.domova_partner'))]"/>
</record>

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 15
4149
2
يونيو 15
3710
0
سبتمبر 24
1284
0
يونيو 24
1523
2
مايو 24
9291