python - how to add a button in custom openerp module -


hi having error while adding button of type action .i cannot view button . following vetclinic_view.xml

<record id="vetclinic_breed_action" model="ir.actions.act_window">          <field name="name">breed</field>          <field name="res_model">vetclinic.breed</field>          <button name="add_field" string="add field" type="object"  class="oe_highlight" />          <field name="view_type">form</field>          <field name="view_mode">tree,form</field>          <field name="help" type="html">                 <p class="oe_view_nocontent_create">click create record.</p>          </field> 

here vetclinic.py

class vetclinic_breed(osv.model): _name="vetclinic.breed" _columns={      'name':fields.char('name',size=32),               } def add_field(cr,self,uid,id): 

that may in vetclinic_view.xml file window action, not view. note model attribute of record element.

you need add button view, not action. window action responsible triggering view display isn't view.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -