Merge lp:~openerp-dev/openerp-web/7.0-bug-1182101-darshan into lp:openerp-web/7.0

Proposed by Darshan Kalola(OpenERP)
Status: Rejected
Rejected by: Nicolas Vanhoren (OpenERP)
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1182101-darshan
Merge into: lp:openerp-web/7.0
Diff against target: 19 lines (+8/-1)
1 file modified
addons/web/static/lib/py.js/lib/py.js (+8/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1182101-darshan
Reviewer Review Type Date Requested Status
Csaba TOTH (community) Approve
Xavier (Open ERP) (community) Disapprove
Lara (Therp) (community) testing Approve
Review via email: mp+165964@code.launchpad.net

Description of the change

Hello,

             I have fixed the issue of Journal entry: Cannot read property 'id' of null and Object can not be converted to JSON

Thanks
Darshan

To post a comment you must log in.
Revision history for this message
Lorenzo Battistini (elbati) wrote :

This works for me

Revision history for this message
Lara (Therp) (lfreeke) wrote :

I tested the fix and it works

review: Approve (testing)
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

What is the justification for randomly converting completely arbitrary objects?

review: Disapprove
Revision history for this message
hiren (hiren-6) wrote :

Any update on this? It affects us too, and is pretty bad since it breaks on what we consider core functionality for openerp.

Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello Xavier,

I think darshan has just backported the fix from trunk revision 3547.

Would you please go through this revision, he has converted object for one2many field in context and domain.

Thanks.

Revision history for this message
Dave Burkholder (akxws32zf-dave-j0p9h616h) wrote :

What is the update on this fix? It's an exasperating bug on some pretty elemental functionality. Very hard to avoid the problem.

Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

Despite the fact it could work in some cases, I asked Xavier that did that previous fix and he said he removed it for a good reason and we should not re-introduce it. So we'll find another solution.

Revision history for this message
Csaba TOTH (tsabi) wrote :

I tried to revert this fix from my private branch, and immediately some of my wizards started to not work. So i needed to re merge this patch!
So i vote an approve!

review: Approve

Unmerged revisions

3937. By Darshan Kalola(OpenERP)

Journal entry: Cannot read property 'id' of null

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/lib/py.js/lib/py.js'
2--- addons/web/static/lib/py.js/lib/py.js 2013-05-17 16:22:15 +0000
3+++ addons/web/static/lib/py.js/lib/py.js 2013-05-28 06:40:34 +0000
4@@ -764,7 +764,14 @@
5
6 // Conversion
7 toJSON: function () {
8- throw new Error(this.constructor.name + ' can not be converted to JSON');
9+ var out = {};
10+ for(var k in this) {
11+ if (this.hasOwnProperty(k) && !/^__/.test(k)) {
12+ var val = this[k];
13+ out[k] = val.toJSON ? val.toJSON() : val;
14+ }
15+ }
16+ return out;
17 }
18 });
19 var NoneType = py.type('NoneType', null, {