合并dev
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='operations']" position="inside">
|
||||
<xpath expr="//group[@name='group_lots_and_weight']" position="after">
|
||||
<group string="订单规则">
|
||||
<field name="single_manufacturing" string="单个制造" widget="checkbox"/>
|
||||
</group>
|
||||
|
||||
@@ -31,6 +31,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
('解除装夹', '解除装夹'),
|
||||
('切割', '切割')
|
||||
], string="工序类型")
|
||||
results = fields.Char('检测结果')
|
||||
|
||||
@api.onchange('users_ids')
|
||||
def get_user_permissions(self):
|
||||
@@ -289,16 +290,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
self.env['stock.move'].sudo().create(productions._get_moves_finished_values())
|
||||
productions._create_workorder2(self.processing_panel)
|
||||
else:
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': '工单详情',
|
||||
'res_model': 'mrp.workorder',
|
||||
'view_mode': 'tree',
|
||||
'context': {'active_id': self.id},
|
||||
'domain': [('state', 'not in', ['done', 'cancel', 'waiting', 'pending'])],
|
||||
'target': 'current',
|
||||
|
||||
}
|
||||
self.results = '合格'
|
||||
|
||||
# cnc程序获取
|
||||
def fetchCNC(self):
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<field name="duration" widget="mrp_timer"
|
||||
attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}"
|
||||
sum="real duration"/>
|
||||
<field name="processing_panel" readonly="1" attrs='{"invisible": [("routing_type","=","切割")]}'/>
|
||||
<field name="processing_panel" readonly="1" attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
|
||||
</group>
|
||||
|
||||
<!-- <field name="processing_panel" readonly="1" attrs="{'invisible': [('routing_type', 'in', ('获取CNC加工程序','装夹','解除装夹',-->
|
||||
@@ -357,14 +357,16 @@
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<field name="results" invisible="1"/>
|
||||
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","后置三元质量检测")]}'>
|
||||
<group>
|
||||
<field name="test_results" widget="selection"/>
|
||||
<field name="test_results" widget="selection" attrs='{"invisible":[("results","!=",False)]}'/>
|
||||
<field name="results" readonly="1" attrs='{"invisible":[("results","!=","合格")]}'/>
|
||||
</group>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
||||
string="检测确认"
|
||||
attrs='{"invisible": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>
|
||||
attrs='{"invisible": ["|","|",("state","!=","progress"),("user_permissions","=",False),("results","=","合格")]}'/>
|
||||
</div>
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user