diff --git a/commerce/interfaces.py b/commerce/interfaces.py index 125028b..824d989 100644 --- a/commerce/interfaces.py +++ b/commerce/interfaces.py @@ -1,6 +1,6 @@ #-*- coding: UTF-8 -*- # -# Copyright (c) 2011 Helmut Merz helmutm@cy55.de +# Copyright (c) 2012 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,8 +19,6 @@ """ Interfaces for the commerce domain like products, customers, orders, ... - -$Id$ """ from zope import schema @@ -381,6 +379,8 @@ class IOrder(Interface): shippingCost = Attribute(u'The cost to be applied for shipping.') additionalCost = Attribute(u'An additional value to be added to the ' u'net value of the order.') + additionalCost2 = Attribute(u'A second additional value to be added to ' + u'the net value of the order.') tax = Attribute(u'The tax value to be added to the net value of the order.') total = Attribute(u'The total gross value (Decimal) of the order.') diff --git a/util/date.py b/util/date.py index e05b89b..0d112a7 100644 --- a/util/date.py +++ b/util/date.py @@ -27,6 +27,9 @@ from datetime import datetime def getTimeStamp(): return int(time.time()) +def date2TimeStamp(d): + return int(time.mktime(d.timetuple())) + def timeStamp2Date(ts, useGM=False): if ts is None: diff --git a/util/html.py b/util/html.py index 69aade7..035da0e 100644 --- a/util/html.py +++ b/util/html.py @@ -28,8 +28,8 @@ from cybertools.text.lib.BeautifulSoup import Declaration, NavigableString validTags = ('a b br div em font h1 h2 h3 i li ol p pre span strong ' 'table td tr u ul').split() -validAttrs = ('align border cellpadding cellspacing class colspan href rowspan ' - 'style title').split() +validAttrs = ('align border cellpadding cellspacing class colspan ' + 'href rowspan style title width').split() validStyles = 'font-style font-weight'.split() validStyleParts = 'border padding'.split()