← Back to team overview

openerp-community team mailing list archive

[Merge] lp:~openerp-community/openobject-addons/stefan-therp_lp696176 into lp:openobject-addons/6.0

 

Stefan Rijnhart (Therp) has proposed merging lp:~openerp-community/openobject-addons/stefan-therp_lp696176 into lp:openobject-addons/6.0.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #696176 in OpenERP Addons: "TypeError: node contents must be a string when using base_module_record "
  https://bugs.launchpad.net/openobject-addons/+bug/696176

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/stefan-therp_lp696176/+merge/63668
-- 
https://code.launchpad.net/~openerp-community/openobject-addons/stefan-therp_lp696176/+merge/63668
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/stefan-therp_lp696176.
=== modified file 'base_module_record/base_module_record.py'
--- base_module_record/base_module_record.py	2011-01-14 00:11:01 +0000
+++ base_module_record/base_module_record.py	2011-06-07 09:56:11 +0000
@@ -146,7 +146,8 @@
         for key,val in data.items():
             if not (val or (fields[key]['type']=='boolean')):
                 continue
-            if fields[key]['type'] in ('integer','float'):
+            if (fields[key]['type'] in ('integer','float') or
+                fields[key]['type'] == 'selection' and isinstance(val, int)):
                 field = doc.createElement('field')
                 field.setAttribute("name", key)
                 field.setAttribute("eval", val and str(val) or 'False' )


Follow ups