Commit 1b6b0505 by 夏超

[fix] 上推数据修改

parent 66e01a71
......@@ -11,9 +11,8 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
@api.model
def default_get(self, field_names):
default = super().default_get(field_names)
if self.env.context.get('active_model') != "roke.production.result":
return default
return super(InheritRokeResultPutWarehouseWizard, self).default_get(field_names)
results = self.env['roke.production.result'].browse(self.env.context.get('active_ids'))
system_id = self.env.ref("roke_workstation_sync_ps.roke_workstation_sync_ps_integrate_system")
sync_address = system_id.sync_address
......@@ -28,7 +27,7 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
raise ValidationError("数据库链接失败,请检查数据库链接参数")
ids_str = [f"'{v.id}'" for v in results]
if not ids_str:
return super(InheritRokeResultPutWarehouseWizard, self).default_get()
return super(InheritRokeResultPutWarehouseWizard, self).default_get(field_names)
sql = f"""
select WBCCB_CCID
from WBCCB
......@@ -72,4 +71,4 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
finally:
cur.close()
conn.close()
return super(InheritRokeResultPutWarehouseWizard, self).default_get()
return super(InheritRokeResultPutWarehouseWizard, self).default_get(field_names)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment