콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
8206 화면

I using Odoo14,


I have users on my company, there is a cashier and there is an accountant,


I want  an accountant can Confirm and POST customer invoice.

And I want  a cashier don't have access to it (can't confirm and post invoice), but he can do Register Payment, but in the other hand, I also don't want accountant can do Register Payment.

the conclution:

  • Accountant can do Confirm and POST Invoice, but can't do Register Payment
  • Cashier can do Register Payment, but can't do Confirm and POST invoice

am trying to make security group like this:





and trying to inherit account.view_move_form view like this:



but I  can't  see  it  give any effect to Invoice button, I seem  it doesnt changes

the Cashier and and Accountant still look same.


So how to inherit button on a form and  updates  it   groups ?



Thanks,

Tri Nanda

아바타
취소
베스트 답변

For Cashier and Accountant, should assign different User Groups. We can simply solving this issue through frontend while enabling developer mode. Go to Edit View: Form, then you can see the specified button's declaration, add the required group id. 

Eg, 

By this way we can restrict the buttons from different users.

아바타
취소
작성자

Hi Sarath, thank you for your answer.

How to update the assigned groups on the button by code?

Thanks,
Tri Nanda

Hi Nanda, Enable the developer mode, then go to Settings-- Users & companies--- Groups. Export the required group by using boolean "I want to update data (import-compatible export). You have to select the Name filed to export. Thereby one file will download. Inside that file you will get an ID of that particular group. Then that ID you can add it on the code as i said.

작성자 베스트 답변

I solved this problem with add index to the button name, because  I  have  multiple  button  with  same  name , 

the key is add index [1] or [2], etc.. if we have multiple button with same name.


like Waleed Mohsen answer in this thread: 

https://www.odoo.com/id_ID/forum/help-1/how-to-make-button-available-only-for-specific-group-of-users-131117#

아바타
취소
관련 게시물 답글 화면 활동
0
12월 23
1840
0
9월 21
78
1
9월 15
4815
2
5월 24
2799
2
3월 24
1767