sf物流优化

This commit is contained in:
mgw
2024-06-26 16:34:04 +08:00
parent f5be9c6e65
commit 7fd3647afb
2 changed files with 51 additions and 37 deletions

View File

@@ -5,7 +5,7 @@ import requests
import cpca
# from odoo.exceptions import UserError
# from odoo.exceptions import ValidationError
from odoo import api, fields, models
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
@@ -165,11 +165,17 @@ class JdEclp(models.Model):
self.is_bill = True
self.logistics_status = '1'
# # 京东物流下单后,销售订单状态改为待收货
# self.env['sale.order'].search([('name', '=', self.origin)]).write({'scheduled_status': 'to receive'})
# else:
# raise UserError("选择京东物流才能下单呦")
notification = {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': _('成功'),
'type': 'success',
'message': '物流下单成功',
'sticky': False,
}
}
return notification
def get_bill(self):
"""