Skip to content

Commit

Permalink
订单增加extraInfo额外信息的传递与保存
Browse files Browse the repository at this point in the history
  • Loading branch information
JoneXiong committed Dec 1, 2022
1 parent bd8e03c commit 9fbc048
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def create(self, sub_domain, **kwargs):
'entry': entry,
}
order_dict.update(kwargs)
if kwargs.get('extraInfo'):
extraInfo = json.loads(kwargs.get('extraInfo'))
order_dict.update(extraInfo)
order_dict['_params'] = {'calculate': calculate, 'isNeedLogistics': isNeedLogistics}
order_dict['_params'].update(kwargs)
_logger.info('>>> order_dict %s', order_dict)
Expand Down Expand Up @@ -320,7 +323,7 @@ def get_statusStr(self, order):

def get_orders_domain(self, status, **kwargs):
domain = [('partner_id', '=', request.wechat_user.partner_id.id), ('number_goods', '>', 0)]
if status and status!='9':
if status and status!='9' and status.isdigit():
domain.append(('customer_status', '=', defs.OrderRequestStatus.attrs[int(status)]))
return domain

Expand Down

0 comments on commit 9fbc048

Please sign in to comment.