修复分配工厂创建订单和质检接口

This commit is contained in:
jinling.yang
2024-02-29 14:42:10 +08:00
parent ec5297937d
commit abdc522f9f
4 changed files with 8 additions and 8 deletions

View File

@@ -655,7 +655,8 @@ class ResMrpWorkOrder(models.Model):
reportPath = reportPath[1:]
serverdir = os.path.join('/tmp', reportPath)
logging.info('get_detection_file-serverdir:%s' % serverdir)
for root, dirs, files in os.walk(serverdir):
serverdir_prefix = os.path.dirname(serverdir)
for root, dirs, files in os.walk(serverdir_prefix):
for filename in files:
if filename == os.path.basename(reportPath):
report_file_path = os.path.join(root, filename)

View File

@@ -434,7 +434,7 @@
<field name="results" invisible="1"/>
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
<group>
<field name="test_result" widget="selection" attrs='{"invisible":[("results","!=",False)]}'/>
<field name="test_result" readonly="1" attrs='{"invisible":[("results","!=",False)]}'/>
<field name="results" readonly="1" attrs='{"invisible":[("results","!=","合格")]}'/>
<field name="detection_report" attrs='{"invisible":[("results","!=",False)]}'
widget="pdf_viewer"/>