Odoo Help

Welcome!

This community 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.

1

Is it possible to add a type object button directly in a search view?

By
Reno
on 5/2/13, 7:39 PM 939 views

We got this requirement where a report action needs to be manually triggered when no records are found after a search.

We tried to add a button (yes button, not filter, type should be object) directly in the search view arch, nested in a contracted group; like so

<field name="type">search</field>
<field name="arch" type="xml">
  <xpath expr="/search/group[@string='Group By...']" position="before">
    <group string="Acciones extendidas..." expand="0" colspan="4">
      <button name="testing" type="object" string="Póliza cero" icon="terp-dolar_ok" />
    </group>
  </xpath>
</field>

That updates succesfully but when one attemps to expand the group, this trace is shown in the client's output:

/openerp-client-6.0.4/bin/widget/view/form_gtk/selection.py:130: 
Warning: gsignal.c:2315: instance `0x9a72be8' has no handler with id `14029'     
self.child.set_text(long_text)

Is it possible to achieve this? If so, what is the right way? Else, do we have any other alternatives? I found this field called filter in act_window model, is this field related in anyway with what we're trying to do? Thanks for your time.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/2/13, 7:39 PM
Seen: 939 times
Last updated: 3/16/15, 8:10 AM