Ir al contenido
Menú
Se marcó esta pregunta
6 Respuestas
6277 Vistas

I want to create a group to Accounting with the purpose of make the users that are in that group, let them see only their OWN invoices, created by them, and restrict the rest of the existing invoices that are NOT created by themselves.


I want to apply this to INVOICES and BILLS


How can I do this? I've tried by creating and adding a group to Accounting and adding some Record Rules like [('user_id','=',user.id)] but it only works for invoices, not for bills.


UPDATE: 

The invoices are working, I can only see the invoices that the user creates, but the main problem is that I can see everyone's bills.


This is my group configuration (these are the links of the screenshots) :

https://postimg.cc/nCnYKQ9K
https://postimg.cc/v4BrkFzc
https://postimg.cc/GHzPXhvW
https://postimg.cc/62sC87Nv
https://postimg.cc/xkNKjvBQ
https://postimg.cc/34gmmKKb
https://postimg.cc/K1HPyqqQ


And this is what the user sees:

https://postimg.cc/1fNB3ZF2
https://postimg.cc/gr74p0x3
https://postimg.cc/tZSkYq2Q


Thanks in advance.


Avatar
Descartar
Autor Mejor respuesta

I have found a solution. Maybe it's not the perfect answer for this problem but I hope it works for somebody that haves or will have this issue:


https://postimg.cc/k683Wtz2

https://postimg.cc/gLqCTbYd

https://postimg.cc/tnj0k4G2

https://postimg.cc/qgsHRy2Y

https://postimg.cc/DSz9BNRk

https://postimg.cc/56fdFy3t

https://postimg.cc/jLvV6Tg4


I've created a new group, and applied this rules and right accesses. Doing this you are allowing an specific user only to see the Accounting app, and making him only aviable to see his OWN invoices and bills. And he can read, create, update and delete them.

Avatar
Descartar
Mejor respuesta

Hello,

you can add a `record.rules` with domain filter ['|',('user_id','=',user.id),('user_id','=',False)]

Avatar
Descartar
Autor

Thanks for your answer, I updated the post adding some screenshots, because I'm having troubles with bills.

Mejor respuesta

Hello Gabri, 

I think you have to try this domain in your record rule. 

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

Hope this domain is helpful to you. 

Avatar
Descartar
Autor

Thank you so much for your answer, it is working for invoices, but I don't understand why is not applying aswell for bills (vendor bills). I've added some screenshots to give examples .

Mejor respuesta

Hello,

You should check the access rights/record rules of the user to see if he inherits one from another group for the account.move and account.move.line model.

I had a similar issue with the accounting app where the user told me he still had access to the vendor bills but not to the invoices.

Avatar
Descartar
Mejor respuesta

You can try to put users in the group "Sales: own documents only".  There are several record rules that I think correspond to what you are looking for. 
Maybe you have to create some rules for invoices.

Avatar
Descartar
Mejor respuesta

Has anyone found a solution to this yet? I get the same results, the record rules apply to the invoices but not the vendor bills

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
4
jul 24
3910
0
oct 21
2280
2
may 25
686
3
jun 23
3918
0
jun 23
2185