diff --git a/addons/crm_claim/test/ui/claim_demo.yml b/addons/crm_claim/test/ui/claim_demo.yml index 6b6d380f5be..044e0482e93 100644 --- a/addons/crm_claim/test/ui/claim_demo.yml +++ b/addons/crm_claim/test/ui/claim_demo.yml @@ -12,4 +12,3 @@ self.message_update(cr, uid,[ref('crm_claim_4')], {'subject': 'Claim Update record','body': 'first training session completed',}) except: pass - diff --git a/addons/crm_partner_assign/crm_lead_view.xml b/addons/crm_partner_assign/crm_lead_view.xml index 057d5240847..cd2e3f08c9a 100644 --- a/addons/crm_partner_assign/crm_lead_view.xml +++ b/addons/crm_partner_assign/crm_lead_view.xml @@ -19,7 +19,7 @@ attrs="{'invisible':[('partner_assigned_id','=',False)]}" name="%(crm_lead_forward_to_partner_act)d" icon="terp-mail-forward" type="action" - context="{'mail.compose.message.mode': 'forward', 'default_partner_ids': [partner_assigned_id]}"/> + context="{'default_composition_mode': 'forward', 'default_partner_ids': [partner_assigned_id]}"/> diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py index 5b0fe97b015..6ed8da7b231 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py @@ -36,12 +36,12 @@ class crm_lead_forward_to_partner(osv.osv_memory): if context is None: context = {} # set as comment, perform overrided document-like action that calls get_record_data - old_mode = context.get('mail.compose.message.mode', 'forward') - context['mail.compose.message.mode'] = 'comment' + old_mode = context.get('default_composition_mode', 'forward') + context['default_composition_mode'] = 'comment' res = super(crm_lead_forward_to_partner, self).default_get(cr, uid, fields, context=context) # back to forward mode - context['mail.compose.message.mode'] = old_mode - res['composition_mode'] = context['mail.compose.message.mode'] + context['default_composition_mode'] = old_mode + res['composition_mode'] = context['default_composition_mode'] return res def _get_composition_mode_selection(self, cr, uid, context=None): diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml index 600bd301b3f..fe9e1476817 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml @@ -51,7 +51,7 @@ key2="client_action_multi" name="Mass forward to partner" res_model="crm.lead.forward.to.partner" src_model="crm.lead" view_mode="form" target="new" view_type="form" - context="{'mail.compose.message.mode' : 'mass_mail'}" + context="{'default_composition_mode' : 'mass_mail'}" view_id="crm_lead_forward_to_partner_form" /> diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 73dc5ed2754..b68005bd997 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -171,7 +171,7 @@ class email_template(osv.osv): 'res_model': 'mail.compose.message', 'src_model': src_obj, 'view_type': 'form', - 'context': "{'mail.compose.message.mode':'mass_mail', 'mail.compose.template_id' : %d}" % (template.id), + 'context': "{'default_composition_mode': 'mass_mail', 'default_template_id' : %d}" % (template.id), 'view_mode':'form,tree', 'view_id': res_id, 'target': 'new', diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index 12c5dc0af6d..9f64df8808d 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -388,22 +388,23 @@ action="action_hr_evaluation_interview_tree"/> + + id="evaluation_reminders" name="Appraisal Reminders" + res_model="mail.compose.message" + src_model="hr.evaluation.interview" + view_type="form" view_mode="form" + target="new" multi="True" + key2="client_action_multi" + context="{'default_composition_mode': 'mass_mail'}"/> + context="{'search_default_user_to_review_id': [active_id], 'default_user_to_review_id': active_id}" + id="act_hr_employee_2_hr__evaluation_interview" + name="Appraisal Interviews" + res_model="hr.evaluation.interview" + src_model="hr.employee"/> diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index d17be6d578e..f5769e082a1 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -28,12 +28,8 @@ from osv import fields from tools.translate import _ class mail_group(osv.Model): - """ - A mail_group is a collection of users sharing messages in a discussion - group. Group users are users that follow the mail group, using the - subscription/follow mechanism of OpenSocial. A mail group has nothing - in common with res.users.group. - """ + """ A mail_group is a collection of users sharing messages in a discussion + group. The group mechanics are based on the followers. """ _description = 'Discussion group' _name = 'mail.group' _inherit = ['mail.thread'] diff --git a/addons/mail/mail_mail_view.xml b/addons/mail/mail_mail_view.xml index f6846954ec0..72d41e33a84 100644 --- a/addons/mail/mail_mail_view.xml +++ b/addons/mail/mail_mail_view.xml @@ -12,7 +12,7 @@
by on
diff --git a/addons/mail/tests/test_mail.py b/addons/mail/tests/test_mail.py index fa30c76aa1e..9c148647b9b 100644 --- a/addons/mail/tests/test_mail.py +++ b/addons/mail/tests/test_mail.py @@ -353,7 +353,7 @@ class test_mail(common.TransactionCase): # CASE1: comment group_pigs with body_text and subject compose_id = mail_compose.create(cr, uid, {'subject': _subject, 'body_text': _body_text, 'partner_ids': [(4, p_c_id), (4, p_d_id)]}, - {'mail.compose.message.mode': 'comment', 'default_model': 'mail.group', 'default_res_id': self.group_pigs_id}) + {'default_composition_mode': 'comment', 'default_model': 'mail.group', 'default_res_id': self.group_pigs_id}) compose = mail_compose.browse(cr, uid, compose_id) # Test: mail.compose.message: model, res_id self.assertEqual(compose.model, 'mail.group', 'mail.compose.message incorrect model') @@ -378,7 +378,7 @@ class test_mail(common.TransactionCase): message.write({'subject': _subject}) compose_id = mail_compose.create(cr, uid, {'attachment_ids': [(0, 0, _attachments[0]), (0, 0, _attachments[1])]}, - {'mail.compose.message.mode': 'reply', 'default_model': 'mail.thread', 'default_res_id': self.group_pigs_id, 'active_id': message.id}) + {'default_composition_mode': 'reply', 'default_model': 'mail.thread', 'default_res_id': self.group_pigs_id, 'default_parent_id': message.id}) compose = mail_compose.browse(cr, uid, compose_id) # Test: form view methods diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 0c0626f44c9..15f428264ff 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -35,8 +35,7 @@ class mail_compose_message(osv.TransientModel): """ Generic message composition wizard. You may inherit from this wizard at model and view levels to provide specific features. - The behavior of the wizard can be modified through the context key - mail.compose.message.mode: + The behavior of the wizard depends on the composition_mode field: - 'reply': reply to a previous message. The wizard is pre-populated via ``get_message_data``. - 'comment': new post on a record. The wizard is pre-populated via @@ -56,10 +55,11 @@ class mail_compose_message(osv.TransientModel): - default_model or active_model - default_res_id or active_id - reply: active_id of a message the user replies to - - active_id: ID of a mail.message to which we are replying + - default_parent_id or message_id or active_id: ID of the + mail.message we reply to - message.res_model or default_model - message.res_id or default_res_id - - mass_mailing mode: model and IDs of records the user mass-mails + - mass_mail: model and IDs of records the user mass-mails - active_ids: record IDs - default_model or active_model """ diff --git a/addons/marketing_campaign/marketing_campaign_demo.xml b/addons/marketing_campaign/marketing_campaign_demo.xml index 19e44eb4ace..0c2d7f32715 100644 --- a/addons/marketing_campaign/marketing_campaign_demo.xml +++ b/addons/marketing_campaign/marketing_campaign_demo.xml @@ -64,7 +64,7 @@ - + diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index b1a5631e59e..592bf783a64 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -732,7 +732,7 @@ class purchase_order(osv.osv): # -------------------------------------- def needaction_domain_get(self, cr, uid, ids, context=None): - return [('state','=','draft')] + return [('state', '=', 'draft')] def create_send_note(self, cr, uid, ids, context=None): return self.message_post(cr, uid, ids, body=_("Request for quotation created."), context=context)