2
votes

I tried to set up a record rule for Invoice model in Odoo and the record rule goes like this:

[('bu','in',[g.name for g in user.employee_ids[0].bus_unit1])]

Record rule works fine. Now some user can duplicate the created records of Invoice model, but for some user's duplication of Invoice record is resulting in Access Denied Error.Duplicate Operation of Invoice

Access Denied Error There is read access set for this record rule. Read Access Set

2
Is the a global rule or assigned to any group?CZoellner
Yes. Rule is assigned to multiple groupsShravy
just to make sure, you should check if there's any contraint on the Invoice model to not allow duplication. Such as a primary key constraint. If there is such a constraint, it might be that the user has rights but the underlying error is a unique-key error. Just a thought.Zeeshan Arif
Zeeshan, yes even i feel the same way after you said it. But how can i check for the duplicate unique constraint, I checked in Model constraints under Settings.Shravy

2 Answers

1
votes

I think the two user not same user role.Can duplicate user have create access right and can't duplicate user haven't create access right of invoice model.So you need to give permission for second user for invoice model in ir.model.access.csv file.You can see Setting >> Users >> Groups >> Accounting >> Access Rights.

0
votes

the problem that you duplicate the user , create user from scratch and don't duplicate any user this is make unkno