@@ -552,7 +552,7 @@
'default_replacement_effective_length': effective_length,
}"
attrs="{'invisible': [('status', '!=', '0')]}"
- class="btn-primary"
+ class="btn-primary" groups="sf_base.group_sf_mrp_user"
/>
+ attrs="{'invisible': [('status', '!=', '1')]}" groups="sf_base.group_sf_mrp_user" confirm="是否确认撤回换刀申请"/>
+ attrs="{'invisible': [('status', '!=', '2')]}" groups="sf_base.group_sf_mrp_user" confirm="是否确认撤回转移"/>
@@ -630,7 +630,7 @@
'default_replacement_effective_length': effective_length,
}"
attrs="{'invisible': [('status', '!=', '0')]}"
- class="btn-primary"
+ class="btn-primary" groups="sf_base.group_sf_mrp_user"
/>
-
+
@@ -920,9 +920,9 @@
'default_use_tool_time':use_tool_time,
'default_reason_for_applying':reason_for_applying,
}"
- attrs="{'invisible': [('assemble_status', '!=', '0')]}"
+ attrs="{'invisible': [('assemble_status', '!=', '0')]}" groups="sf_base.group_sf_mrp_user"
class="btn-primary"/>
-
@@ -937,7 +937,7 @@
-
-
diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py
index b78ab04c..fb411b4c 100644
--- a/sf_warehouse/models/model.py
+++ b/sf_warehouse/models/model.py
@@ -287,11 +287,11 @@ class ShelfLocation(models.Model):
"""
for record in self:
if record.product_sn_id:
- record.product_id = record.product_sn_id.product_id
- record.location_status = '占用'
+ record.sudo().product_id = record.product_sn_id.product_id
+ record.sudo().location_status = '占用'
else:
- record.product_id = False
- record.location_status = '空闲'
+ record.sudo().product_id = False
+ record.sudo().location_status = '空闲'
@api.depends('location_type')
def _compute_hide_what(self):
@@ -300,12 +300,12 @@ class ShelfLocation(models.Model):
:return:
"""
for record in self:
- record.hide_shelf = False
- record.hide_location = False
+ record.sudo().hide_shelf = False
+ record.sudo().hide_location = False
if record.location_type and record.location_type == '货架':
- record.hide_shelf = True
+ record.sudo().hide_shelf = True
elif record.location_type and record.location_type == '货位':
- record.hide_location = True
+ record.sudo().hide_location = True
else:
pass
diff --git a/sf_warehouse/security/ir.model.access.csv b/sf_warehouse/security/ir.model.access.csv
index 29d3048d..a55f069e 100644
--- a/sf_warehouse/security/ir.model.access.csv
+++ b/sf_warehouse/security/ir.model.access.csv
@@ -96,7 +96,7 @@ access_stock_lot_label_layout_user,lot.label.layout.user,stock.model_lot_label_l
access_stock_replenish_option,stock.replenishment.option,stock.model_stock_replenishment_option,sf_warehouse.group_sf_stock_user,1,1,1,0
access_mrp_production,mrp.production,mrp.model_mrp_production,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_sf_shelf_location_group_plan_dispatch,sf.shelf.location,model_sf_shelf_location,sf_base.group_plan_dispatch,1,1,0,0
+access_sf_shelf_location_group_plan_dispatch,sf.shelf.location,model_sf_shelf_location,sf_base.group_plan_dispatch,1,0,0,0
access_stock_move,stock.move,stock.model_stock_move,sf_base.group_plan_dispatch,1,1,1,0
access_stock_picking,stock.picking,stock.model_stock_picking,sf_base.group_plan_dispatch,1,0,0,0
access_stock_lot_group_plan_dispatch,stock.lot,stock.model_stock_lot,sf_base.group_plan_dispatch,1,0,0,0
diff --git a/sf_warehouse/views/change_stock_move_views.xml b/sf_warehouse/views/change_stock_move_views.xml
index c53fc1bb..443d87b7 100644
--- a/sf_warehouse/views/change_stock_move_views.xml
+++ b/sf_warehouse/views/change_stock_move_views.xml
@@ -73,5 +73,19 @@
+
+ sf.vpicktree
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+