mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[10.0][FIX] stock_inventory_discrepancy: Launch wizard as current user
This commit is contained in:
BIN
stock_inventory_discrepancy/static/description/icon.png
Normal file
BIN
stock_inventory_discrepancy/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -162,11 +162,11 @@ class TestInventoryDiscrepancy(TransactionCase):
|
||||
"""Test if a user error raises when a stock user tries to update the
|
||||
qty for a product and the correction is a discrepancy over the
|
||||
threshold."""
|
||||
upd_qty = self.obj_upd_qty_wizard.create({
|
||||
upd_qty = self.obj_upd_qty_wizard.sudo(self.user).create({
|
||||
'product_id': self.product1.id,
|
||||
'product_tmpl_id': self.product1.product_tmpl_id.id,
|
||||
'new_quantity': 10.0,
|
||||
'location_id': self.test_loc.id,
|
||||
})
|
||||
with self.assertRaises(UserError):
|
||||
upd_qty.sudo(self.user).change_product_qty()
|
||||
upd_qty.change_product_qty()
|
||||
|
||||
Reference in New Issue
Block a user