December 2018
Beginner to intermediate
404 pages
10h 14m
English
Excluding the Cancel button, which just closes the form without performing any action, we have the Send action buttons to implement.
The method called by the button is button_send, and it should be defined in the wizard/checkout_mass_message.py file, as shown in the following code:
@api.multi def button_send(self): self.ensure_one() for checkout in self.checkout_ids: checkout.message_post( body=self.message_body, subject=self.message_subject, subtype='mail.mt_comment', ) return True
Our code only needs to handle one wizard instance at a time, so we used self.ensure_one() to make that clear. Here, self represents the browse record for the data on the wizard form.
The method iterates through the selected checkout ...
Read now
Unlock full access