1.新增销售和计划权限组2.优化代码格式
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import os
|
||||
import json
|
||||
import base64
|
||||
import math
|
||||
import requests
|
||||
import logging
|
||||
import base64
|
||||
# import subprocess
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
@@ -304,7 +303,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
|
||||
# 验证坯料序列号是否正确
|
||||
def pro_code_is_ok(self, barcode):
|
||||
if barcode != False:
|
||||
if barcode is not False:
|
||||
if barcode != self.pro_code:
|
||||
raise UserError('坯料序列号错误')
|
||||
return False
|
||||
@@ -623,7 +622,7 @@ class CNCprocessing(models.Model):
|
||||
if os.path.splitext(f)[1] == ".pdf":
|
||||
full_path = os.path.join(serverdir, root, f)
|
||||
logging.info('pdf:%s' % full_path)
|
||||
if full_path != False:
|
||||
if full_path is not False:
|
||||
if not cnc_processing.workorder_id.cnc_worksheet:
|
||||
cnc_processing.workorder_id.cnc_worksheet = base64.b64encode(
|
||||
open(full_path, 'rb').read())
|
||||
|
||||
Reference in New Issue
Block a user