Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化制造功能
This commit is contained in:
@@ -324,4 +324,4 @@ def unlink(self):
|
||||
|
||||
|
||||
BaseModel._create = _create
|
||||
BaseModel.unlink = unlink
|
||||
# BaseModel.unlink = unlink
|
||||
@@ -96,7 +96,7 @@ class MrsProductionProcess(models.Model):
|
||||
# workcenter_ids = fields.Many2many('mrp.workcenter', 'rel_workcenter_process', required=True)
|
||||
processing_day = fields.Float('加工天数/d')
|
||||
travel_day = fields.Float('路途天数/d')
|
||||
|
||||
sequence = fields.Integer('排序')
|
||||
|
||||
# class MrsProcessingTechnology(models.Model):
|
||||
# _name = 'sf.processing.technology'
|
||||
@@ -148,6 +148,7 @@ class MrsProductionProcessParameter(models.Model):
|
||||
processing_day = fields.Float('加工天数/d')
|
||||
travel_day = fields.Float('路途天数/d')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
processing_mm = fields.Char('加工厚度/mm')
|
||||
|
||||
def name_get(self):
|
||||
result = []
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<record model="ir.ui.view" id="mrs_production_process_parameter_form">
|
||||
<field name="model">sf.production.process.parameter</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="表面工艺可选参数" create="0" delete="0">
|
||||
<form string="表面工艺可选参数" create="0" delete="0" >
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
@@ -33,11 +33,12 @@
|
||||
<group>
|
||||
<field name="processing_day" readonly="1"/>
|
||||
<field name="travel_day" readonly="1"/>
|
||||
<field name="processing_mm" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="适用材料">
|
||||
<field name="materials_model_ids"></field>
|
||||
<field name="materials_model_ids" readonly="1"></field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
@@ -52,7 +53,7 @@
|
||||
<search>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
<field name="name" string="名称" filter_domain="[('name','ilike',self)]"/>
|
||||
<field name="code" string="编码" filter_domain="[('codeNum','ilike',self)]"/>
|
||||
<field name="code" string="编码" filter_domain="[('code','ilike',self)]"/>
|
||||
<searchpanel class="account_root">
|
||||
<field name="process_id" icon="fa-filter"/>
|
||||
</searchpanel>
|
||||
@@ -140,7 +141,7 @@
|
||||
<field name="model">sf.production.process.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="表面工艺类别" default_order="sequence, id" create="0" edit="0" delete="1">
|
||||
<field name="sequence" widget="handle" string="序号"/>
|
||||
<field name="sequence" widget="handle" string="序号" readonly="1"/>
|
||||
<field name="code"/>
|
||||
<field name="name" string="名称"/>
|
||||
</tree>
|
||||
@@ -163,7 +164,8 @@
|
||||
<record model="ir.ui.view" id="sf_production_process_tree">
|
||||
<field name="model">sf.production.process</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="表面工艺" create="0" edit="0" delete="1">
|
||||
<tree string="表面工艺" create="0" edit="0" delete="0">
|
||||
<field name="sequence" widget="handle" string="序号" readonly="1"/>
|
||||
<field name="code"/>
|
||||
<field name="name" string="名称"/>
|
||||
<field name="remark"/>
|
||||
@@ -174,7 +176,7 @@
|
||||
<record model="ir.ui.view" id="sf_production_process_form">
|
||||
<field name="model">sf.production.process</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="表面工艺" create="0" edit="1" delete="1">
|
||||
<form string="表面工艺" create="0" delete="0">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
@@ -192,11 +194,11 @@
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="可选参数">
|
||||
<field name="parameter_ids">
|
||||
<tree force_save="1">
|
||||
<page string="可选参数" >
|
||||
<field name="parameter_ids" >
|
||||
<tree force_save="1" create="0">
|
||||
<field name="code" readonly="1" force_save="1"/>
|
||||
<field name="name"/>
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="gain_way"/>
|
||||
<field name='process_id' default="default"/>
|
||||
</tree>
|
||||
|
||||
@@ -31,7 +31,7 @@ class StatusChange(models.Model):
|
||||
res = super(StatusChange, self).action_confirm()
|
||||
|
||||
# 原有方法执行后,进行额外的操作(如调用外部API)
|
||||
process_start_time = str(datetime.now())
|
||||
process_start_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
json1 = {
|
||||
'params': {
|
||||
|
||||
@@ -329,6 +329,7 @@ class sfProductionProcess(models.Model):
|
||||
production_process.processing_day = item['processing_day']
|
||||
production_process.travel_day = item['travel_day']
|
||||
production_process.active = item['active']
|
||||
production_process.sequence = item['sequence']
|
||||
else:
|
||||
self.create({
|
||||
"name": item['name'],
|
||||
@@ -338,6 +339,7 @@ class sfProductionProcess(models.Model):
|
||||
"processing_day": item['processing_day'],
|
||||
"travel_day": item['travel_day'],
|
||||
"active": item['active'],
|
||||
"sequence": item['sequence']
|
||||
})
|
||||
else:
|
||||
raise ValidationError("表面工艺认证未通过")
|
||||
@@ -365,6 +367,7 @@ class sfProductionProcess(models.Model):
|
||||
"processing_day": item['processing_day'],
|
||||
"travel_day": item['travel_day'],
|
||||
"active": item['active'],
|
||||
"sequence": item['sequence']
|
||||
})
|
||||
else:
|
||||
production_process.name = item['name']
|
||||
@@ -373,6 +376,7 @@ class sfProductionProcess(models.Model):
|
||||
production_process.processing_day = item['processing_day']
|
||||
production_process.travel_day = item['travel_day']
|
||||
production_process.active = item['active']
|
||||
production_process.sequence = item['sequence']
|
||||
else:
|
||||
raise ValidationError("表面工艺认证未通过")
|
||||
|
||||
@@ -1088,6 +1092,7 @@ class sfProductionProcessParameter(models.Model):
|
||||
production_process_parameter.process_id = process.id
|
||||
production_process_parameter.materials_model_ids = self.env['sf.materials.model'].search(
|
||||
[('materials_no', 'in', item['materials_model_ids_codes'])])
|
||||
production_process_parameter.processing_mm = item['processing_mm']
|
||||
else:
|
||||
self.create({
|
||||
"name": item['name'],
|
||||
@@ -1099,6 +1104,7 @@ class sfProductionProcessParameter(models.Model):
|
||||
"process_id": process.id,
|
||||
"materials_model_ids": self.env['sf.materials.model'].search(
|
||||
[('materials_no', 'in', item['materials_model_ids_codes'])]),
|
||||
"processing_mm": item['processing_mm']
|
||||
})
|
||||
else:
|
||||
raise ValidationError("表面工艺可选参数认证未通过") # 定时同步表面工艺
|
||||
@@ -1129,6 +1135,7 @@ class sfProductionProcessParameter(models.Model):
|
||||
"process_id": process.id,
|
||||
'materials_model_ids': self.env['sf.materials.model'].search(
|
||||
[('materials_no', 'in', item['materials_model_ids_codes'])]),
|
||||
'processing_mm': item['processing_mm']
|
||||
})
|
||||
else:
|
||||
production_process_parameter.name = item['name']
|
||||
@@ -1139,6 +1146,7 @@ class sfProductionProcessParameter(models.Model):
|
||||
production_process_parameter.materials_model_ids = self.env['sf.materials.model'].search(
|
||||
[('materials_no', 'in', item['materials_model_ids_codes'])])
|
||||
production_process_parameter.active = item['active']
|
||||
production_process_parameter.processing_mm = item['processing_mm']
|
||||
else:
|
||||
raise ValidationError("表面工艺可选参数认证未通过")
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&','&',('check_status',
|
||||
'=', 'approved'),('state', 'in', ['sale','cancel']),('delivery_status', '!=', False)]}
|
||||
</attribute>
|
||||
<attribute name="string">拒绝接单</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_draft']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
|
||||
@@ -842,21 +842,21 @@
|
||||
<group string="刀柄" attrs="{'invisible': [('handle_product_id', '=', False)]}"
|
||||
col="1">
|
||||
<group attrs="{'invisible': [('dismantle_cause', 'not in', ['寿命到期报废','崩刀报废'])]}">
|
||||
<group col="3">
|
||||
<!-- <group col="3">-->
|
||||
<group>
|
||||
<field name="scrap_boolean" string="是否报废"/>
|
||||
</group>
|
||||
<group></group>
|
||||
<group>
|
||||
<button string="报废" name="tool_scrap" type="object"
|
||||
class="btn-primary" confirm="是否确认报废刀柄"
|
||||
attrs="{'invisible': [('scrap_boolean', '=', True)]}"/>
|
||||
<button string="取消" name="tool_no_scrap" type="object"
|
||||
class="btn-primary" confirm="是否取消报废刀柄"
|
||||
attrs="{'invisible': [('scrap_boolean', '=', False)]}"/>
|
||||
<group></group>
|
||||
</group>
|
||||
<field name="scrap_boolean" string="是否报废" readonly="0"/>
|
||||
</group>
|
||||
<!-- <group></group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <button string="报废" name="tool_scrap" type="object"-->
|
||||
<!-- class="btn-primary" confirm="是否确认报废刀柄"-->
|
||||
<!-- attrs="{'invisible': [('scrap_boolean', '=', True)]}"/>-->
|
||||
<!-- <button string="取消" name="tool_no_scrap" type="object"-->
|
||||
<!-- class="btn-primary" confirm="是否取消报废刀柄"-->
|
||||
<!-- attrs="{'invisible': [('scrap_boolean', '=', False)]}"/>-->
|
||||
<!-- <group></group>-->
|
||||
<!-- </group>-->
|
||||
<!-- </group>-->
|
||||
</group>
|
||||
<group>
|
||||
<field name="handle_rfid" string="Rfid"/>
|
||||
|
||||
Reference in New Issue
Block a user