库存根据权限增加审核按钮 以及审核状态
This commit is contained in:
@@ -226,6 +226,14 @@ class ShelfLocation(models.Model):
|
||||
name = fields.Char('名称', required=True, size=20)
|
||||
barcode = fields.Char('编码', 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([
|
||||
('货架', '货架'),
|
||||
@@ -568,3 +576,75 @@ class SfProductCategory(models.Model):
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfUomCategory(models.Model):
|
||||
_inherit = 'uom.category'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfBarcodeNomenclature(models.Model):
|
||||
_inherit = 'barcode.nomenclature'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfPutawayRule(models.Model):
|
||||
_inherit = 'stock.putaway.rule'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '同意'),
|
||||
('close', '不同意')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfWarehouseOrderpoint(models.Model):
|
||||
_inherit = 'stock.warehouse.orderpoint'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '同意'),
|
||||
('close', '不同意')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfStockQuant(models.Model):
|
||||
_inherit = 'stock.quant'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '同意'),
|
||||
('close', '不同意')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
|
||||
class SfStockScrap(models.Model):
|
||||
_inherit = 'stock.scrap'
|
||||
|
||||
check_state = fields.Selection([
|
||||
('enable', '启用'),
|
||||
('close', '关闭')
|
||||
], string='审核状态', default='close')
|
||||
|
||||
def action_check(self):
|
||||
self.check_state = 'enable'
|
||||
|
||||
Reference in New Issue
Block a user