1、禁用超级管理员之外的角色通过库存概览跳转到调拨单界面的调拨单创建按钮,隐藏制造作业类型的单据;2、优化移动历史记录。
This commit is contained in:
@@ -931,13 +931,6 @@ class SfStockMoveLine(models.Model):
|
||||
if not record.destination_location_id.product_id:
|
||||
record.destination_location_id.product_id = record.product_id.id
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
|
||||
records = super(SfStockMoveLine, self).create(vals_list)
|
||||
self.put_shelf_location(records)
|
||||
return records
|
||||
|
||||
|
||||
class SfStockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
@@ -1122,6 +1115,12 @@ class SfPickingType(models.Model):
|
||||
'sf_warehouse.group_sf_stock_manager'
|
||||
)
|
||||
|
||||
def _get_action(self, action_xmlid):
|
||||
action = super(SfPickingType, self)._get_action(action_xmlid)
|
||||
if not self.env.user.has_group('base.group_system'):
|
||||
action['context']['create'] = False
|
||||
return action
|
||||
|
||||
|
||||
class CustomStockMove(models.Model):
|
||||
_name = 'stock.move'
|
||||
|
||||
Reference in New Issue
Block a user