Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/bug修复
This commit is contained in:
@@ -158,7 +158,38 @@ td.o_required_modifier {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.o_list_view .o_list_table thead {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100000;
|
||||
}
|
||||
//.o_list_view .o_list_table {
|
||||
// height: 1799px !important;
|
||||
//}
|
||||
.table-responsive {
|
||||
overflow: unset;
|
||||
}
|
||||
.o_form_view.o_xxl_form_view .o_form_sheet_bg > .o_form_statusbar {
|
||||
position: sticky !important;
|
||||
top: 0;
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
//图文展示换行及对齐
|
||||
.many2many_flex {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.many2many_flex > div {
|
||||
width: 110px;
|
||||
margin-right: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
div[class="o_content o_component_with_search_panel"] .oe_kanban_color_0 {
|
||||
position: relative;
|
||||
padding: 0 !important;
|
||||
@@ -166,6 +197,7 @@ div[class="o_content o_component_with_search_panel"] .oe_kanban_color_0 {
|
||||
|
||||
div[class="o_content o_component_with_search_panel"] img[name="equipment_image"] {
|
||||
width: 150px !important;
|
||||
height: 150px !important;
|
||||
}
|
||||
|
||||
div[class="o_content o_component_with_search_panel"] .o_kanban_card_content button {
|
||||
@@ -217,3 +249,16 @@ div[class="o_content o_component_with_search_panel"] .show_state span {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .row {
|
||||
position: absolute;
|
||||
top: 55px;
|
||||
right: 263px;
|
||||
}
|
||||
//------------------------------------------
|
||||
|
||||
.test_model > .o_form_label {
|
||||
margin-left: 4px !important;
|
||||
line-height: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
code = fields.Char('机台号')
|
||||
name = fields.Char('名称')
|
||||
knife_type = fields.Selection(
|
||||
[("BT40", "BT40"), ("BT30", "BT30")],
|
||||
[("BT40", "BT40"), ("BT30", "BT30"), ("BT50", "BT50")],
|
||||
default="", string="刀把类型")
|
||||
number_of_knife_library = fields.Integer('刀库数量(把)')
|
||||
rotate_speed = fields.Integer('转速')
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="state_zc" readonly="1"/>
|
||||
<field name="code" readonly="1"/>
|
||||
<field name="state_zc"/>
|
||||
<field name="code"/>
|
||||
|
||||
<field name="equipment_type" invisible="1"/>
|
||||
<field name="brand_id" attrs="{'invisible': [('equipment_type', '!=', '机床')]}"
|
||||
@@ -177,15 +177,19 @@
|
||||
|
||||
</page>
|
||||
|
||||
<page string="图文展示">
|
||||
<page string="加工能力">
|
||||
|
||||
<field name='image_id' widget="custom_many2many_checkboxes">
|
||||
<tree editable="bottom">
|
||||
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="image" widget="image"
|
||||
options="{'size': [100, 100], 'click enlarge': True}"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
|
||||
</page>
|
||||
|
||||
|
||||
@@ -333,12 +337,6 @@
|
||||
<div class="o_kanban_record_bottom state_zc">
|
||||
<field name="technician_user_id"/>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom state_zc"
|
||||
t-attf-class="#{record.state.raw_value == '正常' ? 'font_color_1' : ''}
|
||||
#{record.state.raw_value == '故障' ? 'font_color_2' : ''}
|
||||
#{record.state.raw_value == '不可用' ? 'font_color_3' : ''}">
|
||||
<field name="state"/>
|
||||
</div>
|
||||
<!-- <div class="o_kanban_record_bottom">-->
|
||||
<!-- <field name="factory_id"/>-->
|
||||
<!-- <span> | </span>-->
|
||||
@@ -350,6 +348,12 @@
|
||||
<div t-attf-class="#{record.state.raw_value == '正常' ? 'color_1' : ''}"></div>
|
||||
<div t-attf-class="#{record.state.raw_value == '故障' ? 'color_2' : ''}"></div>
|
||||
<div t-attf-class="#{record.state.raw_value == '不可用' ? 'color_3' : ''}"></div>
|
||||
<p class="o_kanban_record_bottom state_zc"
|
||||
t-attf-class="#{record.state.raw_value == '正常' ? 'font_color_1' : ''}
|
||||
#{record.state.raw_value == '故障' ? 'font_color_2' : ''}
|
||||
#{record.state.raw_value == '不可用' ? 'font_color_3' : ''}">
|
||||
<field name="state"/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
@@ -24,6 +24,26 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_workcenter_view_kanban_inherit_workorder" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.view.kanban.inherit.mrp.workorder</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- Desktop view -->
|
||||
<xpath expr='(//field[@name="name"])[1]' position="after">
|
||||
<field name="equipment_status" />
|
||||
<field name="equipment_image" />
|
||||
</xpath>
|
||||
<xpath expr='(//field[@name="name"])[2]' position="after">
|
||||
<field name="equipment_status" />
|
||||
<field name="equipment_image" widget="image" />
|
||||
</xpath>
|
||||
<xpath expr='(//a[@name="unblock"])' position="after">
|
||||
<div class="czyg">绿色:正常,红色:故障,黄色:下线/暂停</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_workcenter_view_kanban_inherit_workorder" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.view.kanban.inherit.mrp.workorder</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
@@ -65,6 +85,28 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- 继承原有的看板视图 -->
|
||||
<record id="mrp_workcenter_kanban_inherit1" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.kanban.inherit</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//kanban//templates//t" position="inside">
|
||||
<p class="show_state" t-attf-class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record oe_kanban_card oe_kanban_global_click
|
||||
">
|
||||
<div t-attf-class="#{record.equipment_status.raw_value == '正常' ? 'color_1' : ''}"></div>
|
||||
<div t-attf-class="#{record.equipment_status.raw_value == '故障' ? 'color_2' : ''}"></div>
|
||||
<div t-attf-class="#{record.equipment_status.raw_value == '不可用' ? 'color_3' : ''}"></div>
|
||||
<span t-attf-class="#{record.equipment_status.raw_value == '正常' ? 'font_color_1' : ''}
|
||||
#{record.equipment_status.raw_value == '故障' ? 'font_color_2' : ''}
|
||||
#{record.equipment_status.raw_value == '不可用' ? 'font_color_3' : ''}">
|
||||
<field name="equipment_status"/>
|
||||
</span>
|
||||
</p>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- override to change the no content image -->
|
||||
<record id="mrp.action_work_orders" model="ir.actions.act_window">
|
||||
<field name="help" type="html">
|
||||
|
||||
@@ -22,6 +22,17 @@
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="sf_cron8">
|
||||
<field name="name">同步表面工艺类别</field>
|
||||
<field name="model_id" ref="model_sf_production_process_category"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.sync_production_process_category()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="sf_cron3">
|
||||
<field name="name">同步资源库表面工艺</field>
|
||||
<field name="model_id" ref="model_sf_production_process"/>
|
||||
@@ -77,17 +88,6 @@
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="sf_cron8">
|
||||
<field name="name">同步表面工艺类别</field>
|
||||
<field name="model_id" ref="model_sf_production_process_category"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.sync_production_process_category()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="sf_cron9">
|
||||
<field name="name">同步资源库机床型号</field>
|
||||
<field name="model_id" ref="model_sf_machine_tool_type"/>
|
||||
@@ -166,16 +166,16 @@
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="sf_cron15">
|
||||
<field name="name">同步功能刀具型号</field>
|
||||
<field name="model_id" ref="model_sf_functional_cutting_tool"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.sync_functional_cutting_tool()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
<!-- <record model="ir.cron" id="sf_cron15">-->
|
||||
<!-- <field name="name">同步功能刀具型号</field>-->
|
||||
<!-- <field name="model_id" ref="model_sf_functional_cutting_tool"/>-->
|
||||
<!-- <field name="state">code</field>-->
|
||||
<!-- <field name="code">model.sync_functional_cutting_tool()</field>-->
|
||||
<!-- <field name="interval_number">1</field>-->
|
||||
<!-- <field name="interval_type">days</field>-->
|
||||
<!-- <field name="numbercall">-1</field>-->
|
||||
<!-- <field name="doall" eval="False"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record model="ir.cron" id="sf_cron16">
|
||||
<field name="name">同步功能刀具类型</field>
|
||||
@@ -232,14 +232,14 @@
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="sf_functional_fixture">
|
||||
<field name="name">同步功能夹具</field>
|
||||
<field name="model_id" ref="model_sf_functional_fixture"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">model.sync_functional_fixture()</field>
|
||||
<field name="interval_number">1</field>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
<field name="doall" eval="False"/>
|
||||
</record>
|
||||
<!-- <record model="ir.cron" id="sf_functional_fixture">-->
|
||||
<!-- <field name="name">同步功能夹具</field>-->
|
||||
<!-- <field name="model_id" ref="model_sf_functional_fixture"/>-->
|
||||
<!-- <field name="state">code</field>-->
|
||||
<!-- <field name="code">model.sync_functional_fixture()</field>-->
|
||||
<!-- <field name="interval_number">1</field>-->
|
||||
<!-- <field name="interval_type">days</field>-->
|
||||
<!-- <field name="numbercall">-1</field>-->
|
||||
<!-- <field name="doall" eval="False"/>-->
|
||||
<!-- </record>-->
|
||||
</odoo>
|
||||
@@ -39,34 +39,26 @@ class ResConfigSettings(models.TransientModel):
|
||||
_logger.info("同步资源库控制系统")
|
||||
self.env['sf.machine_tool.category'].sync_all_machine_tool_category()
|
||||
_logger.info("同步资源库机床类型")
|
||||
# self.env['sf.production.process.parameter'].sync_all_production_process_parameter()
|
||||
# _logger.info("同步表面工艺参数")
|
||||
_logger.info("同步所有刀具物料...")
|
||||
self.env['sf.production.process.parameter'].sync_all_production_process_parameter()
|
||||
_logger.info("同步表面工艺参数")
|
||||
_logger.info("同步刀具物料")
|
||||
self.env['sf.cutting.tool.material'].sync_all_cutting_tool_material()
|
||||
_logger.info("同步所有刀具物料完成")
|
||||
_logger.info("同步所有刀具类型...")
|
||||
_logger.info("同步刀具类型")
|
||||
self.env['sf.cutting.tool.type'].sync_all_tool_type()
|
||||
_logger.info("同步所有刀具类型完成")
|
||||
_logger.info("同步所有刀具型号...")
|
||||
_logger.info("同步刀具型号")
|
||||
self.env['sf.cutting.tool.model'].sync_all_tool_model()
|
||||
_logger.info("同步所有刀具型号完成")
|
||||
_logger.info("定时同步所有功能刀具类型列表...")
|
||||
_logger.info("同步功能刀具类型")
|
||||
self.env['sf.functional.cutting.tool.model'].sync_all_functional_cutting_tool_model()
|
||||
_logger.info("同步所有功能刀具类型完成")
|
||||
# _logger.info("同步所有功能刀具列表...")
|
||||
# self.env['sf.functional.cutting.tool'].sync_all_functional_cutting_tool()
|
||||
# _logger.info("同步所有功能刀具列表完成")
|
||||
self.env['sf.fixture.material'].sync_all_fixture_material()
|
||||
_logger.info("同步夹具物料")
|
||||
self.env['sf.multi_mounting.type'].sync_all_multi_mounting_type()
|
||||
self.env['sf.fixture.material'].sync_all_fixture_material()
|
||||
_logger.info("同步联装类型")
|
||||
self.env['sf.fixture.model'].sync_all_fixture_model()
|
||||
self.env['sf.multi_mounting.type'].sync_all_multi_mounting_type()
|
||||
_logger.info("同步夹具型号")
|
||||
self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
||||
self.env['sf.fixture.model'].sync_all_fixture_model()
|
||||
_logger.info("同步功能夹具类型")
|
||||
self.env['sf.functional.fixture'].sync_all_functional_fixture()
|
||||
self.env['sf.machine_tool.type'].sync_all_machine_tool_type()
|
||||
self.env['sf.functional.fixture.type'].sync_all_functional_fixture_type()
|
||||
_logger.info("同步资源库机床型号")
|
||||
self.env['sf.machine_tool.type'].sync_all_machine_tool_type()
|
||||
except Exception as e:
|
||||
_logger.info("捕获错误信息:%s" % e)
|
||||
raise ValidationError("数据错误导致同步失败,请联系管理员")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,7 +35,7 @@
|
||||
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"/>
|
||||
<!-- <button string="销售单" name="test_sale_order" type="object" class="oe_highlight"/> -->
|
||||
<!-- <button string="测试流程" name="liucheng_cs" type="object" class="oe_highlight"/> -->
|
||||
<!-- <field name="state" widget="statusbar" statusbar_visible="draft,produce"/> -->
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,done,processing,finished"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
@@ -128,7 +128,7 @@
|
||||
decoration-success="state == 'done'"
|
||||
progress_bar="name"
|
||||
form_view_id="sf_production_plan_form"
|
||||
default_scale="year"
|
||||
default_scale="week"
|
||||
scales="day,week,month,year"
|
||||
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day', 'year': 'month:quarter'}">
|
||||
<field name="shift"/>
|
||||
|
||||
@@ -82,7 +82,7 @@ class QuickEasyOrder(models.Model):
|
||||
# logging.info('create-model_file:%s' % len(vals['model_file']))
|
||||
|
||||
obj = super(QuickEasyOrder, self).create(vals)
|
||||
# self.model_coloring(obj)
|
||||
self.model_coloring(obj)
|
||||
self.distribute_to_factory(obj)
|
||||
obj.state = '待接单'
|
||||
return obj
|
||||
@@ -90,14 +90,14 @@ class QuickEasyOrder(models.Model):
|
||||
# 将attach的datas内容转为glb文件
|
||||
def transition_glb_file(self, report_path, model_code):
|
||||
shapes = read_step_file(report_path)
|
||||
output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl')
|
||||
# output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
||||
# output_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.stl')
|
||||
output_file = os.path.join('/tmp', str(model_code) + '.stl')
|
||||
write_stl_file(shapes, output_file, 'binary', 0.03, 0.5)
|
||||
# 转化为glb
|
||||
output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb')
|
||||
# output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
||||
# output_glb_file = os.path.join('C:/Users/43484/Desktop/机企猫工作文档', str(model_code) + '.glb')
|
||||
output_glb_file = os.path.join('/tmp', str(model_code) + '.glb')
|
||||
util_path = get_resource_path('sf_dlm', 'static/util')
|
||||
cmd = 'python %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file)
|
||||
cmd = 'python3 %s/stl2gltf.py %s %s -b' % (util_path, output_file, output_glb_file)
|
||||
os.system(cmd)
|
||||
# 转base64
|
||||
with open(output_glb_file, 'rb') as fileObj:
|
||||
@@ -122,17 +122,17 @@ class QuickEasyOrder(models.Model):
|
||||
model_code = hashlib.sha1(base64_datas.encode('utf-8')).hexdigest()
|
||||
logging.info("模型编码: %s" % model_code)
|
||||
item.model_file = self.transition_glb_file(report_path, model_code)
|
||||
# ret = self.feature_recognition(report_path, model_code)
|
||||
# logging.info("自动报价返回值: %s" % ret)
|
||||
# boxshape = ret['boxshape'].tolist()
|
||||
# logging.info("自动报价boxshape: %s" % boxshape)
|
||||
# logging.info('自动报价feature_infos:%s' % ret['feature_infos'])
|
||||
# item.model_length = boxshape[0] # 长 单位mm
|
||||
# item.model_width = boxshape[1] # 宽
|
||||
# item.model_height = boxshape[2] # 高
|
||||
# item.model_volume = boxshape[0] * boxshape[1] * boxshape[2]
|
||||
# item.model_feature = json.dumps(ret['feature_infos'], ensure_ascii=False)
|
||||
# self._get_price(item)
|
||||
ret = self.feature_recognition(report_path, model_code)
|
||||
logging.info("自动报价返回值: %s" % ret)
|
||||
boxshape = ret['boxshape'].tolist()
|
||||
logging.info("自动报价boxshape: %s" % boxshape)
|
||||
logging.info('自动报价feature_infos:%s' % ret['feature_infos'])
|
||||
item.model_length = boxshape[0] # 长 单位mm
|
||||
item.model_width = boxshape[1] # 宽
|
||||
item.model_height = boxshape[2] # 高
|
||||
item.model_volume = boxshape[0] * boxshape[1] * boxshape[2]
|
||||
item.model_feature = json.dumps(ret['feature_infos'], ensure_ascii=False)
|
||||
self._get_price(item)
|
||||
else:
|
||||
item.model_file = False
|
||||
item.model_feature = False
|
||||
|
||||
@@ -551,7 +551,7 @@ class MachineTableToolChangingApply(models.Model):
|
||||
|
||||
name = fields.Many2one('maintenance.equipment', string='CNC机床',required=True, readonly=False,
|
||||
group_expand='_read_group_names')
|
||||
machine_table_type_id = fields.Many2one('sf.machine_tool.category', string='机床类型', readonly=True,
|
||||
machine_table_type_id = fields.Many2one('maintenance.equipment.category', string='机床类型', readonly=True,
|
||||
compute='_compute_name')
|
||||
machine_tool_code = fields.Char(string='机台号', invisible=True, readonly=True, compute='_compute_name')
|
||||
cutter_spacing_code = fields.Char(string='刀位号', readonly=False)
|
||||
@@ -595,7 +595,7 @@ class MachineTableToolChangingApply(models.Model):
|
||||
def _compute_name(self):
|
||||
for record in self:
|
||||
if record:
|
||||
record.machine_table_type_id = record.name.machine_tool_category.id
|
||||
record.machine_table_type_id = record.name.category_id.id
|
||||
record.machine_tool_code = record.name.code
|
||||
|
||||
@api.depends('functional_tool_name_id')
|
||||
|
||||
@@ -870,7 +870,7 @@
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="name" readonly="0" placeholder="请选择"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
@@ -879,7 +879,7 @@
|
||||
<field name="machine_tool_code" invisible="True"/>
|
||||
<field name="cutter_spacing_code"/>
|
||||
<field name="functional_tool_code"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="functional_tool_name_id" placeholder="请选择"/>
|
||||
<field name="functional_tool_type_id"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -999,19 +999,19 @@
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="name" readonly="0" placeholder="请输入工单任务编号"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="cam_procedure_code"/>
|
||||
<field name="cam_cutter_spacing_code"/>
|
||||
<field name="machine_table_name_id"/>
|
||||
<field name="machine_table_name_id" placeholder="请选择"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="functional_tool_code"/>
|
||||
<field name="functional_tool_name_id"/>
|
||||
<field name="functional_tool_type_id"/>
|
||||
<field name="functional_tool_name_id" placeholder="请选择"/>
|
||||
<field name="functional_tool_type_id" placeholder="请选择"/>
|
||||
<field name="machine_tool_cutter_spacing_code"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -1027,7 +1027,7 @@
|
||||
<field name="coarse_middle_thin"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="need_knife_time"/>
|
||||
<field name="need_knife_time" placeholder="请选择"/>
|
||||
<field name="required_cutting_time"/>
|
||||
<field name="whether_standard_tool"/>
|
||||
<field name="applicant"/>
|
||||
@@ -1168,12 +1168,12 @@
|
||||
class="oe_highlight" attrs="{'invisible': [('loading_task_source', '!=', '1')]}" />
|
||||
<field name="assemble_status" widget="statusbar" statusbar_visible="0,1,2"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="functional_tool_code" readonly="1"/>
|
||||
|
||||
@@ -139,7 +139,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='整体式刀具型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '整体式刀具')])
|
||||
[('cutting_tool_type', '=', '整体式刀具')])
|
||||
integral_code = fields.Char('整体式刀具序列号', readonly=True,
|
||||
compute='_compute_mrs_cutting_tool_integral_model_ids')
|
||||
integral_name = fields.Char('整体式刀具名称', readonly=True)
|
||||
@@ -147,7 +147,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
# 刀片型号
|
||||
mrs_cutting_tool_blade_model_ids = fields.Many2many('sf.cutting.tool.model', 'sf_functional_tool_assembly_order_id',
|
||||
string='刀片型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀片')])
|
||||
[('cutting_tool_type', '=', '刀片')])
|
||||
blade_code = fields.Char('刀片序列号', readonly=True, compute='_compute_mrs_cutting_tool_blade_model_ids')
|
||||
blade_name = fields.Char('刀片名称', readonly=True)
|
||||
sf_tool_brand_id_2 = fields.Many2one('sf.machine.brand', '刀片品牌', readonly=True)
|
||||
@@ -155,7 +155,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterbar_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='刀杆型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀杆')])
|
||||
[('cutting_tool_type', '=', '刀杆')])
|
||||
bar_code = fields.Char('刀杆序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterbar_model_ids')
|
||||
bar_name = fields.Char('刀杆名称', readonly=True)
|
||||
sf_tool_brand_id_3 = fields.Many2one('sf.machine.brand', '刀杆品牌', readonly=True)
|
||||
@@ -163,7 +163,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterpad_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='刀盘型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀盘')])
|
||||
[('cutting_tool_type', '=', '刀盘')])
|
||||
pad_code = fields.Char('刀盘序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterpad_model_ids')
|
||||
pad_name = fields.Char('刀盘名称', readonly=True)
|
||||
sf_tool_brand_id_4 = fields.Many2one('sf.machine.brand', '刀盘品牌', readonly=True)
|
||||
@@ -172,7 +172,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterhandle_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='刀柄型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀柄')])
|
||||
[('cutting_tool_type', '=', '刀柄')])
|
||||
handle_code = fields.Char('刀柄序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterhandle_model_ids')
|
||||
handle_name = fields.Char('刀柄名称', readonly=True)
|
||||
sf_tool_brand_id_5 = fields.Many2one('sf.machine.brand', '刀柄品牌', readonly=True)
|
||||
@@ -180,7 +180,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
mrs_cutting_tool_cutterhead_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'sf_functional_tool_assembly_order_id',
|
||||
string='夹头型号', readonly=False, domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '夹头')])
|
||||
[('cutting_tool_type', '=', '夹头')])
|
||||
chuck_code = fields.Char('夹头序列号', readonly=True, compute='_compute_mrs_cutting_tool_cutterhead_model_ids')
|
||||
chuck_name = fields.Char('夹头名称', readonly=True)
|
||||
sf_tool_brand_id_6 = fields.Many2one('sf.machine.brand', '夹头品牌', readonly=True)
|
||||
@@ -201,7 +201,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.integral_code = val.code
|
||||
self.integral_name = val.name
|
||||
self.sf_tool_brand_id_1 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_1 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_blade_model_ids')
|
||||
def _compute_mrs_cutting_tool_blade_model_ids(self):
|
||||
@@ -211,7 +211,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.blade_code = val.code
|
||||
self.blade_name = val.name
|
||||
self.sf_tool_brand_id_2 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_2 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterbar_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterbar_model_ids(self):
|
||||
@@ -221,7 +221,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.bar_code = val.code
|
||||
self.bar_name = val.name
|
||||
self.sf_tool_brand_id_3 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_3 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterpad_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterpad_model_ids(self):
|
||||
@@ -231,7 +231,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.pad_code = val.code
|
||||
self.pad_name = val.name
|
||||
self.sf_tool_brand_id_4 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_4 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterhandle_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterhandle_model_ids(self):
|
||||
@@ -241,7 +241,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.handle_code = val.code
|
||||
self.handle_name = val.name
|
||||
self.sf_tool_brand_id_5 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_5 = val.brand_id.id
|
||||
|
||||
@api.depends('mrs_cutting_tool_cutterhead_model_ids')
|
||||
def _compute_mrs_cutting_tool_cutterhead_model_ids(self):
|
||||
@@ -251,7 +251,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
if val:
|
||||
self.chuck_code = val.code
|
||||
self.chuck_name = val.name
|
||||
self.sf_tool_brand_id_6 = val.mrs_machine_brand_id.id
|
||||
self.sf_tool_brand_id_6 = val.brand_id.id
|
||||
|
||||
def functional_tool_assembly(self):
|
||||
"""
|
||||
|
||||
@@ -23,15 +23,15 @@
|
||||
</group>
|
||||
<group string="功能刀具信息">
|
||||
<group>
|
||||
<field name="replacement_tool_name_id"/>
|
||||
<field name="replacement_tool_name_id" placeholder="请选择"/>
|
||||
<field name="replacement_tool_type_id"/>
|
||||
<field name="replacement_tool_coarse_middle_thin"/>
|
||||
<field name="replacement_tool_coarse_middle_thin" placeholder="请选择"/>
|
||||
<field name="applicant"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="replacement_tool_code"/>
|
||||
<field name="used_tool_time"/>
|
||||
<field name="new_former"/>
|
||||
<field name="used_tool_time" placeholder="请选择"/>
|
||||
<field name="new_former" placeholder="请选择"/>
|
||||
<field name="reason_for_applying"/>
|
||||
|
||||
</group>
|
||||
|
||||
@@ -635,7 +635,7 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
|
||||
const focusDate = this.state.focusDate;
|
||||
switch (this.state.scale) {
|
||||
case 'day':
|
||||
return focusDate.format('dddd, MMMM DD, YYYY');
|
||||
return focusDate.format('YYYY MMMM DD dddd');
|
||||
case 'week':
|
||||
// const dateStart = focusDate.clone().startOf('week').format('DD MMMM YYYY');
|
||||
const dateStart = focusDate.clone().startOf('week').format('YYYY MMMM DD ');
|
||||
|
||||
Reference in New Issue
Block a user