No 'Create' button in Tree-View (OpenERP 7)

Asked by brainchild

Hello Community,

I'm frustrated by a apparently simple problem.
I'm trying to create a tree view for a custom entity (e.g. 'foo.bar') which shows me all objects and and provides the ability to create new objects by using my implemented form view.
But here comes the problem: The well-known header with the red 'Create' button and the filter settings are not shown. Only the tree view itself is visible when I click on the menu item which refers to the action associated to my tree view.
I tried to compare my code with the views of the Project module. But I don't see a real difference.

Maybe you can help me?

Here are my view records and action entry:

  <record id="view_foo_bar_tree" model="ir.ui.view">
   <field name="name">foo.bar.tree</field>
   <field name="model">foo.bar</field>
   <field name="arch" type="xml">
     <tree string="Foo Bars">
     <field name="field_a"/>
     <field name="field b"/>
    </tree>
   </field>
  </record>

  <record id="view_foo_bar_form" model="ir.ui.view">
   <field name="name">foo.bar.form</field>
   <field name="model">foo.bar</field>
   <field name="type">form</field>
   <field name="arch" type="xml">
    <form string="View Foo Bar" version="7.0">
     <header>
      test
     </header>
     <group>
      <field name="field_a"/>
      <field name="field_b"/>
     </group>
    </form>
   </field>
  </record>

        <record id="action_foo_bars" model="ir.actions.act_window">
         <field name="name">Manage Foo Bars</field>
         <field name="type">ir.actions.act_window</field>
         <field name="res_model">foo.bar</field>
         <field name="view_type">form</field>
         <field name="view_mode">tree,form</field>
         <field name="view_id" ref="view_foo_bar_tree"/>
         <field name="target">inline</field>
        </record>

Thank you very much!

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
brainchild
Solved:
Last query:
Last reply:
Revision history for this message
brainchild (technical-procurement) said :
#1

Ok, i got it. The problem was that my target of the action was set to "inline", but it has to be "current"