From 8483ca57cafab12f049088c4cfe74983453e8df0 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Mon, 23 Mar 2015 14:48:40 +0100 Subject: [PATCH] [IMP] Several UX improvements from saas6 version calendar : When you create an event (for example from a job interview), you should be set as an attendee. crm : Lead/opportunity : Bounce should be read only hr_recruitment : 'Create Employee' should be an action button, instead of a link in the form website_sale : SO report typo invoicing address instead of invoice address website : remove Unpublish on the dropdown website_sale : if accessory product is a non published product : do not show it on the ecommerce (avoid 403 error) --- addons/calendar/calendar.py | 11 +++++++++++ addons/crm/crm_lead_view.xml | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 5 ++--- addons/sale/views/report_saleorder.xml | 4 ++-- addons/website/views/website_templates.xml | 6 ------ addons/website_sale/models/sale_order.py | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index b0d54276621..74157cfb226 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -1106,6 +1106,17 @@ class calendar_event(osv.Model): if self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, att_id, email_from=mail_from, context=context): self.message_post(cr, uid, event.id, body=_("An invitation email has been sent to attendee %s") % (partner.name,), subtype="calendar.subtype_invitation", context=context) + if current_user.partner_id.id not in new_att_partner_ids: + access_token = self.new_invitation_token(cr, uid, event, current_user.partner_id.id) + values = { + 'partner_id': current_user.partner_id.id, + 'event_id': event.id, + 'access_token': access_token, + 'email': current_user.partner_id.email, + } + current_user_att_id = self.pool['calendar.attendee'].create(cr, uid, values, context=context) + new_attendees.append(current_user_att_id) + new_att_partner_ids.append(current_user.partner_id.id) if new_attendees: self.write(cr, uid, [event.id], {'attendee_ids': [(4, att) for att in new_attendees]}, context=context) if new_att_partner_ids: diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index a9eaa5250fd..9f30510a461 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -188,7 +188,7 @@ - +
+
@@ -105,9 +107,6 @@