[IMP] mail: better implementation of active domain / use active domain
bzr revid: tde@openerp.com-20130725135029-mx946vaibvz1rzii
This commit is contained in:
parent
f1f2b2ba06
commit
91ef7de709
|
@ -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':
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue