刀具型号页面布局
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
# from datetime import datetime
|
||||
# from odoo.exceptions import ValidationError
|
||||
|
||||
@@ -44,7 +46,8 @@ class FunctionalCuttingTool(models.Model):
|
||||
[('mrs_cutting_tool_material_name', '=', '刀盘')])
|
||||
# 刀柄型号
|
||||
mrs_cutting_tool_cutterhandle_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
'rel_cutterhandle_model_functional_sf', string='刀柄型号',
|
||||
'rel_cutterhandle_model_functional_sf',
|
||||
string='刀柄型号',
|
||||
domain=
|
||||
[('mrs_cutting_tool_material_name', '=', '刀柄')])
|
||||
# 夹头型号
|
||||
@@ -95,6 +98,8 @@ class CuttingToolModel(models.Model):
|
||||
mrs_materials_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
# 关联刀具物料
|
||||
mrs_cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料', required=True)
|
||||
cutting_tool_material_type = fields.Char(related='mrs_cutting_tool_material_id.name', string='刀具物料类型',
|
||||
store=True)
|
||||
# 关联刀具物料名称
|
||||
mrs_cutting_tool_material_name = fields.Char(related='mrs_cutting_tool_material_id.name', string='刀具物料名称',
|
||||
store=True)
|
||||
|
||||
@@ -211,11 +211,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="刀具型号">
|
||||
<sheet>
|
||||
<group col='1'>
|
||||
<group string='基本信息'>
|
||||
<group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material_type" invisible="1"/>
|
||||
<field name="mrs_cutting_tool_material_id"
|
||||
options="{'no_create': True, 'no_quick_create': True}"/>
|
||||
<field name="mrs_machine_brand_id"
|
||||
@@ -229,7 +229,10 @@
|
||||
<field name="image" nolabel="1" widget="image"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string='参数信息'>
|
||||
<notebook>
|
||||
<page string="参数"
|
||||
attrs="{'invisible': [('cutting_tool_material_type', '=', False)]}">
|
||||
<group>
|
||||
<group>
|
||||
<field name="hide_integral" invisible="1"/>
|
||||
<field name="hide_blade" invisible="1"/>
|
||||
@@ -392,10 +395,10 @@
|
||||
<field name="chuck_feature"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)], 'required': [('hide_chuck', '!=', False)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string='其他信息'>
|
||||
<group>
|
||||
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids" widget="many2many_tags"
|
||||
<field name="mrs_cutting_tool_model_blade_cutter_bar_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_bar_blade_ids" widget="many2many_tags"
|
||||
@@ -404,20 +407,25 @@
|
||||
<field name="mrs_cutting_tool_model_pad_blade_ids" widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_cutter_pad', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_handle_chuck_model_ids" widget="many2many_tags"
|
||||
<field name="mrs_cutting_tool_model_handle_chuck_model_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_handler', '=', False)]}"/>
|
||||
<field name="mrs_cutting_tool_model_chuck_handle_model_ids" widget="many2many_tags"
|
||||
<field name="mrs_cutting_tool_model_chuck_handle_model_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_chuck', '=', False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="mrs_cutting_tool_model_blade_cutter_pad_ids" widget="many2many_tags"
|
||||
<field name="mrs_cutting_tool_model_blade_cutter_pad_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True, 'no_quick_create': True}"
|
||||
attrs="{'invisible': [('hide_blade', '=', False)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user