Merge branch 'develop' into feature/tree视图表格样式修改
# Conflicts: # sf_manufacturing/static/src/xml/kanban_change.xml
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
'data/stock_data.xml',
|
||||
'security/group_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/mrp_production_addional_change.xml',
|
||||
'report/tray_report.xml',
|
||||
# 'views/mrp_maintenance_views.xml',
|
||||
'views/mrp_routing_workcenter_view.xml',
|
||||
@@ -42,6 +43,14 @@
|
||||
],
|
||||
'qweb': [
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'sf_manufacturing/static/src/js/kanban_change.js',
|
||||
'sf_manufacturing/static/src/scss/kanban_change.scss',
|
||||
'sf_manufacturing/static/src/xml/kanban_change.xml',
|
||||
],
|
||||
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
'installable': True,
|
||||
'application': False,
|
||||
|
||||
@@ -147,7 +147,8 @@ class ResProductMo(models.Model):
|
||||
fixture_maximum_carrying_weight = fields.Float(string="最大承载重量[kg]", digits=(16, 4))
|
||||
fixture_maximum_clamping_force = fields.Integer(string="最大夹持力[n]", size=8)
|
||||
fixture_driving_way = fields.Char(string="驱动方式")
|
||||
fixture_apply_machine_tool_type_id = fields.Many2one('sf.machine_tool.type', string="适用机床型号")
|
||||
fixture_apply_machine_tool_type_ids = fields.Many2many('sf.machine_tool.type', 'rel_product_machine_tool_type',
|
||||
string="适用机床型号")
|
||||
fixture_through_hole_size = fields.Integer(string="过孔大小[mm]", size=6)
|
||||
fixture_screw_size = fields.Integer(string="螺牙大小[mm]", size=6)
|
||||
|
||||
@@ -205,7 +206,7 @@ class ResProductMo(models.Model):
|
||||
item.fixture_clamp_workpiece_width_max = item.fixture_model_id.clamp_workpiece_width_max
|
||||
item.fixture_clamp_workpiece_height_max = item.fixture_model_id.clamp_workpiece_height_max
|
||||
item.fixture_clamp_workpiece_diameter_max = item.fixture_model_id.clamp_workpiece_diameter_max
|
||||
item.fixture_apply_machine_tool_type_id = item.fixture_model_id.apply_machine_tool_type_id.id
|
||||
item.fixture_apply_machine_tool_type_id = self._get_ids(item.fixture_model_id.apply_machine_tool_type_ids)
|
||||
|
||||
@api.onchange('cutting_tool_model_id')
|
||||
def _onchange_cutting_tool_model_id(self):
|
||||
|
||||
46
sf_manufacturing/views/mrp_production_addional_change.xml
Normal file
46
sf_manufacturing/views/mrp_production_addional_change.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="custom_mrp_production_tree_view" model="ir.ui.view">
|
||||
<field name="name">custom.mrp.production.tree</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="replace"/>
|
||||
<xpath expr="//field[@name='product_qty']" position="replace"/>
|
||||
<xpath expr="//field[@name='product_uom_id']" position="replace"/>
|
||||
<xpath expr="//field[@name='reservation_state']" position="replace"/>
|
||||
<xpath expr="//field[@name='date_deadline']" position="replace"/>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="product_id" readonly="1" optional="show"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name="product_qty" sum="Total Qty" string="数量" readonly="1" optional="show"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_qty']" position="after">
|
||||
<field name="product_uom_id" string="计量单位" options="{'no_open':True,'no_create':True}" groups="uom.group_uom" optional="show"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='date_planned_start']" position="after">
|
||||
<field name="date_deadline" widget="remaining_days" attrs="{'invisible': [('state', 'in', ['done', 'cancel'])]}" optional="show"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='production_real_duration']" position="after">
|
||||
<field name="reservation_state" optional="hide" decoration-danger="reservation_state == 'confirmed'" decoration-success="reservation_state == 'assigned'"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='activity_ids']" position="replace">
|
||||
<field name="activity_ids" string="下一个活动" widget="list_activity" optional="hide"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='origin']" position="replace">
|
||||
<field name="origin" optional="hide"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='components_availability']" position="replace">
|
||||
<field name="components_availability" options='{"lazy": true}'
|
||||
attrs="{'invisible': [('state', 'not in', ['confirmed', 'progress'])]}"
|
||||
optional="hide"
|
||||
decoration-success="reservation_state == 'assigned' or components_availability_state == 'available'"
|
||||
decoration-warning="reservation_state != 'assigned' and components_availability_state in ('expected', 'available')"
|
||||
decoration-danger="reservation_state != 'assigned' and components_availability_state == 'late'"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -56,7 +56,7 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="mrp_workcenter_kanban_action1" model="ir.actions.act_window">
|
||||
<field name="name">工作中心看板</field>
|
||||
<field name="name">生产线驾驶舱</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workcenter</field>
|
||||
<field name="view_mode">kanban,form</field>
|
||||
@@ -76,7 +76,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_dashboard"
|
||||
name="工作中心看板"
|
||||
name="生产线驾驶舱"
|
||||
action="mrp_workcenter_kanban_action1"
|
||||
groups="mrp.group_mrp_routings"
|
||||
parent="mrp.menu_mrp_root"
|
||||
|
||||
Reference in New Issue
Block a user