Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
3871 Widoki

I don't want some of my accountant to see my vendor bills (journal) which include my product cost price.

But I still have to give them access to sale journal and others.

Removing access to menu view does not work because they can still view everything by viewing Accounting > Sales > and use filter features to see purchase entries. https://imgur.com/a/16dANkw

Awatar
Odrzuć
Najlepsza odpowiedź

Should be possible with Record Rules, but it could get quite complex to test!

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

You could use a domain like this to have access to sales journal entries only: 

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

or exclude Vendor Bills and Vendor Credit Notes

[('type', 'not in', ('in_invoice', 'in_refund'))]

Or you could add those same domains to the Windows Action for the menu options so that even if the user removes the filter they still wouldn't be able to see Vendor Bills.

This image has an empty alt attribute; its file name is windows-action-domain.jpg

 

EDIT: The above domains are for journal entries [account.move].  Journal items are on account.move.line so will be different:

[["move_id.journal_id.type","=","sale"]]

more information here.


Also, you might want to check where else the accountant may be able to view Journal Entries or Journal Items!


Awatar
Odrzuć
Autor

This happen when i try last method. :(

https://imgur.com/a/jL45oVM

Autor

all 3 method not working in odoo 13 community windows 10

I hadn't noticed that you are looking at journal items rather than journal entries, so the domain is slightly different: [["move_id.journal_id.type","=","sale"]]

The simplest way to find out what you need in the domain is to create a user-defined filter, and then review it in the Settings. This is explained here: https://odootricks.tips/domain-in-odoo/