[project][field][doc_count] wrong type

Bug #1251773 reported by Yanina Aular (Vauxoo)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team

Bug Description

Function field with wrong type int instead of integer

1) Steps to reproduce the issue you have observed

run the following webservice:

import oerplib
oerp = oerplib.OERP(server='localhost', port='10000', timeout=4000)
oerp.login(database='hu_owner')
user_story_obj = oerp.get('user.story')
user_story_ids = user_story_obj.search([])
us_brw = user_story_obj.browse( user_story_ids[0] )
us_brw.project_id

2) The result you observed

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/oerplib/service/osv/fields.py", line 249, in __get__
    self.relation, id_[0], context)
  File "/usr/local/lib/python2.7/dist-packages/oerplib/oerp.py", line 404, in browse
    return self.get(model).browse(ids, context)
  File "/usr/local/lib/python2.7/dist-packages/oerplib/oerp.py", line 558, in get
    return osv.Model(self, model)
  File "/usr/local/lib/python2.7/dist-packages/oerplib/service/osv/osv.py", line 65, in __init__
    self._browse_class = self._generate_browse_class()
  File "/usr/local/lib/python2.7/dist-packages/oerplib/service/osv/osv.py", line 114, in _generate_browse_class
    self, field_name, field_data)
  File "/usr/local/lib/python2.7/dist-packages/oerplib/service/osv/fields.py", line 538, in generate_field
    txt.format(field_name=name, field_type=data['type']))
InternalError: Can't instanciate the field 'doc_count', 'int' type unknown

3) The result you expected

browse_record('project.project', 11)

4) The platform you are using (and browser version, if relevant)

Debian - Gnome - 64 bits

5) The OpenERP version you are using (e.g. 6.1.1-20120910-233309), if possible including the specific revision (e.g. r.2824) if you use the source repositories.

versión Openerp 7.0

6) Solution:

https://code.launchpad.net/~vauxoo/openobject-addons/7.0-project_fix_doc_count

Tags: maintenance

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-addons:
status: New → In Progress
importance: Undecided → Low
Revision history for this message
Somesh Khare (somesh.khare) wrote :

Hello Yanina Aular,

I have propose the fix of your branch here are the revision details,

Revision ID: <email address hidden>
Revision Number:9587

Soon our experts will review this branch and will merge it into stable 7.0.

Thanks & Regards,
Somesh Khare

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Yanina Aular (Vauxoo) (yanina-aular) wrote :

Thanks guys.

Revision history for this message
Yanina Aular (Vauxoo) (yanina-aular) wrote :

Hello, this problem is unsolved. Please make the appropriate merge. Thanks & Regards

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

I'm preparing a MP for the OCB branch

Revision history for this message
Yanina Aular (Vauxoo) (yanina-aular) wrote :

Thanks Alexandre

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello,

Thanks for the report and patch, it was merged in 7.0

revno: 9938 [merge]
revision-id: <email address hidden>

Changed in openobject-addons:
status: Fix Committed → Fix Released
no longer affects: ocb-addons
no longer affects: ocb-addons/7.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.