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

Hello,

I'm encountering an issue in Odoo 17 related to invoice validation.

When a user is assigned to the group "Only Own Documents" group for accounting, the "Validate" button does not appear on invoices and the invoice remains in draft state until I validate it (as I have the validate button). If I give to the same user the right "All documents" then the "Validate" button appear on the invoice.

Could you please help me to allow users with the "Only Own Documents" right group to see and use the "Validate" button, but only for the invoices they are allowed to manage (for example, invoices they created or that are assigned to them).

Any guidance or suggestions would be greatly appreciated!

Thanks in advance for your help.

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

Thanks for the clear steps! This will help a lot in managing invoice access and validation.

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

Hi,

You can use the following code to give the user access to the 'Validate' button.


<xpath expr="//button[@name='action_post']" position="attributes">
<attribute name="groups">sales_team.group_sale_salesman</attribute>
</xpath>


By using the above code, we can change the attribute of a button in any model.


To get the button name, enable the developer mode, bring the cursor to the button, and hover over the name of the particular button.


The user group can be fetched as follows.


Hope it helps

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

Hi,

Thank you, I will try it.

But could you please tell me where should I specify the above code ?

<xpath expr="//button[@name='action_post']" position="attributes">
<attribute name="groups">sales_team.group_sale_salesman</attribute>
</xpath>

ผู้เขียน คำตอบที่ดีที่สุด

Hi  and thank you for your answer.


But I don't see any rule with the name Account Move: only see own documents (account.move)

Should I create a new rule ?

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ม.ค. 23
4713
12
ม.ค. 17
14233
2
เม.ย. 16
4093
1
มี.ค. 15
9194
Hide "validate" button on invoice แก้ไขแล้ว
3
มี.ค. 15
5811