When defining a _rec_name pointing to a m2o, name_get returns the id of the m2o instead of the printable name

Bug #927669 reported by Antoine(OpenERP)
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP's Framework R&D

Bug Description

Install project long term

1) add a user in Planning of users in a project phase.
2) Go in gantt view (in Planning of usrs)
3) Why is the id of the user displayed instead of the name of the planning we we're adding the lines on ?

Related branches

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello,

I have checked you Issue at my end,
For Issue#1, I have faced the same problem of user Id. That's why I attached the screen sort would you please check It.

For Issue#2, you are talk about "adding the lines on". So here you can change the start date of "project.user.allocation" by dragging the chart-bar. It's working fine as expected.

So I am setting this as "confirm" for Issue#1.

Thanks!

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :
affects: openobject-addons → openerp-web
Changed in openerp-web:
status: New → Confirmed
importance: Undecided → Low
Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Revision history for this message
Vaibhav Darji (vaibhav-openerp) wrote :

Hello Antoine,

I think this issue should be solved from server side.
name_get should return `name` when there is case of many2one not `ID`.

Please correct me if I am missing something.

Thanks

Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

The gantt view simply uses the name_get() result as printable name.
Here is a result from a small ipython session:

In [11]: ids = connection.get_model("project.user.allocation").search([])

In [12]: ids
Out[12]: [2]

In [13]: connection.get_model("project.user.allocation").name_get(ids)
Out[13]: [[2, '1']]

Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

According to odo that's a server problem.

Changed in openerp-web:
importance: Low → Medium
affects: openerp-web → openobject-server
summary: - Long term planning, planning of users is displaying the id of the users
- in gantt view instead of project phase (usability)
+ When defining a _rec_name pointing to a m2o, name_get returns the id of
+ the m2o instead of the printable name
Changed in openobject-server:
status: Confirmed → In Progress
Changed in openobject-server:
status: In Progress → Confirmed
Amit Parik (amit-parik)
Changed in openobject-server:
assignee: OpenERP R&D Web Team (openerp-dev-web) → OpenERP's Framework R&D (openerp-dev-framework)
Changed in openobject-server:
status: Confirmed → In Progress
Revision history for this message
Randhir Mayatra (OpenERP) (rma-openerp) wrote :

Hello,

 We have traced issue at our end and it is valid point. We have fix bug in branch lp:~openerp-commiter/openobject-server/trunk-bug-927669-rma at revision no# 4181 and we have proposed branch for merging in trunk server branch.

Thank you.

Changed in openobject-server:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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