diff --git a/sf_bf_connect/models/jd_eclp.py b/sf_bf_connect/models/jd_eclp.py index c2b8deb7..bdcfba47 100644 --- a/sf_bf_connect/models/jd_eclp.py +++ b/sf_bf_connect/models/jd_eclp.py @@ -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): """ diff --git a/sf_bf_connect/views/view.xml b/sf_bf_connect/views/view.xml index 6db5cb1d..184d0e71 100644 --- a/sf_bf_connect/views/view.xml +++ b/sf_bf_connect/views/view.xml @@ -32,7 +32,7 @@ -