Allow no sender and receiver
This commit is contained in:
parent
4061765f48
commit
04cdf054c4
|
@ -190,7 +190,7 @@ class Internetmarke(object):
|
||||||
atype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}NamedAddress')
|
atype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}NamedAddress')
|
||||||
return atype(name = name, address = address)
|
return atype(name = name, address = address)
|
||||||
|
|
||||||
def build_position(self, product, sender, receiver, layout = "AddressZone", pdf = False, x=1, y=1, page=1):
|
def build_position(self, product, sender=None, receiver=None, layout="AddressZone", pdf=False, x=1, y=1, page=1):
|
||||||
zclient = self.client
|
zclient = self.client
|
||||||
abtype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}AddressBinding')
|
abtype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}AddressBinding')
|
||||||
postype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}VoucherPosition')
|
postype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}VoucherPosition')
|
||||||
|
@ -201,6 +201,6 @@ class Internetmarke(object):
|
||||||
pos = 'ShoppingCartPosition'
|
pos = 'ShoppingCartPosition'
|
||||||
args = {}
|
args = {}
|
||||||
ptype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}' + pos)
|
ptype = zclient.get_type('{http://oneclickforapp.dpag.de/V3}' + pos)
|
||||||
ab = abtype(sender = sender, receiver = receiver)
|
ab = abtype(sender = sender, receiver = receiver) if sender and receiver else None
|
||||||
return ptype(productCode = product, address = ab,
|
return ptype(productCode = product, address = ab,
|
||||||
voucherLayout = layout, **args)
|
voucherLayout = layout, **args)
|
||||||
|
|
Loading…
Reference in New Issue