projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdfaf1e
)
[FIX] allows XML exports of fields.selection with integer key
author
Stefan Rijnhart
<stefan@therp.nl>
Thu, 29 Sep 2011 10:08:02 +0000
(12:08 +0200)
committer
Stefan Rijnhart
<stefan@therp.nl>
Thu, 29 Sep 2011 10:08:02 +0000
(12:08 +0200)
lp bug: https://launchpad.net/bugs/696176 fixed
bzr revid: stefan@therp.nl-
20110929100802
-1fsffcccsul0n24a
addons/base_module_record/base_module_record.py
patch
|
blob
|
history
diff --git
a/addons/base_module_record/base_module_record.py
b/addons/base_module_record/base_module_record.py
index
0208e6c
..
af63a0c
100644
(file)
--- a/
addons/base_module_record/base_module_record.py
+++ b/
addons/base_module_record/base_module_record.py
@@
-104,7
+104,8
@@
class base_module_record(osv.osv):
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' )