[trunk]Write from osv_memory to normal object fails with record access error
Bug #865877 reported by
John B
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When trying to write from a wizard to a normal object as non-super user, receive the following error:
AccessError, Write access is restricted to your own records for transient models (except for the super-user)
It looks like somewhere is_transient is being set on the object (e.g. purchase.order), and check_access_rule() in orm tries to make sure whoever created the purchase.order record is writing to it, rather than handling it with the normal access checks.
is_transient should only be set on the osv_memory object.
Relatively simple to recreate using the latest trunk - just create a wizard that writes to any normal object. Let me know if a test module is required.
To post a comment you must log in.
Just to add - an easy test case:
1. Create Manufacturing Order as admin or other user (User1)
2. Login as User2 who has sufficient permissions for manufacturing (User) to write to Manufacturing Orders.
3. Run 'Change Qty' wizard and attempt to save - error comes up
What I noticed, however, is that any change on the MO gives that error even though it isn't a transient model.