[7.0] pressing sub-view button causes TypeError in client JS

Bug #1175163 reported by Isaac Richter
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Medium
Nicolas Vanhoren (OpenERP)

Bug Description

I was trying to add a tree subview to an existing form (in this case, embedded within a <page>), and discovered that pressing the buttons that are in the tree caused the client to emit "TypeError: self.ViewManager.ActionManager.__parentedParent.menu is undefined"at http://server-address/web/static/src/js/views.js:1373. The line in question is : self.ViewManager.ActionManager.__parentedParent.menu.do_reload_needaction();

It turns out that by embedding the tree view where I did, I need to go through a few layers of __parentedParent to find the __parentedParent that had a menu property.

I've written a short patch that fixes this for me (see attached).

The form definition that exhibits this error:
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
 <data>
  <record id="phonecall_enhancements_res_partner_form_view"
   model="ir.ui.view">
   <field name="name">phonecall.enhancements.res.partner.form</field>
   <field name="model">res.partner</field>
   <field name="type">form</field>
   <field name="inherit_id" ref="base.view_partner_form" />
   <field name="arch" type="xml">
    <data>
     <page string="Internal Notes" position="before">
      <page string="Phone Calls" attrs="{'invisible': [('type','!=', 'default')]}">
       <field name="phonecall_ids" mode="tree" context="{'default_partner_id': active_id}" />
      </page>
     </page>
    </data>
   </field>
  </record>
 </data>
</openerp>

Related branches

Revision history for this message
Isaac Richter (laughingjudge) wrote :
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Isaac,

can you believe I ran into this bug 10 minutes before you submitted this patch. I confirm that your patch works so I am submitting a merge proposal.

Changed in openerp-web:
assignee: nobody → Stefan Rijnhart (Therp) (stefan-therp)
assignee: Stefan Rijnhart (Therp) (stefan-therp) → nobody
Changed in ocb-web:
assignee: nobody → Stefan Rijnhart (Therp) (stefan-therp)
Changed in openerp-web:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Changed in openerp-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → Nicolas (OpenERP) (niv-openerp)
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Looks like this was fixed in revision <email address hidden>

Changed in openerp-web:
status: Confirmed → Fix Released
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Looks like it's fixed indeed. Thanks Xavier!

no longer affects: ocb-web
no longer affects: ocb-web/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.