def shipping(self, items): shippings = Shippings(self.context) shipping = shippings.get(self.shipping_method) try: return { 'label': shipping.label, 'description': shipping.description, 'net': shipping.net(items), 'vat': shipping.vat(items), } # B/C for bda.plone.shipping < 0.4 except NotImplementedError: return { 'label': shipping.label, 'description': shipping.description, 'net': shipping.calculate(items), 'vat': Decimal(0), }
def shipping(self, items): shippings = Shippings(self.context) shipping = shippings.get(self.shipping_method) return shipping.calculate(items)