Browse Source

[FIX] Travis is failing when test are creating orders via create_from_ui when pos_loyalty is installed

pull/414/head
Sylvain LE GAL 6 years ago
committed by Wolfgang Pichler
parent
commit
cae6c96865
  1. 2
      pos_loyalty/models/pos_order.py

2
pos_loyalty/models/pos_order.py

@ -24,7 +24,7 @@ class PosOrder(models.Model):
res = super(PosOrder, self).create_from_ui(orders)
for order in orders:
order_partner = order['data']['partner_id']
order_points = order['data']['loyalty_points']
order_points = order['data'].get('loyalty_points', 0)
if order_points != 0 and order_partner:
partner = self.env['res.partner'].browse(order_partner)
partner.loyalty_points += order_points

Loading…
Cancel
Save