openerp - Display a simple message box -
how display simple message box inside method of button @ user click.
when user click on button see message box.
i have add small method in .py file , generate message box on button click
xml file
<record id="view_hr_payroll_payslip_wizard" model="ir.ui.view"> <field name="name">hr.payroll.payslip.wizards</field> <field name="model">hr.payroll.payslip.wizard</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="moves" version="7.0"> <footer> <button name="generate_msg" string="click me" type="object" class="oe_highlight"/>or </footer> </form> </field> </record>
same name of method define in button name attribute in .py file
from openerp.tools.translate import _ def generate_msg(self, cr, uid, ids, context=none): raise osv.except_osv(_("warning!"), _(" hello mehdi mokni !!."))
python library can added covert message in language
i hope should helpful ..:)
Comments
Post a Comment