Odoo Help


Open a record from a tree view

Victor Godayer
on 2/21/14, 11:23 AM 7,193 views

I have developped a module which adds a tab on the partner form view. On that tab I gather details about meetings, calls, invoices, quotations under their own tree view.

I would like the records showed to be 'clickable'. The action associated to a record clicked would lead the user to the form view of the record.

I thought it was native behavior on a tree view, apparently it is not.

Here is one of my tree view :

<?xml version="1.0"?>

  <!--  Partners inherited form -->
  <record id="view_history_partner_info_form" model="ir.ui.view">
   <field name="name">res.partner.cap_history.form.inherit</field>
   <field name="inherit_id" ref="base.view_partner_form"/>
   <field name="model">res.partner</field>
   <field name="arch" type="xml">
    <page string="Accounting" position="after" version="7.0">
      <page string="History" name="cap_history_tab">

        <group name="grp_invoice_history" string="Invoices History">
          <field name="invoice_ids" colspan="4" nolabel="1">
            <tree string="Partner Invoices" editable="bottom" create="false" delete="false">
              <field name="number" readonly="True"/>
              <field name="origin" readonly="True"/>
              <field name="name" string="Reference" readonly="True"/>
              <field name="date_invoice" readonly="True"/>
              <field name="x_category" readonly="True"/>
              <field name="state" readonly="True"/>
              <field name="payment_term" readonly="True"/>
              <field name="amount_total" readonly="True"/>


Then I added the following action, I thought that would be enough, but it does not change anything.

<record id="action_history_invoice_tree" model="ir.actions.act_window">
  <field name="name">action.invoices.history.tree</field>
  <field name="res_model">account.invoice</field>
  <field name="view_mode">form</field>
  <field name="view_id" ref="invoice_form"/>

I can't see what is wrong in the action definition and I know this is the only wrong part the rest is working fine.

Does anyone could share his knowledge about this issue ? Thank you


Did you find the solution to this ?

Versão Integral, Anabela Damas
on 6/25/14, 11:54 AM
Yes I found the solution.
Are you facing the same problem ?


Tél : +33 (0) 482 530 235
Ligne directe : +33 (0) 972 154 011
Fax : +33 (0) 972 238 043
@ : victor.godayer@captivea.fr
Web : www.captivea.fr

2014-06-25 17:54 GMT+02:00 Anabela Damas <adamas-versaointegral-pt@openerp.my.openerp.com>:

Did you find the solution to this ?

Anabela Damas Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

Victor Godayer
on 6/26/14, 7:34 AM
Victor Godayer
On 2/28/14, 7:49 AM

I have found the solution.

When there is the tree attribute editable set to bottom, the record is open in tree view as currently open.

I just needed to remove editable="bottom" from the tree tag. After remove it, it will open a form view.

Below an example :

<tree string="Partner Invoices" create="false" delete="false">

Hope this will help.

Doesn't work form me , I don't have "editable" parameter...

Versão Integral, Anabela Damas
on 6/25/14, 11:56 AM

give me your view code in an PM message if you want

Victor Godayer
on 6/26/14, 7:41 AM

It works but it isn't what I need, thanks!

Versão Integral, Anabela Damas
on 7/3/14, 6:21 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 2/21/14, 11:23 AM
Seen: 7193 times
Last updated: 2/5/16, 4:31 PM