[FIX] sms - mass_mailing: fix some bugs
- Cancel button in the sms form view not related to a action : When we click on the cancel button of the sms form view, get traceback. Fix the issue by adding the cancel action in sms model. - Mass mailing contact - False as the display name : The display name was the mail address but when the contact didn't have mail address a ugly False was print to described the contact (form view). Then change the _rec_name to print the name as the display name. - Fix SMS composer for the res.parnter tree Only the first record was truely selected when open the sms composer (mass) from the tree view of partner. Fix that by bind the actives_ids in the context and also fix the names of related actions. TASK_ID : 2053631
This commit is contained in:
@@ -48,7 +48,6 @@ class MassMailingContact(models.Model):
|
||||
_inherit = ['mail.thread.blacklist']
|
||||
_description = 'Mass Mailing Contact'
|
||||
_order = 'email'
|
||||
_rec_name = 'email'
|
||||
|
||||
name = fields.Char()
|
||||
company_name = fields.Char(string='Company Name')
|
||||
|
||||
@@ -56,6 +56,9 @@ class SmsSms(models.Model):
|
||||
if auto_commit is True and not getattr(threading.currentThread(), 'testing', False):
|
||||
self._cr.commit()
|
||||
|
||||
def cancel(self):
|
||||
self.state = 'canceled'
|
||||
|
||||
@api.model
|
||||
def _process_queue(self, ids=None):
|
||||
""" Send immediately queued messages, committing after each message is sent.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</record>
|
||||
|
||||
<!-- Add action entry in the Action Menu for Partners -->
|
||||
<act_window id="res_partner_act_window_sms_composer_single"
|
||||
<act_window id="res_partner_act_window_sms_composer_multi"
|
||||
name="Send SMS Text Message"
|
||||
binding_model="res.partner"
|
||||
res_model="sms.composer"
|
||||
@@ -37,9 +37,10 @@
|
||||
context="{
|
||||
'default_composition_mode': 'mass',
|
||||
'default_mass_keep_log': True,
|
||||
'default_res_ids': active_ids
|
||||
}"
|
||||
/>
|
||||
<act_window id="res_partner_act_window_sms_composer_multi"
|
||||
<act_window id="res_partner_act_window_sms_composer_single"
|
||||
name="Send SMS Text Message"
|
||||
binding_model="res.partner"
|
||||
res_model="sms.composer"
|
||||
|
||||
Reference in New Issue
Block a user