Merge branch 'feature/表面工艺添加类别筛选' into feature/功能刀具安全库存注册
This commit is contained in:
@@ -471,14 +471,6 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
|||||||
records = super(RealTimeDistributionOfFunctionalTools, self).create(vals_list)
|
records = super(RealTimeDistributionOfFunctionalTools, self).create(vals_list)
|
||||||
return records
|
return records
|
||||||
|
|
||||||
def write(self, vals):
|
|
||||||
res = super().write(vals)
|
|
||||||
for item in self:
|
|
||||||
if item:
|
|
||||||
if vals.get('min_stock_num') or vals.get('max_stock_num'):
|
|
||||||
item.enroll_functional_tool_real_time_distribution()
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
class MachineTableToolChangingApply(models.Model):
|
class MachineTableToolChangingApply(models.Model):
|
||||||
_name = 'sf.machine.table.tool.changing.apply'
|
_name = 'sf.machine.table.tool.changing.apply'
|
||||||
|
|||||||
@@ -362,3 +362,9 @@ class RealTimeDistributionFunctionalTools(models.Model):
|
|||||||
if record:
|
if record:
|
||||||
record.enroll_functional_tool_real_time_distribution()
|
record.enroll_functional_tool_real_time_distribution()
|
||||||
return records
|
return records
|
||||||
|
|
||||||
|
def write(self, vals):
|
||||||
|
res = super().write(vals)
|
||||||
|
if vals.get('sf_functional_cutting_tool_entity_ids') or vals.get('min_stock_num') or vals.get('max_stock_num'):
|
||||||
|
self.enroll_functional_tool_real_time_distribution()
|
||||||
|
return res
|
||||||
|
|||||||
@@ -540,6 +540,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
|||||||
return {
|
return {
|
||||||
'barcode_id': stock_lot.id,
|
'barcode_id': stock_lot.id,
|
||||||
'code': self.tool_code,
|
'code': self.tool_code,
|
||||||
|
'name': self.after_assembly_functional_tool_name,
|
||||||
'rfid': self.rfid,
|
'rfid': self.rfid,
|
||||||
'tool_groups_id': self.tool_groups_id.id,
|
'tool_groups_id': self.tool_groups_id.id,
|
||||||
'integral_code_id': self.integral_code_id.id,
|
'integral_code_id': self.integral_code_id.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user