Skip to content
Snippets Groups Projects
Commit 8d2a77d1 authored by adda-odoo's avatar adda-odoo Committed by Touati Djamel (otd)
Browse files

[FIX] purchase_stock: fix unexpected access right issue


Prerequisites -->

1) Login with a user with just Inventory/User access rights
2) Product A with purchase policy set to `on ordered quantities`
3) Product category of A set to `AVCO` costing method

Steps -->

1) Create+confirm a PO with product A and create and confirm vendor bill
2) Switch to Inventory/User user
3) Try to validate picking
4) Access right error

This occurs due to the fact that `Inventory/User` does not have access to s`tock.valuation.layer` or `account.move.line`.

Solution -->

Add sudo to the lines where accesses to SVL and invoice lines are made.

opw-3357028

closes odoo/odoo#129184

Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
parent 574d7847
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment