Use context to check model and field access
issue4081 review8481002
This commit is contained in:
1 parent
723ecb1b7d
commit
166cd6fa6a
1 file changed
+4
-5
@@ -170,11 +170,10 @@ class Move:
|
||||
|
||||
cost += move_cost_price * Decimal(str(move_qty))
|
||||
|
||||
with Transaction().set_user(0, set_context=True):
|
||||
cls.write([move], {
|
||||
as_qty_field: (
|
||||
(getattr(move, as_qty_field) or 0.0) + move_qty),
|
||||
})
|
||||
cls.write([move], {
|
||||
as_qty_field: (
|
||||
(getattr(move, as_qty_field) or 0.0) + move_qty),
|
||||
})
|
||||
|
||||
if consumed_qty < total_qty:
|
||||
qty = total_qty - consumed_qty
|
||||
|
||||
Reference in new issue
Block a user