[trunk] ManyToOne().open_record() JS function on 'onclick' action doesn't work

Bug #729354 reported by Denis Konchekov
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Status tracked in 6.0
6.0
Fix Released
Low
OpenERP R&D Web Team
Trunk
Fix Released
Low
OpenERP R&D Web Team

Bug Description

Steps to reproduce:
    1) Go to Sales -> Address Book -> Customers.
    2) Go to form view of any customer.
    3) Click on m2o object link, for example, Country.

Expected behaviour:
    Window or popup of related record must be opened.

Actual behaviour:
    Nothing happened.

Checked in Opera 11.01, Firefox 4.0b, Google Chrome 8.
JS error traceback in Opera console:

####
Uncaught exception: TypeError: Cannot convert 'this.text' to object

Error thrown at line 186, column 4 in <anonymous function: ManyToOne.prototype.get_context>() in http://localhost:8080/openerp/static/javascript/m2o.js:
    return jQuery(this.field).attr('context').replace(
called from line 147, column 4 in <anonymous function: ManyToOne.prototype.open>(id) in http://localhost:8080/openerp/static/javascript/m2o.js:
    eval_domain_context_request({
called from line 131, column 8 in <anonymous function: ManyToOne.prototype.open_record>() in http://localhost:8080/openerp/static/javascript/m2o.js:
    this.open(this.field.value);
called from line 1, column 0 in <anonymous function>(event):
    new ManyToOne('country_id').open_record('183')
####

Related branches

Revision history for this message
m.karrer (m-karrer) wrote :

This is happening in the 6.1 stabel webclient also.

I guess it has something to do with:
4525 [FIX] m2o missing record: don't leave incorrect values in th...
[FIX] m2o missing record: don't leave incorrect values in the m2o text field when not creating unknown related object
4524 [FIX] m2o: context values can contain 'self' which is a refe...

I will check if revisions before 4524 (of the 6.0 branch) work.

Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-client-web:
status: Confirmed → In Progress
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello Denis Konchekov, m.karrer,

The fix for web-client has been committed to lp:~openerp-dev/openobject-client-web/trunk-bug-729354-sma
with the following revision.
Revision-info:
4590 <email address hidden>

Soon it will be merged into trunk web-client.

Thank you for notifying.

Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Sorry fixed with the following revision.
4608 <email address hidden>

Changed in openobject-client-web:
status: In Progress → Fix Committed
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.