This question has been flagged

I using Odoo14,


I want to create my own web portal using my custom module. I look at account module code,

I trying to create similiar code on the account/controllers/portal.py and also try to apply similiar template code on the account/views/account_portal_templates.xml ,

now I get similliar interface on custom portal (Student Course  portal) with the account module portal:

But the one thing that unpected as I want is:

I also get other user data inside my custom portal (eg.  the other user invoices also showing , not only the logged user invoice)

In the above screenshot, the first record is the other user data, and the second record is related to current logged user.


The things that I want is, I want the showing invoices just related to the current logged user (user onw invoices) and restrict all invoices that not related to the logged user .


How to apply that?, I look to the account/conttrolers code on Odoo14, but still don't now which code to apply that things..?


Please, any help, source or tutorial how to do that will be very thanks,


Thanks,

Tri Nanda

Avatar
Discard
Author Best Answer

I solved this by applying the code from account/security/account_security.xml


and here is the adjustmen on my custom module :


Thanks for all who have help me,

Tri Nanda

Avatar
Discard