Merge lp:~openerp-dev/openobject-server/trunk-M2O_with_selection-rga into lp:openobject-server

Proposed by Ravi Gadhia (OpenERP)
Status: Superseded
Proposed branch: lp:~openerp-dev/openobject-server/trunk-M2O_with_selection-rga
Merge into: lp:openobject-server
Diff against target: 13 lines (+0/-3)
1 file modified
openerp/osv/orm.py (+0/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-M2O_with_selection-rga
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Resubmitting
OpenERP buildbot (community) Approve
Review via email: mp+53392@code.launchpad.net

This proposal has been superseded by a proposal from 2011-04-19.

Description of the change

Hello,

Improve selection field.

Now M2O field with widget="selection" no need to pre-load selection value (at time of fields_view_get) it's(combobox) get value on popup by name_search and we can apply domain as like M2O field

related client branch:
lp:~openerp-dev/openobject-client/trunk-m2o_with_selection-rga

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

Hello,

The diff shows that you partially removed the code for widget="selection". you need to completely remove the implementation of widget="selection" from the server i.e the domains, context handling part. approx line no. in orm.py is 1227 to 1246

Thanks,

review: Needs Resubmitting
3370. By Ravi Gadhia (OpenERP)

[IMP] client call name_search when combobox popup so no need to eval domain/context here

3371. By Ravi Gadhia (OpenERP)

Merge with trunk server

Unmerged revisions

3371. By Ravi Gadhia (OpenERP)

Merge with trunk server

3370. By Ravi Gadhia (OpenERP)

[IMP] client call name_search when combobox popup so no need to eval domain/context here

3369. By Ravi Gadhia (OpenERP)

[IMP] Improve selection field at client side so it's no need to send selection value at view load time, client get it's by name_search when combobox popup

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 2011-02-21 17:27:57 +0000
3+++ openerp/osv/orm.py 2011-03-15 10:04:28 +0000
4@@ -1241,9 +1241,6 @@
5 search_context = dict(context)
6 if column._context and not isinstance(column._context, basestring):
7 search_context.update(column._context)
8- attrs['selection'] = relation._name_search(cr, user, '', dom, context=search_context, limit=None, name_get_uid=1)
9- if (node.get('required') and not int(node.get('required'))) or not column.required:
10- attrs['selection'].append((False, ''))
11 fields[node.get('name')] = attrs
12
13 elif node.tag in ('form', 'tree'):