Show successful message after closing wizard in odoo v9

What's the best solution for successfully displaying a message after closing the wizard in odoo 9?

Any little popup in the right corner?

+3


source to share


1 answer


Not the correct answer to your question, but I faced the same problem, the problem was that I have to display a "successfully submitted" massage when the user clicks the submit button on the master. and i did it as my solution i did it

  • I created one class for master

from odoo import api, fields, models, _

class CustomPopMessage(models.TransientModel):
_name = "custom.pop.message"

    name = fields.Char('Message')

      



  1. create a view for a 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>
    
          

  2. another master button, by clicking this button you want to display a specific 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."} 
            }

      

+7


source







All Articles