Odoo Help


module does nothing when i run it

on 8/21/13, 5:23 AM 1,204 views

the module loads but does nothing when i run it what could i be doing wrong. And no error given

class sale_order_confirm(osv.osv):
_name = 'sale.order.confirm'
_inherit = "sale.order"

def my_action_button_confirm(self, cr, uid, ids, context=None):
    wf_service = netsvc.LocalService('workflow')
    if context is None:
        context = {}

  #  record_id = context and context.get('ids', False)
    pool_obj = pooler.get_pool(cr.dbname)
    order = pool_obj.get('sale.order').read(cr, uid, ids, ['state'], context=context)
    for o in order:
        if not o.order_line:
            raise osv.except_osv(_('Error'),_("Cannot confirm order without order line"))
        wf_service.trg_validate(uid, 'sale.order', o.id, 'order_confirm', cr)

   #        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_close'}


    <record id="view_sale_confirm_order" model="ir.ui.view">
        <field name="name">sale.order.confirm.form1</field>
        <field name="model">sale.order.confirm</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Confirm Sale Orders">
                <separator colspan="4" string="Do you really want to confirm order(s) ?" />
                <separator string="" colspan="6"/>
                <button special="cancel" string="Cancel" icon="gtk-cancel"/>
                <button name="my_action_button_confirm" string="Confirm SO" icon="gtk-execute" type="object"/>

    <act_window id="action_sale_order_confirm_sales"
        key2="client_action_multi" name="Confirm SO"
        res_model="sale.order.confirm" src_model="sale.order"
        view_mode="form" target="new" view_type="form" />

    <record model="ir.values" id="sale_order_confirm_sales">
        <field name="model_id" ref="sale.model_sale_order" />
        <field name="name">Confirm SO</field>
        <field name="value" eval="'ir.actions.act_window,' + str(ref('action_sale_order_confirm_sales'))"/>
        <field name="key">action</field>
        <field name="model">sale.order</field>



help please and thank you in advance log message is

2013-08-20 15:30:14,575 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:14] "POST /web/action/load HTTP/1.1" 200 -
2013-08-20 15:30:14,851 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:14] "POST /web/view/load HTTP/1.1" 200 -
2013-08-20 15:30:15,608 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:15] "POST /web/dataset/create HTTP/1.1" 200 -
2013-08-20 15:30:15,742 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:15] "POST /web/dataset/get HTTP/1.1" 200 -
2013-08-20 15:30:15,946 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:15] "POST /web/dataset/call_button HTTP/1.1" 200 -
2013-08-20 15:30:15,966 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:15] "POST /web/session/eval_domain_and_context HTTP/1.1" 200 -
2013-08-20 15:30:16,188 7100 INFO ? werkzeug: - - [20/Aug/2013 15:30:16] "POST /web/dataset/search_read HTTP/1.1" 200 -

Please upgrade the module once again through your web client and then you can see the changes

Abhishek H Menon
on 8/21/13, 10:40 AM

I have done that over and over even restarted the whole machine nothing happened. Thanks for responding

on 8/21/13, 11:10 AM

please verify the model you defined in Settings>Customisation>Database Structure > Models and check for the model. Is it there? If it is there please verify the fields that you have added while creating your model

Abhishek H Menon
on 9/13/13, 4:40 AM

This did not work still. I have tried what you suggested but no difference

on 9/13/13, 1:47 PM

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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 8/21/13, 5:23 AM
Seen: 1204 times
Last updated: 3/16/15, 8:10 AM