Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/产品验证
# Conflicts: # sf_manufacturing/models/stock.py # sf_wxwork_approval/models/model.py
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__)
|
||||
|
||||
@@ -105,7 +105,6 @@ class StatusChange(models.Model):
|
||||
#
|
||||
# return True
|
||||
|
||||
|
||||
# def action_cancel(self):
|
||||
# """ Cancel SO after showing the cancel wizard when needed. (cfr `_show_cancel_wizard`)
|
||||
#
|
||||
@@ -205,12 +204,12 @@ class FinishStatusChange(models.Model):
|
||||
[('id', 'child_of', self.picking_type_id.warehouse_id.view_location_id.id),
|
||||
('usage', '!=', 'supplier')])
|
||||
if self.env['stock.move'].search([
|
||||
('state', 'in', ['confirmed', 'partially_available', 'waiting', 'assigned']),
|
||||
('product_qty', '>', 0),
|
||||
('location_id', 'in', wh_location_ids),
|
||||
('move_orig_ids', '=', False),
|
||||
('picking_id', 'not in', self.ids),
|
||||
('product_id', 'in', lines.product_id.ids)], limit=1):
|
||||
('state', 'in', ['confirmed', 'partially_available', 'waiting', 'assigned']),
|
||||
('product_qty', '>', 0),
|
||||
('location_id', 'in', wh_location_ids),
|
||||
('move_orig_ids', '=', False),
|
||||
('picking_id', 'not in', self.ids),
|
||||
('product_id', 'in', lines.product_id.ids)], limit=1):
|
||||
action = self.action_view_reception_report()
|
||||
action['context'] = {'default_picking_ids': self.ids}
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user