0711提交
This commit is contained in:
@@ -53,7 +53,7 @@ class SfLocation(models.Model):
|
||||
# product_id = fields.Many2one('product.template', string='产品')
|
||||
product_id = fields.Many2one('product.product', string='产品', compute='_compute_product_id', readonly=True)
|
||||
product_sn_id = fields.Many2one('stock.lot', string='产品序列号')
|
||||
|
||||
time_test = fields.Char(string='time')
|
||||
# 添加SQL约束
|
||||
_sql_constraints = [
|
||||
('name_uniq', 'unique(name)', '位置名称必须唯一!'),
|
||||
@@ -90,7 +90,7 @@ class SfLocation(models.Model):
|
||||
record.location_status = '占用'
|
||||
else:
|
||||
record.product_id = False
|
||||
record.location_status = '空闲'
|
||||
# record.location_status = '空闲'
|
||||
|
||||
@api.depends('location_type')
|
||||
def _compute_hide_what(self):
|
||||
|
||||
Reference in New Issue
Block a user