-
- Downloads
[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:
Arnold Moyaux (arm) <arm@odoo.com>
Showing
- addons/purchase_stock/models/stock_move.py 3 additions, 3 deletionsaddons/purchase_stock/models/stock_move.py
- addons/purchase_stock/tests/test_average_price.py 38 additions, 0 deletionsaddons/purchase_stock/tests/test_average_price.py
- addons/stock_account/tests/test_anglo_saxon_valuation_reconciliation_common.py 7 additions, 0 deletions...tests/test_anglo_saxon_valuation_reconciliation_common.py
Loading
Please register or sign in to comment