Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4 Antwoorden
3879 Weergaven

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

Avatar
Annuleer
Beste antwoord

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!


Avatar
Annuleer
Auteur

This happen when i try last method. :(

https://imgur.com/a/jL45oVM

Auteur

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/