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

Hello I'm trying to restrict the users to see only his own invoices

아바타
취소
베스트 답변

Hi,

You can set the domain for account.move model
['|',('create_uid','=',user.id),('message_partner_ids', 'in', [user.partner_id.id])]

아바타
취소
베스트 답변

you can apply record rules. Record rules allow you to define domain filters to limit the records visible to specific users or user groups. Here's how you can implement this:

  1. Go to the Odoo user interface and navigate to Settings > Technical > Security > Record Rules.

  2. Create a new record rule by clicking on the "Create" button.

  3. In the record rule form, provide a name and optionally a description for the rule.

  4. Set the Object field to "Invoices" or the appropriate model you are working with.

  5. In the Domain field, define the domain filter to restrict the invoices. The domain should ensure that only the invoices belonging to the current user are visible. For example, you can use the user_id field to filter invoices based on the current user. The domain expression would look like:

[('user_id', '=', user.id)]

  1. Replace user_id with the appropriate field name in your invoice model.

  2. Save the record rule.

  3. Assign the record rule to the appropriate user group(s) by adding the group(s) to the Groups field in the record rule form.

  4. Save the record rule.

Now, when users belonging to the assigned group(s) access the invoices, they will only see their own invoices based on the record rule's domain filter.

아바타
취소
베스트 답변

Hi,

To restrict users to see only his own invoice here is a related forum which satisfies your requirements:https://www.odoo.com/sl_SI/forum/help-1/updated-make-users-see-only-their-own-invoices-and-bills-198372

Hope it helps

아바타
취소
베스트 답변

Hello,

You can set the domain or record rule for account.move model.

[('create_uid', '=', user.id)]

아바타
취소
작성자

its not work sorry

Hello,

Please describe me what you done exactly.

작성자

model : account.model_account_move ,
force domain : [('create_uid', '=', user.id)]
its not work

관련 게시물 답글 화면 활동
2
8월 25
2751
3
2월 25
3958
0
5월 24
46
1
4월 24
3596
2
9월 23
7289