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.

4

Hilar AK

--Hilar AK--
778
| 4 1 7
Italy
--Hilar AK--


Hilar AK
On 10/31/16, 8:40 AM

***js**

model.call('action_wizardd',[context]).then(function(result){ 

                   web_client.do_action(result, {
                    });
                    });

***********python Script****

def action_wizardd(self,cr,uid,cc,context=None):
        view_ids = self.pool.get('ir.model.data').get_object_reference(cr, uid,                                                                                       'draft_quote_wf',                                                                       'sale_expire_date_view')        view_id = view_ids[1]   

        cc.update({'active_id':cc['params']['id']})        # context = {'active_id': context['params']}
        return {

            'name': _("Extend Expire Date"), 

           'view_type': 'form',

            'view_mode': 'form',

            'view_id': view_id,

            'views': [(False, 'form', False)], 

           'res_model': 'sale.extend.expire.date', 

           'type': 'ir.actions.act_window', 

           'target': 'new', 

           'context': cc        }


Hope This will make you understand the use of do_action()

0

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 10/27/16, 4:41 AM

Simple question but takes lot to explain :), better dig & find it up yourself.

But for a start let me say do_action is a method in Jquery which performs sets of activities. So yeah both JS & JQuery are been used in Odoo, slightly confusing if you are unable to distinguish b/w  those two.

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: 10/27/16, 3:07 AM
Seen: 215 times
Last updated: 10/31/16, 8:40 AM