Merge lp:~openerp-community/openobject-addons/stefan-therp_lp696176-6.1 into lp:openobject-addons

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Approved by: Olivier Dony (Odoo)
Approved revision: no longer in the source branch.
Merged at revision: 5514
Proposed branch: lp:~openerp-community/openobject-addons/stefan-therp_lp696176-6.1
Merge into: lp:openobject-addons
Diff against target: 13 lines (+2/-1)
1 file modified
base_module_record/base_module_record.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-community/openobject-addons/stefan-therp_lp696176-6.1
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Approve
Review via email: mp+77493@code.launchpad.net

Description of the change

This branch fixes a bug that prevents base_record_module to produce an xml data file for a model containing a fields.selection with integer type keys (account.account.type is a good test case).

To post a comment you must log in.
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Looks good to me.

(need to double-check if it still merges cleanly with the recent/pending changes to audit_trail, but should be easy enough)

review: Approve
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Just merged, thanks a lot for the fix!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_module_record/base_module_record.py'
2--- base_module_record/base_module_record.py 2011-06-15 15:31:51 +0000
3+++ base_module_record/base_module_record.py 2011-09-29 10:21:16 +0000
4@@ -104,7 +104,8 @@
5 for key,val in data.items():
6 if not (val or (fields[key]['type']=='boolean')):
7 continue
8- if fields[key]['type'] in ('integer','float'):
9+ if (fields[key]['type'] in ('integer','float') or
10+ fields[key]['type'] == 'selection' and isinstance(val, int)):
11 field = doc.createElement('field')
12 field.setAttribute("name", key)
13 field.setAttribute("eval", val and str(val) or 'False' )

Subscribers

People subscribed via source and target branches

to all changes: