Merge lp:~openerp-dev/openobject-server/6.0-opw-50831-skh into lp:openobject-server/6.0

Proposed by Somesh Khare
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 3551
Merged at revision: 3574
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-50831-skh
Merge into: lp:openobject-server/6.0
Diff against target: 25 lines (+12/-0)
1 file modified
bin/osv/fields.py (+12/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-50831-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Vinay Rana (OpenERP) Pending
Priyesh (OpenERP) Pending
Review via email: mp+85825@code.launchpad.net

Description of the change

Hello Sir,

[Fix]: Back ported from the Trunk Server Revision:3473 .

Issue :
       1.Create a Sale order from the Opportunity form after clicking on the button " Convert to Quote" with login: admin.

       2. delete the newly created Sales Order.
       3. Login with the user "demo".
       4. Open the form view for the all Opportunity. Access Error raised for the sales order.

This branch fixes the issue into the stable 6.0.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/fields.py'
2--- bin/osv/fields.py 2011-11-16 11:26:27 +0000
3+++ bin/osv/fields.py 2011-12-15 10:29:24 +0000
4@@ -149,9 +149,21 @@
5
6 class reference(_column):
7 _type = 'reference'
8+ _classic_read = False
9 def __init__(self, string, selection, size, **args):
10 _column.__init__(self, string=string, size=size, selection=selection, **args)
11
12+ def get(self, cr, obj, ids, name, uid=None, context=None, values=None):
13+ result = {}
14+ # copy initial values fetched previously.
15+ for value in values:
16+ result[value['id']] = value[name]
17+ if value[name]:
18+ model, res_id = value[name].split(',')
19+ if not obj.pool.get(model).exists(cr, uid, [int(res_id)], context=context):
20+ result[value['id']] = False
21+ return result
22+
23
24 class char(_column):
25 _type = 'char'