判断外协工序是否连续有多个外协工序为同一个供应商(产品为表面工艺服务的供应商),

This commit is contained in:
jinling.yang
2023-04-14 17:54:20 +08:00
parent d80b4b6169
commit a5c707bf43
8 changed files with 89 additions and 59 deletions

View File

@@ -15,7 +15,7 @@ class ResProductTemplate(models.Model):
# 模型的长,宽,高,体积,精度,材料
model_name = fields.Char('模型名称')
categ_type = fields.Selection(
[("成品", "成品"), ("胚料", "胚料"), ("原材料", "原材料"), ("表面工艺", "表面工艺"), ("服务", "服务")],
[("成品", "成品"), ("胚料", "胚料"), ("原材料", "原材料"), ("表面工艺", "表面工艺")],
string='产品的类别', related='categ_id.type',
store=True)
model_long = fields.Float('模型长[mm]', digits=(16, 3))

View File

@@ -28,7 +28,7 @@
attrs="{'invisible': [('categ_type', '=', '表面工艺')]}"/>
<field name="server_product_process_parameters_id" string="表面工艺参数"
options="{'no_create': True}"
attrs="{'invisible': ['|',('categ_type', '!=', '服务'),('categ_type', '=', False)]}"/>
attrs="{'invisible': ['|',('categ_type', '!=', '表面工艺'),('categ_type', '=', False)]}"/>
</field>
<xpath expr="//label[@for='volume']" position="before">