库存模块日志警告信息处理
This commit is contained in:
@@ -10,7 +10,7 @@ class SfLocation(models.Model):
|
|||||||
|
|
||||||
# 重写字段定义
|
# 重写字段定义
|
||||||
name = fields.Char('Location Name', required=True, size=20)
|
name = fields.Char('Location Name', required=True, size=20)
|
||||||
barcode = fields.Char('Barcode', copy=False, required=True, size=15)
|
barcode = fields.Char('Barcode', copy=False, size=15)
|
||||||
|
|
||||||
# 仓库类别(selection:库区、库位、货位)
|
# 仓库类别(selection:库区、库位、货位)
|
||||||
location_type = fields.Selection([
|
location_type = fields.Selection([
|
||||||
@@ -34,14 +34,14 @@ class SfLocation(models.Model):
|
|||||||
# 产品类别 (关联:product.category)
|
# 产品类别 (关联:product.category)
|
||||||
product_type = fields.Many2many('product.category', string='产品类别')
|
product_type = fields.Many2many('product.category', string='产品类别')
|
||||||
# 货架独有字段:通道、方向、货架高度(m)、货架层数、层数容量
|
# 货架独有字段:通道、方向、货架高度(m)、货架层数、层数容量
|
||||||
channel = fields.Char(string='通道', required=True)
|
channel = fields.Char(string='通道')
|
||||||
direction = fields.Selection([
|
direction = fields.Selection([
|
||||||
('R', 'R'),
|
('R', 'R'),
|
||||||
('L', 'L')
|
('L', 'L')
|
||||||
], string='方向', required=True)
|
], string='方向')
|
||||||
shelf_height = fields.Float(string='货架高度(m)')
|
shelf_height = fields.Float(string='货架高度(m)')
|
||||||
shelf_layer = fields.Integer(string='货架层数', required=True)
|
shelf_layer = fields.Integer(string='货架层数')
|
||||||
layer_capacity = fields.Integer(string='层数容量', required=True)
|
layer_capacity = fields.Integer(string='层数容量')
|
||||||
|
|
||||||
# 货位独有字段:货位状态、产品(关联产品对象)、产品序列号(关联产品序列号对象)
|
# 货位独有字段:货位状态、产品(关联产品对象)、产品序列号(关联产品序列号对象)
|
||||||
location_status = fields.Selection([
|
location_status = fields.Selection([
|
||||||
@@ -54,9 +54,9 @@ class SfLocation(models.Model):
|
|||||||
product_sn_id = fields.Many2one('stock.lot', string='产品序列号')
|
product_sn_id = fields.Many2one('stock.lot', string='产品序列号')
|
||||||
# time_test = fields.Char(string='time')
|
# time_test = fields.Char(string='time')
|
||||||
# 添加SQL约束
|
# 添加SQL约束
|
||||||
_sql_constraints = [
|
# _sql_constraints = [
|
||||||
('name_uniq', 'unique(name)', '位置名称必须唯一!'),
|
# ('name_uniq', 'unique(name)', '位置名称必须唯一!'),
|
||||||
]
|
# ]
|
||||||
|
|
||||||
hide_location_type = fields.Boolean(compute='_compute_hide_what', string='隐藏仓库')
|
hide_location_type = fields.Boolean(compute='_compute_hide_what', string='隐藏仓库')
|
||||||
hide_area = fields.Boolean(compute='_compute_hide_what', string='隐藏库区')
|
hide_area = fields.Boolean(compute='_compute_hide_what', string='隐藏库区')
|
||||||
|
|||||||
Reference in New Issue
Block a user