From 7fd3647afbc6bf186405f43bb53ddd3a65e86ae5 Mon Sep 17 00:00:00 2001
From: mgw <1392924357@qq.com>
Date: Wed, 26 Jun 2024 16:34:04 +0800
Subject: [PATCH] =?UTF-8?q?sf=E7=89=A9=E6=B5=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_bf_connect/models/jd_eclp.py | 18 ++++++---
sf_bf_connect/views/view.xml | 70 ++++++++++++++++++---------------
2 files changed, 51 insertions(+), 37 deletions(-)
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 @@
-
@@ -45,42 +45,50 @@
stock.picking
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ tracking only
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file