概要
在前面文章中,有介绍过前端触发的通知服务。
【odoo】右上角的提示(通知服务)
此文章则介绍后端触发方法。
内容
直接上代码:但是前提一定是按钮触发!!!!!
def button_demo(self):
    return {
        'type': 'ir.actions.client',
        'tag': 'display_notification',
        'params': {
            'type': 'success',
            'message': _('Your request has been successfully sent'),
            'next': {'type': 'ir.actions.act_window_close'},
        }
    } 

小结
多写多敲多思考,毕竟,知己知彼才能看懂源码。
Tip:本人才学尚浅,如有纰漏,还请不吝赐教!



















