Odoo Help


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.


want multiple sale order confirmation in tree view

on 8/7/13, 5:29 AM 1,397 views

V6 on window Is there a module or a setting that can allow multiple sales order confirmation out there please? Really need this for my project. Thank you.

On 8/13/13, 12:12 PM

Found this on the forum but as the author stated it online confirm one order at a time can someone please help on how to confirm more than one order at a time. Thank you

class sale_order_inherit(osv.osv):
   _inherit = "sale.order"

 def action_button_confirm(self, cr, uid, ids, context=None):

    assert len(ids) == 1, 'This option should only be used for a single id at a time.'
    wf_service = netsvc.LocalService('workflow')
    wf_service.trg_validate(uid, 'sale.order', ids[0], 'order_confirm', cr)

           # redisplay the record as a sales order
    view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sale', 'view_order_form')
    view_id = view_ref and view_ref[1] or False,

    return {
        'type': 'ir.actions.act_window',
        'name': _('Sales Order'),
        'res_model': 'sale.order',
        'res_id': ids[0],
        'view_type': 'tree',
        'view_mode': 'form',
        'view_id': view_id,
        'target': 'current',
        'nodestroy': True,


xml i used for this

    <record id="action_sale_order_confirm_sales" model="ir.actions.server">
        <field name="name">Confirm Orders</field>
        <field name="type">ir.actions.server</field>
        <field name="model_id" ref="model_sale_order"/>
        <field name="state">code</field>

        <field name="code">obj.action_button_confirm(context=context)</field>

    <record id="id_action_sale_order_confirm_sales" model="ir.values">
        <field name="name">Confirm Orders</field>
        <field name="action_id" ref="action_sale_order_confirm_sales"/>
        <field name="value" eval="'ir.actions.server,' + str(ref('action_sale_order_confirm_sales'))"/>
        <field name="key">action</field>
        <field name="model_id" ref="model_sale_order"/>
        <field name="model">sale.order</field>
        <field name="key2">client_action_multi</field>

Not sure this is right but it works to confirm one at a time sale order on tree view

on 8/13/13, 12:29 PM
joseph d'souza
On 8/9/13, 1:27 AM

Yes . This will possible to confirm multiple sale order with one click but need some customization which prompt wizard and in wizard you can chose your draft sale order line and confirm it. so this way it's possible to confirm multiple sale order

I have developed this thing for my customer requirement. To get this functionality you can mail me

Thanks, joseph d'souza, dsouzajoseph199@gmail.com

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

0 follower(s)


Asked: 8/7/13, 5:29 AM
Seen: 1397 times
Last updated: 3/16/15, 8:10 AM