Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
1715 Lượt xem

I am trying to make a rule or situation where a user can only see the invoice they have made. This works



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

But I also want to give a certain user FULL access. I have tried the following


- Make a group without X user and apply record rule to this group

- Remove ALL record rules that have the invoice module 

- Added a custom field that matches X user's ID to the field. 


Not sure what else I can try 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

The access group “Sales / User: Own Documents Only” has a Record Rule  that limits users to only the sales invoices and credit notes they created:

[('move_type',
  'in', ('out_invoice', 'out_refund')), '|', ('invoice_user_id', '=', user.id),
  ('invoice_user_id', '=', False)]

Alongside this, the group “Sales / User: All Documents” has a Record Rule with this domain giving access to all sales invoices and credit notes:

[('move_type',
  'in', ('out_invoice', 'out_refund'))]

There are other Record Rules for account.move) so it does get a bit complicated!



https://odootricks.tips/record-rules/ 

Ảnh đại diện
Huỷ bỏ

Hi Fabian - I updated my answer.

Tác giả

TY! I realized that the other rules messed with the custom rules I set up. I was able to turn those off and set it up as I wanted. Thanks again !!

Câu trả lời hay nhất

Hi, I have tried the same record rule. It works fine, but users cannot open or register payment for some customers.
What could be the reason for this?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 8 25
2642
1
thg 5 25
2660
1
thg 4 25
3656
1
thg 4 25
4512
1
thg 4 25
1980