Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/页面优化
This commit is contained in:
@@ -86,7 +86,7 @@
|
|||||||
<field name="model">product.template</field>
|
<field name="model">product.template</field>
|
||||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//group[@name='operations']" position="inside">
|
<xpath expr="//group[@name='group_lots_and_weight']" position="after">
|
||||||
<group string="订单规则">
|
<group string="订单规则">
|
||||||
<field name="single_manufacturing" string="单个制造" widget="checkbox"/>
|
<field name="single_manufacturing" string="单个制造" widget="checkbox"/>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
('解除装夹', '解除装夹'),
|
('解除装夹', '解除装夹'),
|
||||||
('切割', '切割')
|
('切割', '切割')
|
||||||
], string="工序类型")
|
], string="工序类型")
|
||||||
|
results = fields.Char('检测结果')
|
||||||
|
|
||||||
@api.onchange('users_ids')
|
@api.onchange('users_ids')
|
||||||
def get_user_permissions(self):
|
def get_user_permissions(self):
|
||||||
@@ -289,16 +290,7 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
self.env['stock.move'].sudo().create(productions._get_moves_finished_values())
|
self.env['stock.move'].sudo().create(productions._get_moves_finished_values())
|
||||||
productions._create_workorder2(self.processing_panel)
|
productions._create_workorder2(self.processing_panel)
|
||||||
else:
|
else:
|
||||||
return {
|
self.results = '合格'
|
||||||
'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',
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# cnc程序获取
|
# cnc程序获取
|
||||||
def fetchCNC(self):
|
def fetchCNC(self):
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
<field name="duration" widget="mrp_timer"
|
<field name="duration" widget="mrp_timer"
|
||||||
attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}"
|
attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}"
|
||||||
sum="real duration"/>
|
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>
|
</group>
|
||||||
|
|
||||||
<!-- <field name="processing_panel" readonly="1" attrs="{'invisible': [('routing_type', 'in', ('获取CNC加工程序','装夹','解除装夹',-->
|
<!-- <field name="processing_panel" readonly="1" attrs="{'invisible': [('routing_type', 'in', ('获取CNC加工程序','装夹','解除装夹',-->
|
||||||
@@ -357,14 +357,16 @@
|
|||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[1]" position="before">
|
<xpath expr="//page[1]" position="before">
|
||||||
|
<field name="results" invisible="1"/>
|
||||||
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","后置三元质量检测")]}'>
|
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","后置三元质量检测")]}'>
|
||||||
<group>
|
<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>
|
</group>
|
||||||
<div class="col-12 col-lg-6 o_setting_box">
|
<div class="col-12 col-lg-6 o_setting_box">
|
||||||
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
<button type="object" class="oe_highlight" name="recreateManufacturingOrWorkerOrder"
|
||||||
string="检测确认"
|
string="检测确认"
|
||||||
attrs='{"invisible": ["|",("state","!=","progress"),("user_permissions","=",False)]}'/>
|
attrs='{"invisible": ["|","|",("state","!=","progress"),("user_permissions","=",False),("results","=","合格")]}'/>
|
||||||
</div>
|
</div>
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
Reference in New Issue
Block a user