Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造代码优化

# Conflicts:
#	sf_manufacturing/models/mrp_production.py
#	sf_manufacturing/views/mrp_workorder_view.xml
This commit is contained in:
mgw
2024-04-23 10:56:57 +08:00
39 changed files with 713 additions and 260 deletions

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- agv站点 -->
<record id="view_agv_site_tree" model="ir.ui.view">
<field name="name">agv站点</field>
<field name="model">sf.agv.site</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="number" required="1"/>
<field name="name" required="1"/>
<field name="owning_region" required="1"/>
<field name="state" required="1"/>
<field name="divide_the_work" required="1"/>
</tree>
</field>
</record>
<record id="action_agv_site_form" model="ir.actions.act_window">
<field name="name">AGV站点</field>
<field name="res_model">sf.agv.site</field>
<field name="view_mode">tree</field>
</record>
<menuitem id="menu_action_agv_site"
parent="sf_base.menu_sf_base"
name="AGV站点"
sequence="12"
action="action_agv_site_form"/>
<!-- agv任务路线 -->
<record id="view_agv_task_route_tree" model="ir.ui.view">
<field name="name">AGV任务路线</field>
<field name="model">sf.agv.task.route</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="name" required="1"/>
<field name="type" readonly="1"/>
<field name="start_site_id" required="1" options="{'no_create': True}" string="起点接驳站"/>
<field name="end_site_id" required="1" options="{'no_create': True}" string="终点接驳站"/>
<field name="destination_production_line_id" required="1" options="{'no_create': True}"/>
<field name="priority" widget="priority"/>
</tree>
</field>
</record>
<record id="action_agv_task_route_form" model="ir.actions.act_window">
<field name="name">AGV任务路线</field>
<field name="res_model">sf.agv.task.route</field>
<field name="view_mode">tree</field>
</record>
<menuitem id="menu_action_agv_task_route"
parent="sf_base.menu_sf_base"
name="AGV任务路线"
sequence="13"
action="action_agv_task_route_form"/>
</data>
</odoo>

View File

@@ -211,12 +211,12 @@
<field name="programming_state" readonly="1"
attrs='{"invisible": [("programming_no","=",False)]}'/>
</group>
<group>
<div class="col-12 col-lg-6 o_setting_box" style="white-space: nowrap">
<button type="object" class="oe_highlight" name="fetchCNC" string="获取CNC程序代码"
/>
</div>
</group>
<!-- <group>-->
<!-- <div class="col-12 col-lg-6 o_setting_box" style="white-space: nowrap">-->
<!-- <button type="object" class="oe_highlight" name="fetchCNC" string="获取CNC程序代码"-->
<!-- />-->
<!-- </div>-->
<!-- </group>-->
</page>
</xpath>
<!-- <page string="Components" name="components">-->
@@ -430,8 +430,10 @@
<tree editable="bottom">
<field name="production_id" invisible="1"/>
<field name="workpiece_code"/>
<field name="feeder_station_start" force_save="1"/>
<field name="feeder_station_destination" force_save="1"/>
<field name="route_id" options="{'no_create': True}"/>
<field name="feeder_station_start_id" readonly="1" force_save="1"/>
<field name="feeder_station_destination_id" readonly="1" force_save="1"/>
<field name="cnc_program_down_state" readonly="1"/>
<field name="production_line_id"/>
<field name="task_delivery_time" readonly="1"/>
<field name="task_completion_time" readonly="1"/>
@@ -573,7 +575,7 @@
<field name="name">工件配送</field>
<field name="model">sf.workpiece.delivery</field>
<field name="arch" type="xml">
<tree string="工件配送">
<tree string="工件配送" editable="bottom" class="center" create="0" delete="0">
<header>
<button name="button_delivery" type="object" string="配送" class="oe_highlight"/>
</header>
@@ -583,11 +585,13 @@
decoration-danger="status == '待配送'"/>
<field name="production_id" string="工件编码"/>
<field name="workpiece_code"/>
<field name="production_line_id"/>
<field name="feeder_station_start"/>
<field name="feeder_station_destination"/>
<field name="task_delivery_time"/>
<field name="task_completion_time"/>
<field name="production_line_id" options="{'no_create': True}"/>
<field name="route_id" options="{'no_create': True}"/>
<field name="feeder_station_start_id" readonly="1" force_save="1"/>
<field name="feeder_station_destination_id" readonly="1" force_save="1"/>
<field name="cnc_program_down_state" readonly="1"/>
<field name="task_delivery_time" readonly="1"/>
<field name="task_completion_time" readonly="1"/>
<field name="delivery_duration" widget="float_time"/>
</tree>
</field>
@@ -600,16 +604,19 @@
<search string="工件配送">
<field name="production_id"/>
<field name="workpiece_code"/>
<field name="feeder_station_start"/>
<field name="feeder_station_start_id"/>
<field name="production_line_id"/>
<field name="task_delivery_time"/>
<field name="feeder_station_destination"/>
<field name="feeder_station_destination_id"/>
<field name="task_completion_time"/>
<field name="delivery_duration"/>
<field name="status"/>
<searchpanel>
<field name="production_line_id" icon="fa-building" enable_counters="1"/>
<field name="status" icon="fa-building" enable_counters="1"/>
<field name="production_line_state" icon="fa-building" enable_counters="1"/>
<field name="cnc_program_down_state" icon="fa-building" enable_counters="1"/>
</searchpanel>
</search>
</field>

View File

@@ -1,23 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
设备增加刀具库位table
<!-- 设备增加刀具库位table-->
<record id="sf_manufacturing_hr_equipment_view_form" model="ir.ui.view">
<field name="name">sf_manufacturing_equipment.form</field>
<field name="model">maintenance.equipment</field>
<field name="inherit_id" ref="sf_maintenance.sf_hr_equipment_view_form"/>
<field name="arch" type="xml">
<field name="arch" type="xml">
<xpath expr="//page[@name='sf_equipment']" position="after">
<page string="标准刀库" name="sf_equipment_product_template"
attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
<field name = 'product_template_ids' >
<tree editable='bottom'>
<field name="code"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
<page string="机床基坐标" name="sf_equipment_base_coordinate"
attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
<button name="get_equipment_base_coordinate" string="获取基坐标数据" type="object"
class="oe_highlight"/>
<separator invisible="0"/>
<group>
<group>
<field name="base_coordinate_fixture_model_id" options="{'no_create': True}"/>
<field name="base_coordinate_g_coordinate"/>
<field name="base_coordinate_x"/>
<field name="base_coordinate_y"/>
<field name="base_coordinate_z"/>
</group>
</group>
</page>
<page string="标准刀库" name="sf_equipment_product_template"
attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
<field name='product_template_ids'>
<tree editable='bottom'>
<field name="code"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
</odoo>