Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/销售权限

# Conflicts:
#	sf_manufacturing/models/product_template.py
This commit is contained in:
jinling.yang
2023-11-23 17:39:35 +08:00
54 changed files with 1716 additions and 1623 deletions

View File

@@ -10,7 +10,6 @@ from OCC.Extend.DataExchange import read_step_file
from OCC.Extend.DataExchange import write_stl_file
class ResProductMo(models.Model):
_inherit = 'product.template'
@@ -289,7 +288,7 @@ class ResProductMo(models.Model):
self.suitable_machining_method_ids = [(6, 0, [])] if not \
self.cutting_tool_model_id.suitable_machining_method_ids \
else [(6, 0, self.cutting_tool_model_id.suitable_machining_method_ids.ids)]
self.blade_tip_characteristics_id = [(6, 0,[])] if not \
self.blade_tip_characteristics_id = [(6, 0, [])] if not \
self.cutting_tool_model_id.blade_tip_characteristics_id \
else [(6, 0, self.cutting_tool_model_id.blade_tip_characteristics_id.ids)]
@@ -873,3 +872,11 @@ class SfMaintenanceEquipmentTool(models.Model):
alarm_value = fields.Char('报警值')
used_value = fields.Char('已使用值')
code = fields.Char('机床刀位号')
name = fields.Char('', compute='_compute_name')
@api.depends('code')
def _compute_name(self):
for record in self:
if record.code:
record.name = record.code