Commit bbb6106a authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

[views] fix payment request description (closes #1381993)

parent ee34f331c9b1
......@@ -148,13 +148,16 @@ class CmtShoppingCartPrimaryView(ShoppingCartPrimaryView):
self._cw.build_url(entity.eid, vid='edition'),
self._cw._('modify your registration')))
if reg == 'not payed for':
rset = self._cw.execute('Any C WHERE C has_shoppingitemtype T, I item_type T, '
'SC items_in_cart I, SC eid %(x)s', dict(x=entity.eid))
conf = rset.get_entity(0,0)
total = sum(item.quantity*item.item.price for item in entity.items_in_cart)
tpe = get_tpe(self._cw)
payreq = cmcic.PaymentRequest()
payreq.reference = str(entity.eid)
payreq.amount = "%.2f" % total
payreq.currency = "EUR"
payreq.description = "Some Conference 2010" # XXX FIXME use title of conference
payreq.description = conf.title ="%d/%m/%Y:%H:%M:%S")
payreq.lang = "EN" = entity.buyer[0].primary_email
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment