优化wrong-import-order问题
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#import cpca
|
||||
import logging
|
||||
# import cpca
|
||||
import base64
|
||||
import requests
|
||||
import logging
|
||||
from datetime import datetime
|
||||
import requests
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
||||
@@ -37,7 +37,7 @@ class JdEclp(models.Model):
|
||||
deliveryType = fields.Selection([('6', '特快零担'), ('25', '特快重货')], string='运输类型', default='25')
|
||||
# bill = fields.Char(string='物流面单')
|
||||
|
||||
# bill = fields.Many2one('ir.attachment', string='物流面单', compute='query_bill_pdf')
|
||||
# bill = fields.Many2one('ir.attachment', string='物流面单', compute='query_bill_pdf')
|
||||
# bill_show = fields.Binary(string='物流面单展示', readonly=True, related='self.bill.datas')
|
||||
bill_show = fields.Binary(string='物流面单展示', readonly=True)
|
||||
|
||||
@@ -48,10 +48,11 @@ class JdEclp(models.Model):
|
||||
@api.depends('origin')
|
||||
def _truck_info(self):
|
||||
# if 'S' in self.origin:
|
||||
# if self.receiverName and self.receiverMobile and self.receiverProvinceName and self.receiverCityName and self.receiverCountyName and self.receiverTownName:
|
||||
# if self.receiverName and self.receiverMobile and self.receiverProvinceName and self.receiverCityName and
|
||||
# self.receiverCountyName and self.receiverTownName:
|
||||
sale_order_id = self.env['sale.order'].search([('name', '=', self.origin)])
|
||||
# stock_picking_type_id = self.enc['stock.picking.type'].search([('picking_type_id', '=', '')])
|
||||
# if sale_order_id.address_of_delivery != False:
|
||||
# stock_picking_type_id = self.enc['stock.picking.type'].search([('picking_type_id', '=', '')])
|
||||
# if sale_order_id.address_of_delivery != False:
|
||||
try:
|
||||
if 'OUT' in self.name:
|
||||
raw_addres = sale_order_id.address_of_delivery.split('这是一个标志位,用来不分隔字符串')
|
||||
@@ -78,8 +79,6 @@ class JdEclp(models.Model):
|
||||
print(f"Error address is none: {e}")
|
||||
pass
|
||||
|
||||
|
||||
|
||||
def create_order(self):
|
||||
# sale_order_id = self.env['sale.order'].search([('name', '=', self.origin)])
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
||||
from odoo.exceptions import ValidationError
|
||||
from collections import defaultdict, namedtuple
|
||||
from datetime import datetime
|
||||
import logging
|
||||
from odoo.exceptions import UserError
|
||||
import requests
|
||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.exceptions import ValidationError
|
||||
from collections import defaultdict, namedtuple
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import base64
|
||||
from collections import defaultdict, namedtuple
|
||||
from odoo.addons.stock.models.stock_rule import ProcurementException
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
import requests
|
||||
import logging
|
||||
import json
|
||||
from re import findall as regex_findall
|
||||
from datetime import datetime, timedelta
|
||||
from re import split as regex_split
|
||||
import requests
|
||||
from odoo import SUPERUSER_ID, _, api, fields, models
|
||||
from odoo.tools import float_compare
|
||||
import logging
|
||||
|
||||
from collections import defaultdict, namedtuple
|
||||
from odoo.addons.stock.models.stock_rule import ProcurementException
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import base64
|
||||
import json
|
||||
import requests
|
||||
from datetime import datetime, timedelta
|
||||
import requests
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user