Merge lp:~openerp-dev/openobject-addons/7.0-opw-591684-nep into lp:openobject-addons

Proposed by Vinay Rana (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-591684-nep
Merge into: lp:openobject-addons
Diff against target: 282 lines (+148/-94)
2 files modified
base_calendar/base_calendar.py (+94/-94)
base_calendar/i18n/base_calendar.pot (+54/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-591684-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+177316@code.launchpad.net

Description of the change

As this issue 591684 remain to put MP so I am putting this MP.

To post a comment you must log in.

Unmerged revisions

9096. By Nehal Panchal (OpenERP)

[FIX] base_calendar : Event Invitation mail should be sent in attendees language

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_calendar/base_calendar.py'
2--- base_calendar/base_calendar.py 2013-06-27 10:48:33 +0000
3+++ base_calendar/base_calendar.py 2013-07-29 05:24:38 +0000
4@@ -127,96 +127,6 @@
5 res = obj.read(cr, uid, ids, ['object', 'name'], context=context)
6 return [(r['object'], r['name']) for r in res]
7
8-html_invitation = """
9-<html>
10-<head>
11-<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
12-<title>%(name)s</title>
13-</head>
14-<body>
15-<table border="0" cellspacing="10" cellpadding="0" width="100%%"
16- style="font-family: Arial, Sans-serif; font-size: 14">
17- <tr>
18- <td width="100%%">Hello,</td>
19- </tr>
20- <tr>
21- <td width="100%%">You are invited for <i>%(company)s</i> Event.</td>
22- </tr>
23- <tr>
24- <td width="100%%">Below are the details of event. Hours and dates expressed in %(timezone)s time.</td>
25- </tr>
26-</table>
27-
28-<table cellspacing="0" cellpadding="5" border="0" summary=""
29- style="width: 90%%; font-family: Arial, Sans-serif; border: 1px Solid #ccc; background-color: #f6f6f6">
30- <tr valign="center" align="center">
31- <td bgcolor="DFDFDF">
32- <h3>%(name)s</h3>
33- </td>
34- </tr>
35- <tr>
36- <td>
37- <table cellpadding="8" cellspacing="0" border="0"
38- style="font-size: 14" summary="Eventdetails" bgcolor="f6f6f6"
39- width="90%%">
40- <tr>
41- <td width="21%%">
42- <div><b>Start Date</b></div>
43- </td>
44- <td><b>:</b></td>
45- <td>%(start_date)s</td>
46- <td width="15%%">
47- <div><b>End Date</b></div>
48- </td>
49- <td><b>:</b></td>
50- <td width="25%%">%(end_date)s</td>
51- </tr>
52- <tr valign="top">
53- <td><b>Description</b></td>
54- <td><b>:</b></td>
55- <td colspan="3">%(description)s</td>
56- </tr>
57- <tr valign="top">
58- <td>
59- <div><b>Location</b></div>
60- </td>
61- <td><b>:</b></td>
62- <td colspan="3">%(location)s</td>
63- </tr>
64- <tr valign="top">
65- <td>
66- <div><b>Event Attendees</b></div>
67- </td>
68- <td><b>:</b></td>
69- <td colspan="3">
70- <div>
71- <div>%(attendees)s</div>
72- </div>
73- </td>
74- </tr>
75- </table>
76- </td>
77- </tr>
78-</table>
79-<table border="0" cellspacing="10" cellpadding="0" width="100%%"
80- style="font-family: Arial, Sans-serif; font-size: 14">
81- <tr>
82- <td width="100%%">From:</td>
83- </tr>
84- <tr>
85- <td width="100%%">%(user)s</td>
86- </tr>
87- <tr valign="top">
88- <td width="100%%">-<font color="a7a7a7">-------------------------</font></td>
89- </tr>
90- <tr>
91- <td width="100%%"> <font color="a7a7a7">%(sign)s</font></td>
92- </tr>
93-</table>
94-</body>
95-</html>
96-"""
97-
98 class calendar_attendee(osv.osv):
99 """
100 Calendar Attendee Information
101@@ -532,6 +442,95 @@
102 'sign': sign,
103 'company': company
104 }
105+ html_invitation = """<html>
106+<head>
107+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
108+<title>%(name)s</title>
109+</head>
110+<body>
111+<table border="0" cellspacing="10" cellpadding="0" width="100%%"
112+ style="font-family: Arial, Sans-serif; font-size: 14">
113+ <tr>
114+ <td width="100%%">""" + _('Hello,') + """</td>
115+ </tr>
116+ <tr>
117+ <td width="100%%">""" + _('You are invited for <i>%(company)s</i> Event.') + """</td>
118+ </tr>
119+ <tr>
120+ <td width="100%%">""" + _('Below are the details of event. Hours and dates expressed in %(timezone)s time.') + """</td>
121+ </tr>
122+</table>
123+
124+<table cellspacing="0" cellpadding="5" border="0" summary=""
125+ style="width: 90%%; font-family: Arial, Sans-serif; border: 1px Solid #ccc; background-color: #f6f6f6">
126+ <tr valign="center" align="center">
127+ <td bgcolor="DFDFDF">
128+ <h3>%(name)s</h3>
129+ </td>
130+ </tr>
131+ <tr>
132+ <td>
133+ <table cellpadding="8" cellspacing="0" border="0"
134+ style="font-size: 14" summary="Eventdetails" bgcolor="f6f6f6"
135+ width="90%%">
136+ <tr>
137+ <td width="21%%">
138+ <div><b>""" + _('Start Date') + """</b></div>
139+ </td>
140+ <td><b>:</b></td>
141+ <td>%(start_date)s</td>
142+ <td width="15%%">
143+ <div><b>""" + _('End Date') + """</b></div>
144+ </td>
145+ <td><b>:</b></td>
146+ <td width="25%%">%(end_date)s</td>
147+ </tr>
148+ <tr valign="top">
149+ <td><b>""" + _('Description') + """</b></td>
150+ <td><b>:</b></td>
151+ <td colspan="3">%(description)s</td>
152+ </tr>
153+ <tr valign="top">
154+ <td>
155+ <div><b>""" + _('Location') + """</b></div>
156+ </td>
157+ <td><b>:</b></td>
158+ <td colspan="3">%(location)s</td>
159+ </tr>
160+ <tr valign="top">
161+ <td>
162+ <div><b>""" + _('Event Attendees') + """</b></div>
163+ </td>
164+ <td><b>:</b></td>
165+ <td colspan="3">
166+ <div>
167+ <div>%(attendees)s</div>
168+ </div>
169+ </td>
170+ </tr>
171+ </table>
172+ </td>
173+ </tr>
174+</table>
175+<table border="0" cellspacing="10" cellpadding="0" width="100%%"
176+ style="font-family: Arial, Sans-serif; font-size: 14">
177+ <tr>
178+ <td width="100%%">""" + _('From:') + """</td>
179+ </tr>
180+ <tr>
181+ <td width="100%%">%(user)s</td>
182+ </tr>
183+ <tr valign="top">
184+ <td width="100%%">-<font color="a7a7a7">-------------------------</font></td>
185+ </tr>
186+ <tr>
187+ <td width="100%%"> <font color="a7a7a7">%(sign)s</font></td>
188+ </tr>
189+</table>
190+</body>
191+</html>
192+"""
193+
194 body = html_invitation % body_vals
195 if mail_to and email_from:
196 ics_file = self.get_ics_file(cr, uid, res_obj, context=context)
197@@ -1133,15 +1132,16 @@
198 'email': partner.email
199 }, context=context)
200 if partner.email:
201- mail_to = mail_to + " " + partner.email
202+ mail_to = partner.email
203 self.write(cr, uid, [event.id], {
204 'attendee_ids': [(4, att_id)]
205 }, context=context)
206 new_attendees.append(att_id)
207
208- if mail_to and current_user.email:
209- att_obj._send_mail(cr, uid, new_attendees, mail_to,
210- email_from = current_user.email, context=context)
211+ if mail_to and current_user.email:
212+ context.update({partner.lang and 'lang': partner.lang or 'en_US'})
213+ att_obj._send_mail(cr, uid, new_attendees, mail_to,
214+ email_from = current_user.email, context=context)
215 return True
216
217 def default_organizer(self, cr, uid, context=None):
218
219=== modified file 'base_calendar/i18n/base_calendar.pot'
220--- base_calendar/i18n/base_calendar.pot 2013-06-13 18:15:03 +0000
221+++ base_calendar/i18n/base_calendar.pot 2013-07-29 05:24:38 +0000
222@@ -89,6 +89,60 @@
223 msgstr ""
224
225 #. module: base_calendar
226+#: code:addons/base_calendar/base_calendar.py:454
227+#, python-format
228+msgid "Hello,"
229+msgstr ""
230+
231+#. module: base_calendar
232+#: code:addons/base_calendar/base_calendar.py:457
233+#, python-format
234+msgid "You are invited for <i>%(company)s</i> Event."
235+msgstr ""
236+
237+#. module: base_calendar
238+#: code:addons/base_calendar/base_calendar.py:460
239+#, python-format
240+msgid "Below are the details of event. Hours and dates expressed in %(timezone)s time."
241+msgstr ""
242+
243+#. module: base_calendar
244+#: code:addons/base_calendar/base_calendar.py:478
245+#, python-format
246+msgid "Start Date"
247+msgstr ""
248+
249+#. module: base_calendar
250+#: code:addons/base_calendar/base_calendar.py:483
251+#, python-format
252+msgid "End Date"
253+msgstr ""
254+
255+#. module: base_calendar
256+#: code:addons/base_calendar/base_calendar.py:489
257+#, python-format
258+msgid "Description"
259+msgstr ""
260+
261+#. module: base_calendar
262+#: code:addons/base_calendar/base_calendar.py:495
263+#, python-format
264+msgid "Location"
265+msgstr ""
266+
267+#. module: base_calendar
268+#: code:addons/base_calendar/base_calendar.py:502
269+#, python-format
270+msgid "Event Attendees"
271+msgstr ""
272+
273+#. module: base_calendar
274+#: code:addons/base_calendar/base_calendar.py:518
275+#, python-format
276+msgid "From:"
277+msgstr ""
278+
279+#. module: base_calendar
280 #: selection:calendar.event,byday:0
281 #: selection:calendar.todo,byday:0
282 #: selection:crm.meeting,byday:0

Subscribers

People subscribed via source and target branches

to all changes: