[FIX] sms: fix mock when sending sms
Only SMS not in error should be considered as sent instead of being unlinked. This has no effect on current tests but will be used in future cleaning. Task-2634957 Prepares Task-2535005 (SMS view pimp) and Task-2560666 (IAP feedback) PR odoo/odoo#75798
This commit is contained in:
@@ -65,7 +65,7 @@ class MockSMS(common.BaseCase):
|
||||
return sms_unlink_origin(records, *args, **kwargs)
|
||||
# hack: instead of unlink, update state to sent for tests
|
||||
else:
|
||||
records.filtered(lambda sms: sms.id in self._new_sms.ids).state = 'sent'
|
||||
records.filtered(lambda sms: sms.id in self._new_sms.ids and sms.state != 'error').state = 'sent'
|
||||
return True
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user