summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Masereel <pim@odoo.com>2019-08-02 09:30:12 +0000
committerPierre Masereel <pim@odoo.com>2019-08-02 09:33:05 +0000
commit2ef96ee8cc326c76a8bc53216f1d9be98a924d8c (patch)
tree0ff395fc9338b97b279c190e478ca15576e2dec8
parent690f457541063a4e68478c256e4f47ac5de0d315 (diff)
[FIX] stock_account: valuation layer access rights
When we try to validate a pos session without beinig administrator, we don't have access rights on the valuation layer. So we've extended this rev: 7ef11e3c96893dffc1bad93917c6955a38ac6002
-rw-r--r--addons/stock_account/models/product.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/stock_account/models/product.py b/addons/stock_account/models/product.py
index dfc58549e9d..45ae8123186 100644
--- a/addons/stock_account/models/product.py
+++ b/addons/stock_account/models/product.py
@@ -570,6 +570,7 @@ class ProductProduct(models.Model):
self.ensure_one()
candidates = stock_moves\
+ .sudo()\
.mapped('stock_valuation_layer_ids')\
.sorted()
qty_to_take_on_candidates = qty_to_invoice