还原注释代码

This commit is contained in:
jinling.yang
2024-05-11 13:51:52 +08:00
parent b80df25e0a
commit 50dc25a8b7
3 changed files with 4 additions and 5 deletions

View File

@@ -1041,7 +1041,6 @@ class CNCprocessing(models.Model):
# 将FTP的nc文件下载到临时目录 # 将FTP的nc文件下载到临时目录
def download_file_tmp(self, production_no, processing_panel): def download_file_tmp(self, production_no, processing_panel):
remotepath = os.path.join('/NC', production_no, 'return', processing_panel) remotepath = os.path.join('/NC', production_no, 'return', processing_panel)
serverdir = os.path.join('C:/Users/43484/Desktop/fsdownload/return', production_no, 'return', processing_panel)
ftp_resconfig = self.env['res.config.settings'].get_values() ftp_resconfig = self.env['res.config.settings'].get_values()
ftp = FtpController(str(ftp_resconfig['ftp_host']), int(ftp_resconfig['ftp_port']), ftp_resconfig['ftp_user'], ftp = FtpController(str(ftp_resconfig['ftp_host']), int(ftp_resconfig['ftp_port']), ftp_resconfig['ftp_user'],
ftp_resconfig['ftp_password']) ftp_resconfig['ftp_password'])

View File

@@ -144,7 +144,7 @@
<!-- groups="sf_base.group_sf_mrp_user" --> <!-- groups="sf_base.group_sf_mrp_user" -->
<!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('state','=','done')]}"/> --> <!-- attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('state','=','done')]}"/> -->
<button name="button_workpiece_delivery" type="object" string="工件配送" class="btn-primary" <button name="button_workpiece_delivery" type="object" string="工件配送" class="btn-primary"
attrs="{'invisible': ['|','|',('routing_type','!=','装夹预调'),('is_delivery','=',True),('state','!=','done')]}"/> attrs="{'invisible': ['|',('routing_type','!=','装夹预调'),('is_delivery','=',True)]}"/>
</xpath> </xpath>
<xpath expr="//page[1]" position="before"> <xpath expr="//page[1]" position="before">
<page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'> <page string="开料要求" attrs='{"invisible": [("routing_type","!=","切割")]}'>
@@ -446,7 +446,7 @@
</group> </group>
</page> </page>
<page string="工件配送" <page string="工件配送"
attrs="{'invisible': ['|',('routing_type','!=','装夹预调'),('state','!=','done')]}"> attrs="{'invisible': [('routing_type','!=','装夹预调')]}">
<field name="workpiece_delivery_ids"> <field name="workpiece_delivery_ids">
<tree editable="bottom"> <tree editable="bottom">
<field name="production_id" invisible="1"/> <field name="production_id" invisible="1"/>

View File

@@ -33,7 +33,7 @@ class CNCprocessing(models.Model):
def create(self, vals): def create(self, vals):
obj = super(CNCprocessing, self).create(vals) obj = super(CNCprocessing, self).create(vals)
# 调用CAM工单程序用刀计划创建方法 # 调用CAM工单程序用刀计划创建方法
# self.env['sf.cam.work.order.program.knife.plan'].create_cam_work_plan(obj) self.env['sf.cam.work.order.program.knife.plan'].create_cam_work_plan(obj)
logging.info('成功调用CAM工单程序用刀计划创建方法') logging.info('成功调用CAM工单程序用刀计划创建方法')
return obj return obj