Error when warehouse user confirms delivery

Bug #1266480 reported by Ronald Portier (Therp)
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

This error occurs when:

- real time stock accounting is used

- by a user that has no authority to finance (account.period, account.move ..)

When that user goes into an outgoing delivery (probably the same for incoming) and tries the button Deliver, and then Deliver, a window with an error message appears.

This is the error text:

Access Denied

Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:
- Purchases/User
- Accounting & Finance/Financial Manager
- Accounting & Finance/Invoicing & Payments

(Document model: account.period)

The problem is that the method _create_product_valuation_moves in stock.py tries to write records to account.move. Normally a warehouse user does not have any authorizations to account.move.

This might be solved be granting the warehouse users authority to Finance, but that would defeat the whole purpose of authorization.

I think the best solution will be to use the SUPERUSER_ID within the method _create_product_valuation_moves to create the actual moves.

Related branches

description: updated
summary: - Error when wharehouse user confirms delivery
+ Error when warehouse user confirms delivery
description: updated
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I'm removing ocb-addons for now from this bug as there is no proposal.

no longer affects: ocb-addons/7.0
no longer affects: ocb-addons
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.