summaryrefslogtreecommitdiff
path: root/addons/mail
diff options
context:
space:
mode:
authorThibault Delavallee <tde@openerp.com>2013-03-12 14:38:17 +0100
committerThibault Delavallee <tde@openerp.com>2013-03-12 14:38:17 +0100
commitd7e5763dcb444a5cda4c9466e87efc7bb9aa19bf (patch)
treea024f5a180b7782ae03fb86d435604c2f7c11c3a /addons/mail
parent99063b421f99966c7960e493dff32a24e3e2143c (diff)
[IMP] mail, email_template: improved mass mailing action (renamed, now using a well defined template) + improved form view of mail.compose.message wizard.
bzr revid: tde@openerp.com-20130312133817-y9xztv6gs4ut7ndj
Diffstat (limited to 'addons/mail')
-rw-r--r--addons/mail/wizard/mail_compose_message.py1
-rw-r--r--addons/mail/wizard/mail_compose_message_view.xml13
2 files changed, 9 insertions, 5 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 9a84e1b31fc..57daaf15a5e 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -127,6 +127,7 @@ class mail_compose_message(osv.TransientModel):
_defaults = {
'composition_mode': 'comment',
+ 'email_from': lambda self, cr, uid, ctx={}: self.pool.get('mail.mail')._get_default_from(cr, uid, context=ctx),
'body': lambda self, cr, uid, ctx={}: '',
'subject': lambda self, cr, uid, ctx={}: False,
'partner_ids': lambda self, cr, uid, ctx={}: [],
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index 2812287a860..01cecd7d52c 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -16,12 +16,14 @@
<field name="email_from"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<field name="subject" placeholder="Subject..." required="True"/>
- <field name="post" groups="base.group_no_one"/>
+ <field name="post" groups="base.group_no_one"
+ attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<field name="notify" groups="base.group_no_one"
- attrs="{'invisible':[('post', '!=', True)]}"/>
- <field name="same_thread"/>
+ attrs="{'invisible':['|', ('post', '!=', True), ('composition_mode', '!=', 'mass_mail')]}"/>
+ <field name="same_thread"
+ attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<field name="reply_to" placeholder="Email address te redirect replies..."
- attrs="{'invisible':[('same_thread', '=', True)],
+ attrs="{'invisible':['|', ('same_thread', '=', True), ('composition_mode', '!=', 'mass_mail')],
'required':[('same_thread', '!=', True)]}"/>
<label for="partner_ids" string="Recipients"
attrs="{'invisible':[('composition_mode', '=', 'mass_mail')]}"/>
@@ -58,7 +60,7 @@
</record>
<!-- Replace the default mass-mailing wizard in base with the composition wizard -->
- <act_window name="Mass Mailing"
+ <act_window name="Partner Mass Mailing"
res_model="mail.compose.message"
src_model="res.partner"
view_mode="form"
@@ -70,5 +72,6 @@
'default_composition_mode': 'mass_mail',
'default_partner_to': '${object.id or \'\'}',
}"/>
+
</data>
</openerp>