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

I want to use the user's current company as my criteria for the domain filter.

Is there a way to do it on xml? or in python method? Thanks in advance.

The below code has error

Error: AttributeError: object has no attribute 'company_name'
<record id="action" model="ir.actions.act_window">
<field name="name">Payments</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">modelname</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('company', '=', uid.company_name)]</field>
</record>
الصورة الرمزية
إهمال

Which version of Odoo?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 23
1217
1
نوفمبر 21
4395
0
مايو 21
2573
1
مايو 24
4575
3
مارس 24
1432