Search code examples
odooodoo-9odoo-10

Show successfully message after close wizard in odoo v9


What is best solution for display successfully message after close wizard in odoo 9?

Any small popup in right corner?


Solution

  • It's not a proper answer to your question but i have faced the same problem, the problem was that i have to display "successfully submitted" message when user click on submit button on a wizard. and i have done this as my solution i have done this

    1. i have created one class for the wizard
    from odoo import api, fields, models, _
    
    class CustomPopMessage(models.TransientModel):
    _name = "custom.pop.message"
    
        name = fields.Char('Message')
    
    1. create view for custom wizard
        <odoo>
        <data>
            <record id="custom_pop_message_wizard_view_form" model="ir.ui.view">
                <field name="name">custom.pop.message.form</field>
                <field name="model">custom.pop.message</field>
                <field name="arch" type="xml">
                    <form string="Custom POP Message">
    
                        <field name="name" readonly="1"/>   
    
                        <footer>
                           <button string="Close" class="btn-default" special="cancel"/>
                        </footer>
                   </form>
                </field>
            </record>
        </data></odoo>
    
    1. button method of another wizard by pressing that button you want to display certain Pop-Up massage
    def my_custom_button_function_for_another_wizard():
    
        return {
            'name': 'Message',
                'type': 'ir.actions.act_window',
                'view_type': 'form',
                'view_mode': 'form',
                'res_model': 'custom.pop.message',
                'target':'new',
                'context':{'default_name':"Successfully Submitted."} 
                }