Reviewers: ,


Please review this at http://codereview.tryton.org/198003/

Affected files:
  M sale.py


Index: sale.py
===================================================================

--- a/sale.py
+++ b/sale.py
@@ -12,6 +12,7 @@
 from trytond.pyson import If, Eval, Bool, PYSONEncoder
 from trytond.transaction import Transaction
 from trytond.pool import Pool
+from trytond.config import CONFIG


 class Sale(ModelWorkflow, ModelSQL, ModelView):
@@ -316,7 +317,7 @@
             party = party_obj.browse(vals['party'])
             if party.lang:
                 return party.lang.code
-        return 'en_US'
+        return CONFIG['language']

     def get_party_lang(self, sales):
         '''
@@ -331,7 +332,7 @@
             if sale.party.lang:
                 res[sale.id] = sale.party.lang.code
             else:
-                res[sale.id] = 'en_US'
+                res[sale.id] = CONFIG['language']
         return res





--
tryton-dev@googlegroups.com mailing list

Reply via email to