Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修改机床参数bug
This commit is contained in:
@@ -89,8 +89,8 @@ class CuttingToolModel(models.Model):
|
|||||||
'柄部类型', domain=[('type', '=', '柄部类型')])
|
'柄部类型', domain=[('type', '=', '柄部类型')])
|
||||||
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'cutting_direction_library_rel',
|
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'cutting_direction_library_rel',
|
||||||
'走刀方向', domain=[('type', '=', '走刀方向')])
|
'走刀方向', domain=[('type', '=', '走刀方向')])
|
||||||
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'suitable_coolant_library_rel',
|
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'suitable_coolants_library_rel',
|
||||||
'适合冷却液', domain=[('type', '=', '冷却液')])
|
'适合冷却方式', domain=[('type', '=', '冷却方式')])
|
||||||
compaction_way_id = fields.Many2one('maintenance.equipment.image',
|
compaction_way_id = fields.Many2one('maintenance.equipment.image',
|
||||||
'压紧方式', domain=[('type', '=', '压紧方式')])
|
'压紧方式', domain=[('type', '=', '压紧方式')])
|
||||||
integral_tool_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
integral_tool_basic_parameters_ids = fields.One2many('sf.tool.materials.basic.parameters',
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||||
placeholder="请选择"/>
|
placeholder="请选择"/>
|
||||||
<field name="fixture_model_id" string="型号" placeholder="请选择"
|
<field name="fixture_model_id" string="型号" placeholder="请选择"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
attrs="{'invisible': [('categ_type', '!=', '夹具')],'required': [('categ_type', '=', '夹具')]}"
|
||||||
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
domain="[('fixture_material_id','=',fixture_material_id)]"/>
|
||||||
<field name="specification_fixture_id" string="规格" placeholder="请选择"
|
<field name="specification_fixture_id" string="规格" placeholder="请选择"
|
||||||
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_thread_num"
|
<field name="cutting_tool_thread_num"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_thickness_tolerance"
|
<field name="cutting_tool_thickness_tolerance"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
<field name="cutting_tool_cutter_bar_ids" widget="many2many_tags"
|
||||||
options="{'no_create': True}"
|
options="{'no_create': True}"
|
||||||
@@ -338,7 +338,7 @@
|
|||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_er_size_model"
|
<field name="cutting_tool_er_size_model"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cutting_tool_handle_ids" widget="many2many_tags"
|
<field name="cutting_tool_handle_id"
|
||||||
options="{'no_create': True}"
|
options="{'no_create': True}"
|
||||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||||
<field name="cooling_suit_type_ids"
|
<field name="cooling_suit_type_ids"
|
||||||
@@ -453,7 +453,8 @@
|
|||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="brand_id" placeholder="请选择"/>
|
<field name="brand_id" placeholder="请选择"/>
|
||||||
<field name="multi_mounting_type_id" placeholder="请选择"/>
|
<field name="multi_mounting_type_id" placeholder="请选择"
|
||||||
|
attrs="{'required': [('categ_type', '=', '夹具')]}"/>
|
||||||
<field name="length" string="长度(mm)"/>
|
<field name="length" string="长度(mm)"/>
|
||||||
<field name="width" string="宽度(mm)"/>
|
<field name="width" string="宽度(mm)"/>
|
||||||
<field name="height" string="高度(mm)"/>
|
<field name="height" string="高度(mm)"/>
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ class ResProductMo(models.Model):
|
|||||||
handle_type_id = fields.Many2one('maintenance.equipment.image', '柄部类型', domain=[('type', '=', '柄部类型')])
|
handle_type_id = fields.Many2one('maintenance.equipment.image', '柄部类型', domain=[('type', '=', '柄部类型')])
|
||||||
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'rel_cutting_product_template',
|
cutting_direction_ids = fields.Many2many('maintenance.equipment.image', 'rel_cutting_product_template',
|
||||||
'走刀方向', domain=[('type', '=', '走刀方向')])
|
'走刀方向', domain=[('type', '=', '走刀方向')])
|
||||||
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolant_product_template',
|
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image', 'rel_coolants_product_template',
|
||||||
'适合冷却液', domain=[('type', '=', '冷却液')])
|
'适合冷却方式', domain=[('type', '=', '冷却方式')])
|
||||||
compaction_way_id = fields.Many2one('maintenance.equipment.image',
|
compaction_way_id = fields.Many2one('maintenance.equipment.image',
|
||||||
'压紧方式', domain=[('type', '=', '压紧方式')])
|
'压紧方式', domain=[('type', '=', '压紧方式')])
|
||||||
|
|
||||||
@@ -201,7 +201,6 @@ class ResProductMo(models.Model):
|
|||||||
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids.filtered(
|
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids.filtered(
|
||||||
lambda r: int(r.blade_diameter) == int(self.specification_id.blade_diameter))
|
lambda r: int(r.blade_diameter) == int(self.specification_id.blade_diameter))
|
||||||
elif self.cutting_tool_type == '夹头':
|
elif self.cutting_tool_type == '夹头':
|
||||||
self.cutting_tool_clamping_tolerance = self.specification_id.clamping_tolerance
|
|
||||||
self.cutting_tool_clamping_diameter_min = self.specification_id.min_clamping_diameter
|
self.cutting_tool_clamping_diameter_min = self.specification_id.min_clamping_diameter
|
||||||
self.cutting_tool_clamping_diameter_min = self.specification_id.max_clamping_diameter
|
self.cutting_tool_clamping_diameter_min = self.specification_id.max_clamping_diameter
|
||||||
self.cutting_tool_clamping_way = self.specification_id.clamping_mode
|
self.cutting_tool_clamping_way = self.specification_id.clamping_mode
|
||||||
@@ -212,7 +211,7 @@ class ResProductMo(models.Model):
|
|||||||
self.cutting_tool_jump_accuracy = self.specification_id.run_out_accuracy
|
self.cutting_tool_jump_accuracy = self.specification_id.run_out_accuracy
|
||||||
self.cutting_tool_max_load_capacity = self.specification_id.max_load_capacity
|
self.cutting_tool_max_load_capacity = self.specification_id.max_load_capacity
|
||||||
self.cutting_tool_er_size_model = self.specification_id.er_size_model
|
self.cutting_tool_er_size_model = self.specification_id.er_size_model
|
||||||
self.cutting_tool_handle_ids = self.cutting_tool_model_id.handle_ids
|
self.cutting_tool_handle_id = self.cutting_tool_model_id.handle_id.id
|
||||||
self.cooling_suit_type_ids = self.specification_id.cooling_jacket
|
self.cooling_suit_type_ids = self.specification_id.cooling_jacket
|
||||||
elif self.cutting_tool_type == '刀片':
|
elif self.cutting_tool_type == '刀片':
|
||||||
self.cutting_tool_total_length = self.specification_id.total_length
|
self.cutting_tool_total_length = self.specification_id.total_length
|
||||||
@@ -481,11 +480,17 @@ class ResProductMo(models.Model):
|
|||||||
cooling_suit_type_ids = fields.Char('适用冷却套型号')
|
cooling_suit_type_ids = fields.Char('适用冷却套型号')
|
||||||
cutting_tool_max_load_capacity = fields.Float('最大负载能力(kg)')
|
cutting_tool_max_load_capacity = fields.Float('最大负载能力(kg)')
|
||||||
cutting_tool_er_size_model = fields.Char('尺寸型号')
|
cutting_tool_er_size_model = fields.Char('尺寸型号')
|
||||||
cutting_tool_handle_ids = fields.Many2many(
|
# cutting_tool_handle_ids = fields.Many2many(
|
||||||
|
# 'sf.cutting_tool.standard.library',
|
||||||
|
# relation='product_cutting_tool_library_chuck_handle_rel',
|
||||||
|
# column1='model_id_1',
|
||||||
|
# column2='model_id_2',
|
||||||
|
# domain="[('cutting_tool_type', '=', '刀柄')]",
|
||||||
|
# string='适用刀柄型号'
|
||||||
|
# )
|
||||||
|
|
||||||
|
cutting_tool_handle_id = fields.Many2one(
|
||||||
'sf.cutting_tool.standard.library',
|
'sf.cutting_tool.standard.library',
|
||||||
relation='product_cutting_tool_library_chuck_handle_rel',
|
|
||||||
column1='model_id_1',
|
|
||||||
column2='model_id_2',
|
|
||||||
domain="[('cutting_tool_type', '=', '刀柄')]",
|
domain="[('cutting_tool_type', '=', '刀柄')]",
|
||||||
string='适用刀柄型号'
|
string='适用刀柄型号'
|
||||||
)
|
)
|
||||||
@@ -515,36 +520,6 @@ class ResProductMo(models.Model):
|
|||||||
if self.tool_thickness > 1000000:
|
if self.tool_thickness > 1000000:
|
||||||
raise ValidationError("厚度不能超过1000000")
|
raise ValidationError("厚度不能超过1000000")
|
||||||
|
|
||||||
@api.constrains('fixture_clamp_workpiece_length_max')
|
|
||||||
def _check_fixture_clamp_workpiece_length_max_size(self):
|
|
||||||
if self.fixture_clamp_workpiece_length_max > 1000000:
|
|
||||||
raise ValidationError("夹持工件长度MAX不能超过1000000")
|
|
||||||
|
|
||||||
@api.constrains('fixture_clamp_workpiece_width_max')
|
|
||||||
def _check_fixture_clamp_workpiece_width_max_size(self):
|
|
||||||
if self.fixture_clamp_workpiece_width_max > 1000000:
|
|
||||||
raise ValidationError("夹持工件宽度MAX不能超过1000000")
|
|
||||||
|
|
||||||
@api.constrains('fixture_clamp_workpiece_height_max')
|
|
||||||
def _check_fixture_clamp_workpiece_height_max_size(self):
|
|
||||||
if self.fixture_clamp_workpiece_height_max > 1000000:
|
|
||||||
raise ValidationError("夹持工件高度MAX不能超过1000000")
|
|
||||||
|
|
||||||
@api.constrains('fixture_maximum_clamping_force')
|
|
||||||
def _check_fixture_maximum_clamping_force_size(self):
|
|
||||||
if self.fixture_maximum_clamping_force > 100000000:
|
|
||||||
raise ValidationError("最大夹持力不能超过100000000")
|
|
||||||
|
|
||||||
@api.constrains('fixture_through_hole_size')
|
|
||||||
def _check_fixture_through_hole_size_size(self):
|
|
||||||
if self.fixture_through_hole_size > 1000000:
|
|
||||||
raise ValidationError("过孔大小不能超过1000000")
|
|
||||||
|
|
||||||
@api.constrains('fixture_screw_size')
|
|
||||||
def _check_fixture_through_hole_size_size(self):
|
|
||||||
if self.fixture_screw_size > 1000000:
|
|
||||||
raise ValidationError("螺牙大小不能超过1000000")
|
|
||||||
|
|
||||||
def _json_apply_machine_tool_type_item_code(self, item):
|
def _json_apply_machine_tool_type_item_code(self, item):
|
||||||
code_arr = []
|
code_arr = []
|
||||||
for i in item.product_id.fixture_apply_machine_tool_type_ids:
|
for i in item.product_id.fixture_apply_machine_tool_type_ids:
|
||||||
@@ -563,12 +538,6 @@ class ResProductMo(models.Model):
|
|||||||
code_arr.append(i.code)
|
code_arr.append(i.code)
|
||||||
return code_arr
|
return code_arr
|
||||||
|
|
||||||
def _json_handle_item_code(self, item):
|
|
||||||
code_arr = []
|
|
||||||
for i in item.product_id.cutting_tool_handle_ids:
|
|
||||||
code_arr.append(i.code)
|
|
||||||
return code_arr
|
|
||||||
|
|
||||||
def _get_ids(self, param):
|
def _get_ids(self, param):
|
||||||
type_ids = []
|
type_ids = []
|
||||||
if not param:
|
if not param:
|
||||||
@@ -584,72 +553,6 @@ class ResProductMo(models.Model):
|
|||||||
self.detailed_type = 'product'
|
self.detailed_type = 'product'
|
||||||
self.sale_ok = False
|
self.sale_ok = False
|
||||||
|
|
||||||
@api.onchange('fixture_material_id')
|
|
||||||
def _onchange_fixture_material_id(self):
|
|
||||||
for item in self:
|
|
||||||
if item.fixture_material_id.id != item.fixture_model_id.fixture_material_id.id:
|
|
||||||
item.fixture_model_id = False
|
|
||||||
|
|
||||||
#
|
|
||||||
# @api.onchange('fixture_model_id')
|
|
||||||
# def _onchange_fixture_model_id(self):
|
|
||||||
# for item in self:
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '转接板(锁板)夹具', '磁吸夹具', '虎钳夹具', '零点卡盘']:
|
|
||||||
# item.brand_id = item.fixture_model_id.brand_id.id
|
|
||||||
# item.fixture_model_file = item.fixture_model_id.model_file
|
|
||||||
# item.tool_length = item.fixture_model_id.length
|
|
||||||
# item.tool_width = item.fixture_model_id.width
|
|
||||||
# item.tool_height = item.fixture_model_id.height
|
|
||||||
# item.tool_weight = item.fixture_model_id.weight
|
|
||||||
# item.materials_type_id = item.fixture_model_id.materials_model_id.id
|
|
||||||
# item.fixture_maximum_carrying_weight = item.fixture_model_id.maximum_carrying_weight
|
|
||||||
# item.fixture_maximum_clamping_force = item.fixture_model_id.maximum_clamping_force
|
|
||||||
# if self.fixture_material_type in ['零点卡盘', '转接板(锁板)夹具']:
|
|
||||||
# item.fixture_clamping_way = item.fixture_model_id.clamping_way
|
|
||||||
# item.fixture_port_type = item.fixture_model_id.port_type
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '转接板(锁板)夹具', '磁吸夹具']:
|
|
||||||
# item.fixture_driving_way = item.fixture_model_id.driving_way
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '磁吸夹具', '虎钳夹具', '零点卡盘']:
|
|
||||||
# item.fixture_through_hole_size = item.fixture_model_id.through_hole_size
|
|
||||||
# item.fixture_screw_size = item.fixture_model_id.screw_size
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '转接板(锁板)夹具', '磁吸夹具', '虎钳夹具']:
|
|
||||||
# item.fixture_clamp_workpiece_length_max = item.fixture_model_id.clamp_workpiece_length_max
|
|
||||||
# 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_ids = self._get_ids(
|
|
||||||
# item.fixture_model_id.apply_machine_tool_type_ids)
|
|
||||||
|
|
||||||
# @api.onchange('fixture_model_id')
|
|
||||||
# def _onchange_fixture_model_id(self):
|
|
||||||
# for item in self:
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '转接板(锁板)夹具', '磁吸夹具', '虎钳夹具', '零点卡盘']:
|
|
||||||
# item.brand_id = item.fixture_model_id.brand_id.id
|
|
||||||
# item.fixture_multi_mounting_type_id = item.fixture_model_id.multi_mounting_type_id.id
|
|
||||||
# item.fixture_model_file = item.fixture_model_id.model_file
|
|
||||||
# item.tool_length = item.fixture_model_id.length
|
|
||||||
# item.tool_width = item.fixture_model_id.width
|
|
||||||
# item.tool_height = item.fixture_model_id.height
|
|
||||||
# item.tool_weight = item.fixture_model_id.weight
|
|
||||||
# item.materials_type_id = item.fixture_model_id.materials_model_id.id
|
|
||||||
# item.fixture_maximum_carrying_weight = item.fixture_model_id.maximum_carrying_weight
|
|
||||||
# item.fixture_maximum_clamping_force = item.fixture_model_id.maximum_clamping_force
|
|
||||||
# if self.fixture_material_type in ['零点卡盘', '转接板(锁板)夹具']:
|
|
||||||
# item.fixture_clamping_way = item.fixture_model_id.clamping_way
|
|
||||||
# item.fixture_port_type = item.fixture_model_id.port_type
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '转接板(锁板)夹具', '磁吸夹具']:
|
|
||||||
# item.fixture_driving_way = item.fixture_model_id.driving_way
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '磁吸夹具', '虎钳夹具', '零点卡盘']:
|
|
||||||
# item.fixture_through_hole_size = item.fixture_model_id.through_hole_size
|
|
||||||
# item.fixture_screw_size = item.fixture_model_id.screw_size
|
|
||||||
# if self.fixture_material_type in ['气动夹具', '转接板(锁板)夹具', '磁吸夹具', '虎钳夹具']:
|
|
||||||
# item.fixture_clamp_workpiece_length_max = item.fixture_model_id.clamp_workpiece_length_max
|
|
||||||
# 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_ids = self._get_ids(
|
|
||||||
# item.fixture_model_id.apply_machine_tool_type_ids)
|
|
||||||
|
|
||||||
def _get_volume_uom_id_from_ir_config_parameter(self):
|
def _get_volume_uom_id_from_ir_config_parameter(self):
|
||||||
product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet')
|
product_length_in_feet_param = self.env['ir.config_parameter'].sudo().get_param('product.volume_in_cubic_feet')
|
||||||
if product_length_in_feet_param == '1':
|
if product_length_in_feet_param == '1':
|
||||||
@@ -839,9 +742,6 @@ class ResProductFixture(models.Model):
|
|||||||
model_file = fields.Binary(string="3D模型图")
|
model_file = fields.Binary(string="3D模型图")
|
||||||
|
|
||||||
# 夹具物料基本参数
|
# 夹具物料基本参数
|
||||||
# length = fields.Float('长度(mm)', digits=(16, 2))
|
|
||||||
# width = fields.Float('宽度(mm)', digits=(16, 2))
|
|
||||||
# height = fields.Float('高度(mm)', digits=(16, 2))
|
|
||||||
diameter = fields.Float('直径(mm)', digits=(16, 2))
|
diameter = fields.Float('直径(mm)', digits=(16, 2))
|
||||||
|
|
||||||
# '零点卡盘' 字段
|
# '零点卡盘' 字段
|
||||||
@@ -899,27 +799,6 @@ class ResProductFixture(models.Model):
|
|||||||
mounting_hole_depth = fields.Float('安装孔深度(mm)', digits=(16, 2))
|
mounting_hole_depth = fields.Float('安装孔深度(mm)', digits=(16, 2))
|
||||||
centering_diameter = fields.Float('定心直径(mm)', digits=(16, 2))
|
centering_diameter = fields.Float('定心直径(mm)', digits=(16, 2))
|
||||||
|
|
||||||
# =========================待删除字段================================
|
|
||||||
fixture_multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型")
|
|
||||||
fixture_clamping_way = fields.Char(string="装夹方式")
|
|
||||||
fixture_port_type = fields.Char(string="接口类型")
|
|
||||||
fixture_model_file = fields.Binary(string="3D模型图")
|
|
||||||
|
|
||||||
fixture_clamp_workpiece_length_max = fields.Integer(string="夹持工件长度max(mm)")
|
|
||||||
fixture_clamp_workpiece_width_max = fields.Integer(string="夹持工件宽度max(mm)")
|
|
||||||
fixture_clamp_workpiece_height_max = fields.Integer(string="夹持工件高度max(mm)")
|
|
||||||
fixture_clamp_workpiece_diameter_max = fields.Float(string="夹持工件直径max(mm)", digits=(16, 6))
|
|
||||||
|
|
||||||
fixture_maximum_carrying_weight = fields.Float(string="最大承载重量(kg)", digits=(16, 4))
|
|
||||||
fixture_maximum_clamping_force = fields.Integer(string="最大夹持力(n)")
|
|
||||||
fixture_driving_way = fields.Char(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)")
|
|
||||||
fixture_screw_size = fields.Integer(string="螺牙大小(mm)")
|
|
||||||
|
|
||||||
# ===============================================================
|
|
||||||
|
|
||||||
@api.onchange('specification_fixture_id')
|
@api.onchange('specification_fixture_id')
|
||||||
def _onchange_specification_fixture_id(self):
|
def _onchange_specification_fixture_id(self):
|
||||||
if self.specification_fixture_id:
|
if self.specification_fixture_id:
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class ReSaleOrder(models.Model):
|
|||||||
raise UserError('请对【订单行】中的【计量单位】进行选择')
|
raise UserError('请对【订单行】中的【计量单位】进行选择')
|
||||||
if line.price_unit == 0:
|
if line.price_unit == 0:
|
||||||
raise UserError('请对【订单行】中的【单价】进行输入')
|
raise UserError('请对【订单行】中的【单价】进行输入')
|
||||||
if not line.taxes_id:
|
if not line.tax_id:
|
||||||
raise UserError('请对【订单行】中的【税】进行选择')
|
raise UserError('请对【订单行】中的【税】进行选择')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</field>
|
</field>
|
||||||
<field name="currency_id" position="after">
|
<field name="currency_id" position="after">
|
||||||
<field name="check_status" invisible="1"/>
|
<field name="check_status" invisible="1"/>
|
||||||
<!-- <field name="state"/>-->
|
<!-- <field name="state"/>-->
|
||||||
<field name="remark" attrs="{'readonly': ['&',('state', 'in', ['purchase']),('check_status','in',
|
<field name="remark" attrs="{'readonly': ['&',('state', 'in', ['purchase']),('check_status','in',
|
||||||
['pending','approved'])]}"/>
|
['pending','approved'])]}"/>
|
||||||
</field>
|
</field>
|
||||||
@@ -25,9 +25,10 @@
|
|||||||
<xpath expr="//form/header/button[@name='button_confirm'][2]" position="replace">
|
<xpath expr="//form/header/button[@name='button_confirm'][2]" position="replace">
|
||||||
<button name="button_confirm" type="object" context="{'validate_analytic': True}"
|
<button name="button_confirm" type="object" context="{'validate_analytic': True}"
|
||||||
string="确认订单" id="draft_confirm"
|
string="确认订单" id="draft_confirm"
|
||||||
|
attrs="{'invisible': ['|','&','&', ('state', 'in', ['purchase']), ('check_status', 'in', ['approved']), ('date_approve', '!=', False),'&', '&',('state', 'in', ['purchase', 'draft']),('check_status', 'in', [False, 'pending', 'fail']),('date_approve', '=', False)]}"
|
||||||
/>
|
/>
|
||||||
<button name="button_confirming" type="object"
|
<button name="button_confirming" type="object"
|
||||||
string="确认"
|
string="确认订单"
|
||||||
attrs="{'invisible': ['&',('check_status','!=', False),('state', 'not in', ['draft','send'])]}"
|
attrs="{'invisible': ['&',('check_status','!=', False),('state', 'not in', ['draft','send'])]}"
|
||||||
/>
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
action="action_quotations_with_onboarding_inherit_sf"
|
action="action_quotations_with_onboarding_inherit_sf"
|
||||||
groups="sales_team.group_sale_salesman,sf_base.group_sale_salemanager,sf_base.group_sale_director"
|
groups="sales_team.group_sale_salesman,sf_base.group_sale_salemanager,sf_base.group_sale_director"
|
||||||
parent="sale.sale_order_menu"
|
parent="sale.sale_order_menu"
|
||||||
sequence="10"/>
|
sequence="11"/>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_sale_order_form_inherit_sf">
|
<record model="ir.ui.view" id="view_sale_order_form_inherit_sf">
|
||||||
<field name="name">sale.order.form.inherit.sf</field>
|
<field name="name">sale.order.form.inherit.sf</field>
|
||||||
|
|||||||
@@ -293,8 +293,8 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
'maintenance.equipment.image', 'rel_cutting_product_template_distribution', '走刀方向',
|
'maintenance.equipment.image', 'rel_cutting_product_template_distribution', '走刀方向',
|
||||||
domain=[('type', '=', '走刀方向')], related='sf_functional_cutting_tool_entity_ids.cutting_direction_ids')
|
domain=[('type', '=', '走刀方向')], related='sf_functional_cutting_tool_entity_ids.cutting_direction_ids')
|
||||||
suitable_coolant_ids = fields.Many2many(
|
suitable_coolant_ids = fields.Many2many(
|
||||||
'maintenance.equipment.image', 'rel_coolant_product_template_distribution', '适合冷却方式',
|
'maintenance.equipment.image', 'rel_coolants_product_template_distribution', '适合冷却方式',
|
||||||
domain=[('type', '=', '冷却液')], related='sf_functional_cutting_tool_entity_ids.suitable_coolant_ids')
|
domain=[('type', '=', '冷却方式')], related='sf_functional_cutting_tool_entity_ids.suitable_coolant_ids')
|
||||||
|
|
||||||
sf_functional_cutting_tool_entity_ids = fields.Many2many('sf.functional.cutting.tool.entity',
|
sf_functional_cutting_tool_entity_ids = fields.Many2many('sf.functional.cutting.tool.entity',
|
||||||
'sf_functional_cutting_tool_entity_ref',
|
'sf_functional_cutting_tool_entity_ref',
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ class SfToolMaterialSearch(models.Model):
|
|||||||
'rel_cutting_product_template_material_search', '走刀方向',
|
'rel_cutting_product_template_material_search', '走刀方向',
|
||||||
domain=[('type', '=', '走刀方向')])
|
domain=[('type', '=', '走刀方向')])
|
||||||
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image',
|
suitable_coolant_ids = fields.Many2many('maintenance.equipment.image',
|
||||||
'rel_coolant_product_template_material_search', '适合冷却液',
|
'rel_coolants_product_template_material_search', '适合冷却方式',
|
||||||
domain=[('type', '=', '冷却液')])
|
domain=[('type', '=', '冷却方式')])
|
||||||
|
|
||||||
cutting_speed_ids = fields.Many2many('sf.cutting.speed', string='切削速度Vc')
|
cutting_speed_ids = fields.Many2many('sf.cutting.speed', string='切削速度Vc')
|
||||||
feed_per_tooth_ids = fields.Many2many('sf.feed.per.tooth', 'rel_feed_per_tooth_ids', '每齿走刀量fz')
|
feed_per_tooth_ids = fields.Many2many('sf.feed.per.tooth', 'rel_feed_per_tooth_ids', '每齿走刀量fz')
|
||||||
|
|||||||
Reference in New Issue
Block a user