Skip to main content

How to Create a Wizard in Odoo

Odoo is a powerful suite of business applications that can help businesses of all sizes manage and grow their operations. While it offers a wide range of features and functions, one of the things that makes Odoo so powerful is its ability to be customized to meet the specific needs of each business.

In this blog post, we will show you how to create a wizard in Odoo. Wizarding is a great way to streamline complex processes for your customers, and with Odoo, it is easy to create wizards that are both user-friendly and engaging. So, if you are looking for a way to make your business process more efficient, read on!

The snippet below add a new action called Download All to the Quotation list’s action menu.

class SaleOrderWizard(models.TransientModel):
    _name = ''

    def _default_orders(self):
        return self.env['sale.order'].browse(self._context.get('active_ids'))

    sale_ids = fields.Many2many('sale.order', string='Sales', default=_default_orders,
                                 auto_join=True, required=True, readonly=True)

    def download_all(self):
        if self.sale_ids:
        	for sale in self.sale_ids:
        		# Do something here
        <act_window id="download_all"
                    name="Download All"
        <record model="ir.ui.view" id="custom_form_view">
            <field name="name"></field>
            <field name="model"></field>
            <field name="arch" type="xml">
                <form string="Quotations">
                        <field name="order_ids"/>
                        <button name="download_all" type="object" string="Download" class="oe_highlight"/>
                        <button special="cancel" string="Cancel"/>


By continuing to use the site, you agree to the use of cookies.