summaryrefslogtreecommitdiff
path: root/addons/mail
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-07-25 15:50:29 +0200
committerThibault Delavallée <tde@openerp.com>2013-07-25 15:50:29 +0200
commit91ef7de7090e92314abebe377f7eacd01b483000 (patch)
tree24829128db361e0db5e539e5b0d3489954eac497 /addons/mail
parentf1f2b2ba06c6b62c886b7dea13118687e9b93b21 (diff)
[IMP] mail: better implementation of active domain / use active domain
bzr revid: tde@openerp.com-20130725135029-mx946vaibvz1rzii
Diffstat (limited to 'addons/mail')
-rw-r--r--addons/mail/wizard/mail_compose_message.py6
-rw-r--r--addons/mail/wizard/mail_compose_message_view.xml5
2 files changed, 7 insertions, 4 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 95647e95d8e..432840d50ef 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -73,7 +73,11 @@ class mail_compose_message(osv.TransientModel):
res_id = context.get('default_res_id', context.get('active_id'))
message_id = context.get('default_parent_id', context.get('message_id', context.get('active_id')))
active_ids = context.get('active_ids')
- result['active_domain'] = '%s' % context.get('active_domain', [])
+ if context.get('active_domain'):
+ result['use_active_domain'] = True
+ result['active_domain'] = '%s' % context.get('active_domain')
+ else:
+ result['active_domain'] = ''
# get default values according to the composition mode
if composition_mode == 'reply':
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index 20b529c0faa..c4236adb9cf 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -13,7 +13,9 @@
<field name="res_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="mail_server_id" invisible="1"/>
+ <field name="use_active_domain" invisible="1"/>
<!-- visible wizard -->
+ <field name="active_domain" attrs="{'invisible': [('use_active_domain', '=', False)]}"/>
<field name="email_from"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<field name="subject" placeholder="Subject..." required="True"/>
@@ -26,9 +28,6 @@
<field name="reply_to" placeholder="Email address te redirect replies..."
attrs="{'invisible':['|', ('same_thread', '=', True), ('composition_mode', '!=', 'mass_mail')],
'required':[('same_thread', '!=', True)]}"/>
- <field name="use_active_domain" groups="base.group_no_one"
- attrs="{'invisible': [('composition_mode', '!=', 'mass_mail')]}"/>
- <field name="active_domain" attrs="{'invisible': [('use_active_domain', '=', False)]}"/>
<label for="partner_ids" string="Recipients"
attrs="{'invisible':[('composition_mode', '=', 'mass_mail')]}"/>
<div groups="base.group_user"