Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to restrict user to access his own customer

By
Vinod Kumar
on 1/19/16, 6:43 AM 650 views

I had created new role and given permission to all tables and created record rule see own customers ['!',('user_id','=',user.id),('user_id','=',False)]

When i login with the new user role i am getting error model res.user access denied

1

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
996
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 1/19/16, 10:10 AM

Dear Vinod,


You need to inherit Customer window action and add domain like below.

[('user_id', '=', uid)]

Best Regards,

Ankit H Gandhi.

Thank you Ankit, your answer solved a part of my issue Can you give me some guidance on how should i proceed to put the same domain on POS customers cuz the debug mode doesn't give the same possibilities on POS screen as on the other views.

GRS
on 3/30/16, 9:40 AM
1

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 1/20/16, 7:30 PM

Do you have an exclamation in the first pair of quotes?  The valid values are | (the vertical bar or pipe character) or & (the ampersand).


Try:

['|',('user_id','=',user.id),('user_id','=',False)]

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 1/19/16, 6:43 AM
Seen: 650 times
Last updated: 3/30/16, 9:42 AM