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
=== modified file 'base_calendar/base_calendar.py'
--- base_calendar/base_calendar.py 2013-06-27 10:48:33 +0000
+++ base_calendar/base_calendar.py 2013-07-29 05:24:38 +0000
@@ -127,96 +127,6 @@
127 res = obj.read(cr, uid, ids, ['object', 'name'], context=context)127 res = obj.read(cr, uid, ids, ['object', 'name'], context=context)
128 return [(r['object'], r['name']) for r in res]128 return [(r['object'], r['name']) for r in res]
129129
130html_invitation = """
131<html>
132<head>
133<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
134<title>%(name)s</title>
135</head>
136<body>
137<table border="0" cellspacing="10" cellpadding="0" width="100%%"
138 style="font-family: Arial, Sans-serif; font-size: 14">
139 <tr>
140 <td width="100%%">Hello,</td>
141 </tr>
142 <tr>
143 <td width="100%%">You are invited for <i>%(company)s</i> Event.</td>
144 </tr>
145 <tr>
146 <td width="100%%">Below are the details of event. Hours and dates expressed in %(timezone)s time.</td>
147 </tr>
148</table>
149
150<table cellspacing="0" cellpadding="5" border="0" summary=""
151 style="width: 90%%; font-family: Arial, Sans-serif; border: 1px Solid #ccc; background-color: #f6f6f6">
152 <tr valign="center" align="center">
153 <td bgcolor="DFDFDF">
154 <h3>%(name)s</h3>
155 </td>
156 </tr>
157 <tr>
158 <td>
159 <table cellpadding="8" cellspacing="0" border="0"
160 style="font-size: 14" summary="Eventdetails" bgcolor="f6f6f6"
161 width="90%%">
162 <tr>
163 <td width="21%%">
164 <div><b>Start Date</b></div>
165 </td>
166 <td><b>:</b></td>
167 <td>%(start_date)s</td>
168 <td width="15%%">
169 <div><b>End Date</b></div>
170 </td>
171 <td><b>:</b></td>
172 <td width="25%%">%(end_date)s</td>
173 </tr>
174 <tr valign="top">
175 <td><b>Description</b></td>
176 <td><b>:</b></td>
177 <td colspan="3">%(description)s</td>
178 </tr>
179 <tr valign="top">
180 <td>
181 <div><b>Location</b></div>
182 </td>
183 <td><b>:</b></td>
184 <td colspan="3">%(location)s</td>
185 </tr>
186 <tr valign="top">
187 <td>
188 <div><b>Event Attendees</b></div>
189 </td>
190 <td><b>:</b></td>
191 <td colspan="3">
192 <div>
193 <div>%(attendees)s</div>
194 </div>
195 </td>
196 </tr>
197 </table>
198 </td>
199 </tr>
200</table>
201<table border="0" cellspacing="10" cellpadding="0" width="100%%"
202 style="font-family: Arial, Sans-serif; font-size: 14">
203 <tr>
204 <td width="100%%">From:</td>
205 </tr>
206 <tr>
207 <td width="100%%">%(user)s</td>
208 </tr>
209 <tr valign="top">
210 <td width="100%%">-<font color="a7a7a7">-------------------------</font></td>
211 </tr>
212 <tr>
213 <td width="100%%"> <font color="a7a7a7">%(sign)s</font></td>
214 </tr>
215</table>
216</body>
217</html>
218"""
219
220class calendar_attendee(osv.osv):130class calendar_attendee(osv.osv):
221 """131 """
222 Calendar Attendee Information132 Calendar Attendee Information
@@ -532,6 +442,95 @@
532 'sign': sign,442 'sign': sign,
533 'company': company443 'company': company
534 }444 }
445 html_invitation = """<html>
446<head>
447<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
448<title>%(name)s</title>
449</head>
450<body>
451<table border="0" cellspacing="10" cellpadding="0" width="100%%"
452 style="font-family: Arial, Sans-serif; font-size: 14">
453 <tr>
454 <td width="100%%">""" + _('Hello,') + """</td>
455 </tr>
456 <tr>
457 <td width="100%%">""" + _('You are invited for <i>%(company)s</i> Event.') + """</td>
458 </tr>
459 <tr>
460 <td width="100%%">""" + _('Below are the details of event. Hours and dates expressed in %(timezone)s time.') + """</td>
461 </tr>
462</table>
463
464<table cellspacing="0" cellpadding="5" border="0" summary=""
465 style="width: 90%%; font-family: Arial, Sans-serif; border: 1px Solid #ccc; background-color: #f6f6f6">
466 <tr valign="center" align="center">
467 <td bgcolor="DFDFDF">
468 <h3>%(name)s</h3>
469 </td>
470 </tr>
471 <tr>
472 <td>
473 <table cellpadding="8" cellspacing="0" border="0"
474 style="font-size: 14" summary="Eventdetails" bgcolor="f6f6f6"
475 width="90%%">
476 <tr>
477 <td width="21%%">
478 <div><b>""" + _('Start Date') + """</b></div>
479 </td>
480 <td><b>:</b></td>
481 <td>%(start_date)s</td>
482 <td width="15%%">
483 <div><b>""" + _('End Date') + """</b></div>
484 </td>
485 <td><b>:</b></td>
486 <td width="25%%">%(end_date)s</td>
487 </tr>
488 <tr valign="top">
489 <td><b>""" + _('Description') + """</b></td>
490 <td><b>:</b></td>
491 <td colspan="3">%(description)s</td>
492 </tr>
493 <tr valign="top">
494 <td>
495 <div><b>""" + _('Location') + """</b></div>
496 </td>
497 <td><b>:</b></td>
498 <td colspan="3">%(location)s</td>
499 </tr>
500 <tr valign="top">
501 <td>
502 <div><b>""" + _('Event Attendees') + """</b></div>
503 </td>
504 <td><b>:</b></td>
505 <td colspan="3">
506 <div>
507 <div>%(attendees)s</div>
508 </div>
509 </td>
510 </tr>
511 </table>
512 </td>
513 </tr>
514</table>
515<table border="0" cellspacing="10" cellpadding="0" width="100%%"
516 style="font-family: Arial, Sans-serif; font-size: 14">
517 <tr>
518 <td width="100%%">""" + _('From:') + """</td>
519 </tr>
520 <tr>
521 <td width="100%%">%(user)s</td>
522 </tr>
523 <tr valign="top">
524 <td width="100%%">-<font color="a7a7a7">-------------------------</font></td>
525 </tr>
526 <tr>
527 <td width="100%%"> <font color="a7a7a7">%(sign)s</font></td>
528 </tr>
529</table>
530</body>
531</html>
532"""
533
535 body = html_invitation % body_vals534 body = html_invitation % body_vals
536 if mail_to and email_from:535 if mail_to and email_from:
537 ics_file = self.get_ics_file(cr, uid, res_obj, context=context)536 ics_file = self.get_ics_file(cr, uid, res_obj, context=context)
@@ -1133,15 +1132,16 @@
1133 'email': partner.email1132 'email': partner.email
1134 }, context=context)1133 }, context=context)
1135 if partner.email:1134 if partner.email:
1136 mail_to = mail_to + " " + partner.email1135 mail_to = partner.email
1137 self.write(cr, uid, [event.id], {1136 self.write(cr, uid, [event.id], {
1138 'attendee_ids': [(4, att_id)]1137 'attendee_ids': [(4, att_id)]
1139 }, context=context)1138 }, context=context)
1140 new_attendees.append(att_id)1139 new_attendees.append(att_id)
11411140
1142 if mail_to and current_user.email:1141 if mail_to and current_user.email:
1143 att_obj._send_mail(cr, uid, new_attendees, mail_to,1142 context.update({partner.lang and 'lang': partner.lang or 'en_US'})
1144 email_from = current_user.email, context=context)1143 att_obj._send_mail(cr, uid, new_attendees, mail_to,
1144 email_from = current_user.email, context=context)
1145 return True1145 return True
11461146
1147 def default_organizer(self, cr, uid, context=None):1147 def default_organizer(self, cr, uid, context=None):
11481148
=== modified file 'base_calendar/i18n/base_calendar.pot'
--- base_calendar/i18n/base_calendar.pot 2013-06-13 18:15:03 +0000
+++ base_calendar/i18n/base_calendar.pot 2013-07-29 05:24:38 +0000
@@ -89,6 +89,60 @@
89msgstr ""89msgstr ""
9090
91#. module: base_calendar91#. module: base_calendar
92#: code:addons/base_calendar/base_calendar.py:454
93#, python-format
94msgid "Hello,"
95msgstr ""
96
97#. module: base_calendar
98#: code:addons/base_calendar/base_calendar.py:457
99#, python-format
100msgid "You are invited for <i>%(company)s</i> Event."
101msgstr ""
102
103#. module: base_calendar
104#: code:addons/base_calendar/base_calendar.py:460
105#, python-format
106msgid "Below are the details of event. Hours and dates expressed in %(timezone)s time."
107msgstr ""
108
109#. module: base_calendar
110#: code:addons/base_calendar/base_calendar.py:478
111#, python-format
112msgid "Start Date"
113msgstr ""
114
115#. module: base_calendar
116#: code:addons/base_calendar/base_calendar.py:483
117#, python-format
118msgid "End Date"
119msgstr ""
120
121#. module: base_calendar
122#: code:addons/base_calendar/base_calendar.py:489
123#, python-format
124msgid "Description"
125msgstr ""
126
127#. module: base_calendar
128#: code:addons/base_calendar/base_calendar.py:495
129#, python-format
130msgid "Location"
131msgstr ""
132
133#. module: base_calendar
134#: code:addons/base_calendar/base_calendar.py:502
135#, python-format
136msgid "Event Attendees"
137msgstr ""
138
139#. module: base_calendar
140#: code:addons/base_calendar/base_calendar.py:518
141#, python-format
142msgid "From:"
143msgstr ""
144
145#. module: base_calendar
92#: selection:calendar.event,byday:0146#: selection:calendar.event,byday:0
93#: selection:calendar.todo,byday:0147#: selection:calendar.todo,byday:0
94#: selection:crm.meeting,byday:0148#: selection:crm.meeting,byday:0

Subscribers

People subscribed via source and target branches

to all changes: