Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/权限去掉继承
This commit is contained in:
15
sf_tool_management/models/maintenance_equipment.py
Normal file
15
sf_tool_management/models/maintenance_equipment.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class SfMaintenanceEquipmentTool(models.Model):
|
||||
_inherit = 'maintenance.equipment.tool'
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
tools = super().create(vals_list)
|
||||
for tool in tools:
|
||||
self.env['sf.machine.table.tool.changing.apply'].sudo().create({
|
||||
'maintenance_equipment_id': tool.equipment_id.id,
|
||||
'cutter_spacing_code_id': tool.id
|
||||
})
|
||||
return tools
|
||||
Reference in New Issue
Block a user