新增权限审核按钮
This commit is contained in:
@@ -11,6 +11,14 @@ class SfLocation(models.Model):
|
||||
name = fields.Char('Location Name', required=True, size=20)
|
||||
barcode = fields.Char('Barcode', copy=False, size=15)
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
# 仓库类别(selection:库区、库位、货位)
|
||||
# location_type = fields.Selection([
|
||||
# ('库区', '库区'),
|
||||
@@ -500,3 +508,63 @@ class SfProcurementGroup(models.Model):
|
||||
res = Rule.search(expression.AND([[('route_id', 'in', warehouse_routes.ids)], domain]),
|
||||
order='route_sequence, sequence', limit=1)
|
||||
return res
|
||||
|
||||
|
||||
class SfWarehouse(models.Model):
|
||||
_inherit = 'stock.warehouse'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfRule(models.Model):
|
||||
_inherit = 'stock.rule'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfRoute(models.Model):
|
||||
_inherit = 'stock.route'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfPickingType(models.Model):
|
||||
_inherit = 'stock.picking.type'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfProductCategory(models.Model):
|
||||
_inherit = 'product.category'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
Reference in New Issue
Block a user