这不是你的问题的正确答案,但我遇到了同样的问题,问题是,当用户点击向导上的提交按钮时,我必须显示"成功提交"消息.我已经做了这个,因为我的解决方案我做到了这一点
from odoo import api, fields, models, _
class CustomPopMessage(models.TransientModel):
_name = "custom.pop.message"
name = fields.Char('Message')
Run Code Online (Sandbox Code Playgroud)
<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>
Run Code Online (Sandbox Code Playgroud)
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."}
}
Run Code Online (Sandbox Code Playgroud)