Reputation: 299
I need insert message to message_post. This source work fine when call from current module:
self.message_post(body="TEXT")
Now I want after close wizard insert message to my custom module.
I'm try add below code in wizad .py file but not working.
my_val = self.env['my.module'].search([('id','=',2)])
my_val.write({
'message_post': "Text Text"
})
Any solution?
Upvotes: 2
Views: 1321
Reputation: 14746
You can call message post method from wizard.
Ex:
my_val = self.env['my.module'].search([('id','=',2)])
my_val.message_post(body="TEXT")
This may help you.
Upvotes: 2