Merge lp:~zaber/openobject-server/null-access-group into lp:openobject-server/6.1

Proposed by Don Kirkby
Status: Needs review
Proposed branch: lp:~zaber/openobject-server/null-access-group
Merge into: lp:openobject-server/6.1
Diff against target: 12 lines (+2/-0)
1 file modified
openerp/osv/orm.py (+2/-0)
To merge this branch: bzr merge lp:~zaber/openobject-server/null-access-group
Reviewer Review Type Date Requested Status
Amit Parik (community) Approve
OpenERP Core Team Pending
Review via email: mp+118837@code.launchpad.net

Description of the change

Add a special case that checks for the specific field I had a problem with, and force it to False if it's empty on the current record. I tried always using null for any missing field, but that caused an error.

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) :
review: Approve

Unmerged revisions

4259. By Don Kirkby

[FIX] Explicitly set group_id to null if necessary.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/osv/orm.py'
2--- openerp/osv/orm.py 2012-07-13 12:57:28 +0000
3+++ openerp/osv/orm.py 2012-08-08 21:57:19 +0000
4@@ -1413,6 +1413,8 @@
5 if len(warning):
6 cr.rollback()
7 return -1, res, 'Line ' + str(position) +' : ' + '!\n'.join(warning), ''
8+ if self._name == 'ir.model.access' and 'group_id' not in res:
9+ res['group_id'] = False
10
11 try:
12 ir_model_data_obj._update(cr, uid, self._name,