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.

0

How to add an item to the 'More' drop down list in sales module?

By
Anna
on 9/3/14, 3:17 PM 2,767 views

Hi everyone, i can't seem to figure out, where and how to put the code for adding a an item in the more list, to make batch action for more than one sale. I would really appreciate if you shed some light, is there a tag i can use to add it in the header?

1

Leonardo Donelli

--Leonardo Donelli--
1040
| 5 4 8
Cave, Italy
--Leonardo Donelli--

Physics student and part-time developer.

Leonardo Donelli
On 9/4/14, 8:08 AM

What appears under the "more" drop-down button/menu (and, also, the "print" one) is determined by the model/table ir_values

To make an action appear under the 'more' menu, for example, you should define an ir_values record with

  • key="action" (this is for separate the "record type" from ir_values with key="default" which are a completely different thing)
  • key2="action_client_multi"
  • value="ir.actions.act_window,46" (replace 46 with your action id)
  • model="your model".
  • Other easy or non required parameters

The xml tag `<act_window>`, which I suggest to use instead of `<record model="ir.actions.act_window">` has an optional key2 parameter that takes care of automatically creating the correct `ir_values` record for you.

The same thing happens for the "print" button, where key2 is now `client_print_multi` and the <report> xml tag (to be used in place of <record model="ir.actions.report">) also creates that for you.

 

Thanks for your answer, i will try this now. Should i put this piece of code in some specific place? like inside the definition of the tree view? or makes no difference?

Anna
on 9/4/14, 11:18 AM

i am asking because when i put it in sale_view.xml does not appear, and i know this is the way to do it, so maybe i am putting it in a wrong place.

Anna
on 9/4/14, 11:45 AM

write this action after the tree view

Narayanamurthy
on 9/5/14, 6:28 AM

Yeah, it's alright, worked! thanks

Anna
on 9/6/14, 9:53 PM
1
Narayanamurthy
On 9/4/14, 7:51 AM

        <act_window id="action_name"
            multi="True"
            key2="client_action_multi" name="Name o Display in Mor"
            res_model="object.object" src_model="object.object"
            view_mode="form" target="new" view_type="form" />

ok ;)

abdallah ghrir
on 10/27/14, 10:49 AM

Hi,

How can I remove such an item from more option??

Sebin Siby
on 7/2/16, 2:20 AM
1

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 9/4/14, 3:06 AM

Hi,

you can achieve it using "client_action_multi"

Here is an example:

<act_window id="YOUR_ACTION_ID"
            multi="True"
            key2="client_action_multi" name="DISPLAY  IN MORE"
            res_model="OBJECT" src_model="OBJECT"
            view_mode="form" target="new" view_type="form"
        />

Hope this helps you...

 

Hi,

How can I remove such an item from more option??

Sebin Siby
on 7/2/16, 2:18 AM

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: 9/3/14, 3:17 PM
Seen: 2767 times
Last updated: 3/16/15, 8:10 AM