Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1491 มุมมอง

I searched and worked like this but it dosn't work correclty 

id="account_move_see_all_only" model="ir.rule">
name="name">See Only His Invoices
name="model_id" ref="model_account_move"/>
name="domain_force">`['|',('user_id','=',user.id),('user_id','=',False)]`
name="groups" eval="[(4, ref('account.group_account_invoice'))]"/>

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi   Nasrat Nasrati ,

To ensure proper functionality of the access rule, please make sure that the 'user_id' field is set for all invoice records. If a record does not have a 'user_id' set, it will not be filtered and will be visible to all users according to the domain you have specified.

Additionally, ensure that there are no conflicting record rules or groups that could interfere with the intended record rule.

Hope it helps,
Kiran K

อวตาร
ละทิ้ง
ผู้เขียน

So thanks very much dear developer

คำตอบที่ดีที่สุด

Hi,

This domain force implies that the user can see his records and also the records where no user is assigned. You can try giving the first condition alone to restrict the view to only users assigned with user id.

Regards

อวตาร
ละทิ้ง
ผู้เขียน

thanks dear develper