[CLEAN] Misc cleaning and code review before merging.
bzr revid: tde@openerp.com-20130319091844-tnpd0w8tlagcbypz
This commit is contained in:
parent
e559949f07
commit
522f144781
|
@ -224,7 +224,7 @@
|
||||||
<!--Definition of an email template with an empty body that will be used in opportunity mailing.
|
<!--Definition of an email template with an empty body that will be used in opportunity mailing.
|
||||||
Used to give a basis for email recipients, name and to ease the definition of a further
|
Used to give a basis for email recipients, name and to ease the definition of a further
|
||||||
elaborated template. -->
|
elaborated template. -->
|
||||||
<record id="lead_template" model="email.template">
|
<record id="email_template_opportunity_mail" model="email.template">
|
||||||
<field name="name">Lead/Opportunity Mass Mail</field>
|
<field name="name">Lead/Opportunity Mass Mail</field>
|
||||||
<field name="model_id" ref="crm.model_crm_lead"/>
|
<field name="model_id" ref="crm.model_crm_lead"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
|
|
|
@ -597,12 +597,12 @@
|
||||||
'default_composition_mode': 'mass_mail',
|
'default_composition_mode': 'mass_mail',
|
||||||
'default_email_to':'{$object.email or \'\'}',
|
'default_email_to':'{$object.email or \'\'}',
|
||||||
'default_use_template': True,
|
'default_use_template': True,
|
||||||
'default_template_id': ref('crm.lead_template'),
|
'default_template_id': ref('crm.email_template_opportunity_mail'),
|
||||||
}"/>
|
}"/>
|
||||||
|
|
||||||
<!--Update of email_template defined in crm_lead_data, to add ref_ir_act_window
|
<!--Update of email_template defined in crm_lead_data, to add ref_ir_act_window
|
||||||
allowing to have a well formed email template (context action considered as set). -->
|
allowing to have a well formed email template (context action considered as set). -->
|
||||||
<record id="lead_template" model="email.template">
|
<record id="email_template_opportunity_mail" model="email.template">
|
||||||
<field name="ref_ir_act_window" ref="crm.action_lead_mass_mail"/>
|
<field name="ref_ir_act_window" ref="crm.action_lead_mass_mail"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
|
@ -15,18 +15,6 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="view_res_partner_filter_crm" model="ir.ui.view">
|
|
||||||
<field name="name">res.partner.select.crm</field>
|
|
||||||
<field name="model">res.partner</field>
|
|
||||||
<field name="inherit_id" ref="base.view_res_partner_filter"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<filter string="Suppliers" position="after">
|
|
||||||
<filter string="Not opt-out" domain="[('opt_out', '=', False)]"
|
|
||||||
help="Is not opt-out and can be included in mass mailing campaigns" />
|
|
||||||
</filter>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- open meetings related to given partner -->
|
<!-- open meetings related to given partner -->
|
||||||
<record id="crm_meeting_partner" model="ir.actions.act_window">
|
<record id="crm_meeting_partner" model="ir.actions.act_window">
|
||||||
<field name="name">Meetings</field>
|
<field name="name">Meetings</field>
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!--Definition of an email template with an empty body that will be used in opportunity mailing. Used to give a
|
<!--Definition of an email template with an empty body that will be used in partner mailing. Used to give a
|
||||||
basis for email recipients, name and to ease the definition of a further elaborated template. -->
|
basis for email recipients, name and to ease the definition of a further elaborated template. -->
|
||||||
<record id="partner_template" model="email.template">
|
<record id="email_template_partner" model="email.template">
|
||||||
<field name="name">Partner Mass Mail</field>
|
<field name="name">Partner Mass Mail</field>
|
||||||
<field name="model_id" ref="base.model_res_partner"/>
|
<field name="model_id" ref="base.model_res_partner"/>
|
||||||
<field name="auto_delete" eval="True"/>
|
<field name="auto_delete" eval="True"/>
|
||||||
|
@ -48,10 +48,10 @@
|
||||||
'default_composition_mode': 'mass_mail',
|
'default_composition_mode': 'mass_mail',
|
||||||
'default_partner_to': '${object.id or \'\'}',
|
'default_partner_to': '${object.id or \'\'}',
|
||||||
'default_use_template': True,
|
'default_use_template': True,
|
||||||
'default_template_id': ref('partner_template'),
|
'default_template_id': ref('email_template_partner'),
|
||||||
}"/>
|
}"/>
|
||||||
|
|
||||||
<record id="partner_template" model="email.template">
|
<record id="email_template_partner" model="email.template">
|
||||||
<field name="ref_ir_act_window" ref="base.action_partner_mass_mail"/>
|
<field name="ref_ir_act_window" ref="base.action_partner_mass_mail"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
from openerp import tools
|
from openerp import tools
|
||||||
from openerp.osv import osv, fields
|
from openerp.osv import osv, fields
|
||||||
|
|
||||||
|
|
||||||
def _reopen(self, res_id, model):
|
def _reopen(self, res_id, model):
|
||||||
return {'type': 'ir.actions.act_window',
|
return {'type': 'ir.actions.act_window',
|
||||||
'view_mode': 'form',
|
'view_mode': 'form',
|
||||||
|
@ -37,7 +36,6 @@ def _reopen(self, res_id, model):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class mail_compose_message(osv.TransientModel):
|
class mail_compose_message(osv.TransientModel):
|
||||||
_inherit = 'mail.compose.message'
|
_inherit = 'mail.compose.message'
|
||||||
|
|
||||||
|
@ -69,12 +67,6 @@ class mail_compose_message(osv.TransientModel):
|
||||||
help="Carbon copy recipients (placeholders may be used here)"),
|
help="Carbon copy recipients (placeholders may be used here)"),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
|
||||||
'partner_to': lambda self, cr, uid, ctx={}: '',
|
|
||||||
'email_to': lambda self, cr, uid, ctx={}: '',
|
|
||||||
'email_cc': lambda self, cr, uid, ctx={}: '',
|
|
||||||
}
|
|
||||||
|
|
||||||
def onchange_template_id(self, cr, uid, ids, template_id, composition_mode, model, res_id, context=None):
|
def onchange_template_id(self, cr, uid, ids, template_id, composition_mode, model, res_id, context=None):
|
||||||
""" - mass_mailing: we cannot render, so return the template values
|
""" - mass_mailing: we cannot render, so return the template values
|
||||||
- normal mode: return rendered values """
|
- normal mode: return rendered values """
|
||||||
|
|
|
@ -59,13 +59,13 @@ class mail_mail(osv.Model):
|
||||||
'recipient_ids': fields.many2many('res.partner', string='To (Partners)'),
|
'recipient_ids': fields.many2many('res.partner', string='To (Partners)'),
|
||||||
'email_cc': fields.char('Cc', help='Carbon copy message recipients'),
|
'email_cc': fields.char('Cc', help='Carbon copy message recipients'),
|
||||||
'body_html': fields.text('Rich-text Contents', help="Rich-text/HTML message"),
|
'body_html': fields.text('Rich-text Contents', help="Rich-text/HTML message"),
|
||||||
|
|
||||||
# If not set in create values, auto-detected based on create values (res_id, model, email_from)
|
# If not set in create values, auto-detected based on create values (res_id, model, email_from)
|
||||||
'reply_to': fields.char('Reply-To', help='Preferred response address for the message'),
|
'reply_to': fields.char('Reply-To',
|
||||||
|
help='Preferred response address for the message'),
|
||||||
# Auto-detected based on create() - if 'mail_message_id' was passed then this mail is a notification
|
# Auto-detected based on create() - if 'mail_message_id' was passed then this mail is a notification
|
||||||
# and during unlink() we will not cascade delete the parent and its attachments
|
# and during unlink() we will not cascade delete the parent and its attachments
|
||||||
'notification': fields.boolean('Is Notification')
|
'notification': fields.boolean('Is Notification',
|
||||||
|
help='Mail has been created to notify people of an existing mail.message')
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_default_from(self, cr, uid, context=None):
|
def _get_default_from(self, cr, uid, context=None):
|
||||||
|
|
Loading…
Reference in New Issue