Implémentation de la remise.
[photoprint.git] / price.py
index fc74252..83a23bf 100755 (executable)
--- a/price.py
+++ b/price.py
@@ -1,13 +1,23 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
-############################################################
-# Copyright © 2009 Benoît PIN <pinbe@luxia.fr>             #
-# Cliché - http://luxia.fr                                 #
-#                                                          #
-# This program is free software; you can redistribute it   #
-# and/or modify it under the terms of the Creative Commons #
-# "Attribution-Noncommercial 2.0 Generic"                  #
-# http://creativecommons.org/licenses/by-nc/2.0/           #
-############################################################
+#######################################################################################
+# Copyright © 2009 Benoît Pin <pin@cri.ensmp.fr>                                      #
+# Plinn - http://plinn.org                                                            #
+#                                                                                     #
+#                                                                                     #
+#   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 the Free Software Foundation; either version 2                    #
+#   of the License, or (at your option) any later version.                            #
+#                                                                                     #
+#   This program is distributed in the hope that it will be useful,                   #
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of                    #
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                     #
+#   GNU General Public License for more details.                                      #
+#                                                                                     #
+#   You should have received a copy of the GNU General Public License                 #
+#   along with this program; if not, write to the Free Software                       #
+#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.   #
+#######################################################################################
 """
 Pricing types
 
 """
 Pricing types
 
@@ -70,7 +80,7 @@ class Price(object, Persistent) :
                        n = str(round(n, 2))
                        i, d = n.split('.')
                        ds = _(u'${i}.${d}', mapping={'i':i, 'd':d}, default=n)
                        n = str(round(n, 2))
                        i, d = n.split('.')
                        ds = _(u'${i}.${d}', mapping={'i':i, 'd':d}, default=n)
-                       return  translate(ds, getRequest()).encode('utf-8')
+                       return  translate(ds).encode('utf-8')
        
        def getValues(self) :
                values = {'value':self._price,
        
        def getValues(self) :
                values = {'value':self._price,