From 0712d7b05bb620fabfd6ea054d2e2c9fd536809a Mon Sep 17 00:00:00 2001 From: "xiongjianhong@gmail.com" Date: Sun, 11 Dec 2022 21:44:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0action=5Faccounted?= =?UTF-8?q?=E8=AE=B0=E8=B4=A6=E5=8A=A8=E4=BD=9C=EF=BC=9B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=AF=E6=8C=82=E6=AC=A0=E9=A2=9D=E5=BA=A6=E7=9A=84=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/order.py | 1 + controllers/user.py | 1 + models/sale_order.py | 7 ++++++- models/wxapp_user.py | 5 ++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/controllers/order.py b/controllers/order.py index 5efa656..533e855 100644 --- a/controllers/order.py +++ b/controllers/order.py @@ -138,6 +138,7 @@ def create(self, sub_domain, **kwargs): #mail_template = request.env.ref('wechat_mall_order_create') #mail_template.sudo().send_mail(order.id, force_send=True, raise_exception=False) + order.action_accounted(order_dict) order.action_created(order_dict) _data = { "amountReal": round(order.amount_total, 2), diff --git a/controllers/user.py b/controllers/user.py index 06cbabb..14f4009 100644 --- a/controllers/user.py +++ b/controllers/user.py @@ -242,6 +242,7 @@ def user_amount(self, sub_domain, token=None, **kwargs): return res _data = { 'balance': wechat_user.get_balance(), + 'creditLimit': wechat_user.get_credit_limit(), 'freeze': 0, 'score': wechat_user.get_score(), 'totleConsumed': 0, diff --git a/models/sale_order.py b/models/sale_order.py index cee1c43..918692f 100644 --- a/models/sale_order.py +++ b/models/sale_order.py @@ -31,7 +31,8 @@ class SaleOrder(models.Model): shipper_id = fields.Many2one('oe.shipper', string='承运商', track_visibility='onchange', copy=False) shipper_no = fields.Char('运单号', track_visibility='onchange', copy=False) shipper_traces = fields.Text('物流信息', copy=False) - is_paid = fields.Boolean('已支付', default=False) + + is_paid = fields.Boolean('已支付', default=False) #在线支付或余额支付 @@ -138,3 +139,7 @@ def action_receive(self): def get_detail_ext(self, data): pass + + @api.multi + def action_accounted(self, data=None): + pass \ No newline at end of file diff --git a/models/wxapp_user.py b/models/wxapp_user.py index 27962c7..5af89e6 100644 --- a/models/wxapp_user.py +++ b/models/wxapp_user.py @@ -77,4 +77,7 @@ def get_balance(self): return hasattr(self, 'balance') and self.balance or 0 def get_score(self): - return hasattr(self, 'score') and self.score or 0 \ No newline at end of file + return hasattr(self, 'score') and self.score or 0 + + def get_credit_limit(self): + return 0 \ No newline at end of file From 0500f043440539ab59d31da4199163d465a28db1 Mon Sep 17 00:00:00 2001 From: "xiongjianhong@gmail.com" Date: Mon, 12 Dec 2022 15:52:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E7=88=B6=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/parent_menus.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/views/parent_menus.xml b/views/parent_menus.xml index 8a55e9e..ee422a2 100644 --- a/views/parent_menus.xml +++ b/views/parent_menus.xml @@ -6,6 +6,7 @@ +