oerp.get('xxx') can't handle field type 'string'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OERPLib |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Attempting to get the "Sales Teams" module causes exception:
* * * * * * * In oerp.py(
Traceback (most recent call last):
File "./try.py", line 15, in <module>
theCrmCaseS
File "/usr/local/
return osv.Model(self, model)
File "/usr/local/
self.
File "/usr/local/
self, field_name, field_data)
File "/usr/local/
txt.
oerplib.
Fix :
yourself@
532c532
< 'boolean', 'text', 'binary', 'html']:
---
> 'boolean', 'text', 'binary', 'html', 'string']:
Changed in oerplib: | |
status: | New → Confirmed |
Changed in oerplib: | |
status: | Fix Committed → Fix Released |
Hi Martin,
Is it OpenERP v8? I suspect a "bug" in this version as "fields.string" does not exist, and it appears to be used as a type in some fields.function instead of the type "char":
openerp@ oerp:~/ instances/ openerp- 8.0/openerp/ addons$ grep -Hn "type=.string." $(find . -name "*.py") _get_opportunit ies_data' , _get_opportunit ies_data' , crm/sale_ crm.py: 105: type='string', readonly=True, multi=' _get_sale_ orders_ data', crm/sale_ crm.py: 108: type='string', readonly=True, multi=' _get_sale_ orders_ data', crm/sale_ crm.py: 111: type='string', readonly=True,
./crm/crm.py:175: type="string", readonly=True, multi='
./crm/crm.py:178: type="string", readonly=True, multi='
./sale_
./sale_
./sale_
These fields seem to have been introduced from the v8.0.
Anyway, in OERPLib, maybe the best choice would be to set the "char" type by default for unknown type, raising an exception can be a blocking point...