0711提交

This commit is contained in:
WEB许何哲\xuhez
2023-07-11 16:00:21 +08:00
parent c440afa435
commit a3760a7d9d
5 changed files with 207 additions and 148 deletions

View File

@@ -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):