|
@ -38,11 +38,16 @@ class MailComposeMessage(models.TransientModel): |
|
|
res['can_attach_attachment'] = True # pragma: no cover |
|
|
res['can_attach_attachment'] = True # pragma: no cover |
|
|
return res |
|
|
return res |
|
|
|
|
|
|
|
|
|
|
|
@api.model |
|
|
|
|
|
def _get_object_attachment_domain(self): |
|
|
|
|
|
return "[('res_model', '=', model), ('res_id', '=', res_id)]" |
|
|
|
|
|
|
|
|
can_attach_attachment = fields.Boolean(string='Can Attach Attachment') |
|
|
can_attach_attachment = fields.Boolean(string='Can Attach Attachment') |
|
|
object_attachment_ids = fields.Many2many( |
|
|
object_attachment_ids = fields.Many2many( |
|
|
comodel_name='ir.attachment', |
|
|
comodel_name='ir.attachment', |
|
|
relation='mail_compose_message_ir_attachments_object_rel', |
|
|
relation='mail_compose_message_ir_attachments_object_rel', |
|
|
column1='wizard_id', column2='attachment_id', string='Attachments') |
|
|
|
|
|
|
|
|
column1='wizard_id', column2='attachment_id', string='Attachments', |
|
|
|
|
|
domain=lambda self: self._get_object_attachment_domain()) |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|
def get_mail_values(self, res_ids): |
|
|
def get_mail_values(self, res_ids): |
|
|