summaryrefslogtreecommitdiff
path: root/addons/mail/wizard
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2012-11-16 18:05:03 +0100
committerOlivier Dony <odo@openerp.com>2012-11-16 18:05:03 +0100
commit01df612cd90be1eef3ce0395294270cd05ddd6fc (patch)
tree04169b4a447215993cd2e59cca6ae362a695dfff /addons/mail/wizard
parent1829317730a3803e15fad557190b73fd36288d5c (diff)
[FIX] mail.compose.wizard: attachments should be m2m, body_text and content_subtype obsolete and removed
bzr revid: odo@openerp.com-20121116170503-mvsaa0pv5py2b7ri
Diffstat (limited to 'addons/mail/wizard')
-rw-r--r--addons/mail/wizard/mail_compose_message.py5
-rw-r--r--addons/mail/wizard/mail_compose_message_view.xml5
2 files changed, 4 insertions, 6 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 694dc082bfe..8efc4cfbbf4 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -102,9 +102,8 @@ class mail_compose_message(osv.TransientModel):
'partner_ids': fields.many2many('res.partner',
'mail_compose_message_res_partner_rel',
'wizard_id', 'partner_id', 'Additional contacts'),
- 'attachment_ids': fields.one2many('ir.attachment', 'res_id',
- domain=lambda self: [('res_model', '=', self._name)],
- string='Attachments'),
+ 'attachment_ids': fields.many2many('ir.attachment', 'mail_compose_message_ir_attachments_rel',
+ 'wizard_id', 'attachment_id', string='Attachments'),
'filter_id': fields.many2one('ir.filters', 'Filters'),
}
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index 1711e09b2b7..57fc0aaf729 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -24,11 +24,10 @@
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
context="{'force_email':True}" required="1"/>
</div>
- <field name="subject" placeholder="Subject..."
- attrs="{'invisible':[('content_subtype', '=', 'plain')]}"/>
+ <field name="subject" placeholder="Subject..."/>
</group>
<field name="body"/>
- <field name="attachment_ids" widget="one2many_binary" blockui="0"/>
+ <field name="attachment_ids" widget="many2many_binary"/>
<footer>
<button string="Send" name="send_mail" type="object" class="oe_highlight"/>
or