Merge lp:~vauxoo/openobject-server/7.0_field_property_searcheable-dev-hbto into lp:openobject-server
Status: | Needs review |
---|---|
Proposed branch: | lp:~vauxoo/openobject-server/7.0_field_property_searcheable-dev-hbto |
Merge into: | lp:openobject-server |
Diff against target: |
174 lines (+150/-0) (has conflicts) 1 file modified
openerp/osv/fields.py (+150/-0) Text conflict in openerp/osv/fields.py |
To merge this branch: | bzr merge lp:~vauxoo/openobject-server/7.0_field_property_searcheable-dev-hbto |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Odoo Administrators | Pending | ||
Nhomar - Vauxoo | Pending | ||
Moisés López - http://www.vauxoo.com | Pending | ||
Review via email: mp+193676@code.launchpad.net |
Description of the change
This proposal tries to solve the problem that arise when trying to
look for property values on models that use them
When searching for property value all records are returned
Unmerged revisions
- 5117. By hbto [Vauxoo] http://www.vauxoo.com
-
[IMP][osv]
[fields] [property] When There is no Default Value and none record
has been set to a value, a search like [('property_field', '=',False) ] should
return the whole universe of values - 5116. By hbto [Vauxoo] http://www.vauxoo.com
-
[FIX][osv]
[fields] [property] Changed variable model in the search that
was giving wrong results, mea culpa.Some improvements have been made to avoid unneed computes
- 5115. By hbto [Vauxoo] http://www.vauxoo.com
-
[IMP][osv]
[fields] [property]
* Operator '!=' is working for m2o fields
This operator was obvious to addMissing operators to develop 'Set' and 'not set'
- 5114. By hbto [Vauxoo] http://www.vauxoo.com
-
[IMP][osv]
[fields] [property]
* Operator 'not like' is working for m2o fields
* Records that use Default values are now being taken into account (Ghost Records) - 5113. By hbto [Vauxoo] http://www.vauxoo.com
-
[FIX] Getting rid of pdb
- 5112. By hbto [Vauxoo] http://www.vauxoo.com
-
[IMP][osv][fields]
search has been implemented for this property fields.'char': 'value_text', #
'float': 'value_float', #
'boolean' : 'value_integer', #
'integer': 'value_integer', #
'text': 'value_text', #
'many2one': 'value_reference', #
'date' : 'value_datetime', #
'datetime' : 'value_datetime', # - 5111. By hbto [Vauxoo] http://www.vauxoo.com
-
[IMP][fields]
[property] We are in the process of converting the whole
property fields from non-searchable by default to searchable by default
It is not going to be easyIt could that we have to manage with a subset of features and not all the
features available as there are for the non-functional fieldsAs of now, only property many2one fields are searchable, with
operator ['ilike', 'in', '=']Default values for the property fields are not taken into account
So now it is just working for those property values that are really belonging to
the records they have been assigned.CAUTION: With this DIFF all your Property fields will become searchable, It means
that you will be able to pick them from Advance Search, Though it does not mean
that your search it's gonna work!!!This webservice can be usefull to make a Proof of Concept about the
workability of this DIFFCreate a DB, name it 'property', set data demo to True
Copy & Paste the code below,
Change some of the accounts of your partners to an account
different than the one as Default e.g. 'Creditors (test)' or 'Debitors (test)'
run your new webservice.I Works!!!.
=======
======= ======= ======= ======= ======= ======= ======= ======= ======= === #!/usr/bin/python
import oerplib
DB = 'property'
oerp = oerplib.OERP(server= 'localhost' ,database= DB,port= 8069,timeout= 4000)
USERS = ['admin']
PSSWS = {}.fromkeys(USERS,' admin') for USER in USERS:
oerp.login(user= USER, passwd=PSSWS[USER], database=DB)
am_ids = oerp.search('res.partner' ,[
' |',
( 'property_ account_ payable. type',' =','payable' ),
( 'property_ account_ receivable. type',' =','receivable' ),
] )
print 'AM IDS ',am_ids