This question has been flagged
1 Reply
2377 Views

for example :

i want to send an email via button
in my_button :
    for rec in self :

rec.send_mail

rec.boolean = True

so if the user want to send an email to many user at the same time so users will use default fuction Partner Mass Mailing.
in default didn't have a rec.bolean = True.


so i want to do something like this :
    each time user send_email :

in xml will automatically trigger boolean in the python via that XML.    ​

The point is i want to make the boolean to true via xml.



Avatar
Discard
Best Answer

YOu can define a button in you XML view. Button on XML, if defined as tyoe=object can call a python function. In this way you can call python code from XML view.

Avatar
Discard