Merge lp:~openerp-commiter/openobject-addons/dev-addons2-sus02 into lp:~openerp/openobject-addons/trunk-fix-osvmem-read

Proposed by Sunny Sheth(OpenERP)
Status: Merged
Merged at revision: 4404
Proposed branch: lp:~openerp-commiter/openobject-addons/dev-addons2-sus02
Merge into: lp:~openerp/openobject-addons/trunk-fix-osvmem-read
Diff against target: 96 lines (+15/-15)
2 files modified
auction/wizard/auction_pay_sel.py (+5/-5)
email_template/wizard/email_template_send_wizard.py (+10/-10)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-addons/dev-addons2-sus02
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+49035@code.launchpad.net

Description of the change

Done changes in:
->auction/wizard/auction_pay_sel.py
->email_template/wizard/email_template_send_wizard.py

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'auction/wizard/auction_pay_sel.py'
--- auction/wizard/auction_pay_sel.py 2011-01-14 00:11:01 +0000
+++ auction/wizard/auction_pay_sel.py 2011-02-09 09:48:36 +0000
@@ -42,14 +42,14 @@
42 @param context: A standard dictionary42 @param context: A standard dictionary
43 @return:43 @return:
44 """44 """
45 if context is None: 45 if context is None:
46 context = {}46 context = {}
47 lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context=context)47 lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context=context)
48 invoice_obj = self.pool.get('account.invoice')48 invoice_obj = self.pool.get('account.invoice')
49 for datas in self.read(cr, uid, ids, context=context):49 for datas in self.browse(cr, uid, ids, context=context):
50 account_id = datas.get('writeoff_acc_id', False)50 account_id = datas.dest_account_id and datas.dest_account_id.id or False
51 period_id = datas.get('period_id', False)51 period_id = datas.period_id and datas.period_id.id or False
52 journal_id = datas.get('journal_id', False)52 journal_id = datas.journal_id and datas.journal_id.id or False
53 if lot.sel_inv_id:53 if lot.sel_inv_id:
54 p = invoice_obj.pay_and_reconcile(['lot.sel_inv_id.id'], datas['amount'], datas['dest_account_id'], journal_id, account_id, period_id, journal_id, context)54 p = invoice_obj.pay_and_reconcile(['lot.sel_inv_id.id'], datas['amount'], datas['dest_account_id'], journal_id, account_id, period_id, journal_id, context)
55 return {'type': 'ir.actions.act_window_close'}55 return {'type': 'ir.actions.act_window_close'}
5656
=== modified file 'email_template/wizard/email_template_send_wizard.py'
--- email_template/wizard/email_template_send_wizard.py 2011-01-14 00:11:01 +0000
+++ email_template/wizard/email_template_send_wizard.py 2011-02-09 09:48:36 +0000
@@ -66,7 +66,7 @@
66 if not id:66 if not id:
67 id = context['src_rec_ids'][0]67 id = context['src_rec_ids'][0]
68 return get_value(cursor, user, id, message, template, context)68 return get_value(cursor, user, id, message, template, context)
69 69
70 def _get_template(self, cr, uid, context=None):70 def _get_template(self, cr, uid, context=None):
71 if context is None:71 if context is None:
72 context = {}72 context = {}
@@ -116,13 +116,13 @@
116 'to':fields.char('To',size=250,required=True),116 'to':fields.char('To',size=250,required=True),
117 'cc':fields.char('CC',size=250,),117 'cc':fields.char('CC',size=250,),
118 'bcc':fields.char('BCC',size=250,),118 'bcc':fields.char('BCC',size=250,),
119 'reply_to':fields.char('Reply-To', 119 'reply_to':fields.char('Reply-To',
120 size=250, 120 size=250,
121 help="The address recipients should reply to,"121 help="The address recipients should reply to,"
122 " if different from the From address."122 " if different from the From address."
123 " Placeholders can be used here."),123 " Placeholders can be used here."),
124 'message_id':fields.char('Message-ID', 124 'message_id':fields.char('Message-ID',
125 size=250, 125 size=250,
126 help="The Message-ID header value, if you need to"126 help="The Message-ID header value, if you need to"
127 "specify it, for example to automatically recognize the replies later."127 "specify it, for example to automatically recognize the replies later."
128 " Placeholders can be used here."),128 " Placeholders can be used here."),
@@ -133,12 +133,12 @@
133 'signature':fields.boolean('Attach my signature to mail'),133 'signature':fields.boolean('Attach my signature to mail'),
134 #'filename':fields.text('File Name'),134 #'filename':fields.text('File Name'),
135 'requested':fields.integer('No of requested Mails',readonly=True),135 'requested':fields.integer('No of requested Mails',readonly=True),
136 'generated':fields.integer('No of generated Mails',readonly=True), 136 'generated':fields.integer('No of generated Mails',readonly=True),
137 'full_success':fields.boolean('Complete Success',readonly=True),137 'full_success':fields.boolean('Complete Success',readonly=True),
138 'attachment_ids': fields.many2many('ir.attachment','send_wizard_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),138 'attachment_ids': fields.many2many('ir.attachment','send_wizard_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
139 }139 }
140140
141 #FIXME: probably better by overriding default_get directly 141 #FIXME: probably better by overriding default_get directly
142 _defaults = {142 _defaults = {
143 'state': lambda self,cr,uid,ctx: len(ctx['src_rec_ids']) > 1 and 'multi' or 'single',143 'state': lambda self,cr,uid,ctx: len(ctx['src_rec_ids']) > 1 and 'multi' or 'single',
144 'rel_model': lambda self,cr,uid,ctx: self.pool.get('ir.model').search(cr,uid,[('model','=',ctx['src_model'])],context=ctx)[0],144 'rel_model': lambda self,cr,uid,ctx: self.pool.get('ir.model').search(cr,uid,[('model','=',ctx['src_model'])],context=ctx)[0],
@@ -156,7 +156,7 @@
156 'reply_to': lambda self,cr,uid,ctx: self._get_template_value(cr, uid, 'reply_to', ctx),156 'reply_to': lambda self,cr,uid,ctx: self._get_template_value(cr, uid, 'reply_to', ctx),
157 'requested':lambda self,cr,uid,ctx: len(ctx['src_rec_ids']),157 'requested':lambda self,cr,uid,ctx: len(ctx['src_rec_ids']),
158 'full_success': False,158 'full_success': False,
159 'attachment_ids': [], 159 'attachment_ids': [],
160 }160 }
161161
162 def fields_get(self, cr, uid, fields=None, context=None, write_access=True):162 def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
@@ -200,7 +200,7 @@
200 else:200 else:
201 raise osv.except_osv(_("Email Template"),_("Email sending failed for one or more objects."))201 raise osv.except_osv(_("Email Template"),_("Email sending failed for one or more objects."))
202 return True202 return True
203 203
204 def save_to_mailbox(self, cr, uid, ids, context=None):204 def save_to_mailbox(self, cr, uid, ids, context=None):
205 def get_end_value(id, value):205 def get_end_value(id, value):
206 if len(context['src_rec_ids']) > 1: # Multiple Mail: Gets value from the template206 if len(context['src_rec_ids']) > 1: # Multiple Mail: Gets value from the template
@@ -213,7 +213,7 @@
213 mail_ids = []213 mail_ids = []
214 template = self._get_template(cr, uid, context)214 template = self._get_template(cr, uid, context)
215 for id in context['src_rec_ids']:215 for id in context['src_rec_ids']:
216 screen_vals = self.read(cr, uid, ids[0], [],context)216 screen_vals = self.read(cr, uid, ids[0], [],context=context)
217 account = self.pool.get('email_template.account').read(cr, uid, screen_vals['from'], context=context)217 account = self.pool.get('email_template.account').read(cr, uid, screen_vals['from'], context=context)
218 vals = {218 vals = {
219 'email_from': tools.ustr(account['name']) + "<" + tools.ustr(account['email_id']) + ">",219 'email_from': tools.ustr(account['name']) + "<" + tools.ustr(account['email_id']) + ">",

Subscribers

People subscribed via source and target branches