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
1=== modified file 'auction/wizard/auction_pay_sel.py'
2--- auction/wizard/auction_pay_sel.py 2011-01-14 00:11:01 +0000
3+++ auction/wizard/auction_pay_sel.py 2011-02-09 09:48:36 +0000
4@@ -42,14 +42,14 @@
5 @param context: A standard dictionary
6 @return:
7 """
8- if context is None:
9+ if context is None:
10 context = {}
11 lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context=context)
12 invoice_obj = self.pool.get('account.invoice')
13- for datas in self.read(cr, uid, ids, context=context):
14- account_id = datas.get('writeoff_acc_id', False)
15- period_id = datas.get('period_id', False)
16- journal_id = datas.get('journal_id', False)
17+ for datas in self.browse(cr, uid, ids, context=context):
18+ account_id = datas.dest_account_id and datas.dest_account_id.id or False
19+ period_id = datas.period_id and datas.period_id.id or False
20+ journal_id = datas.journal_id and datas.journal_id.id or False
21 if lot.sel_inv_id:
22 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)
23 return {'type': 'ir.actions.act_window_close'}
24
25=== modified file 'email_template/wizard/email_template_send_wizard.py'
26--- email_template/wizard/email_template_send_wizard.py 2011-01-14 00:11:01 +0000
27+++ email_template/wizard/email_template_send_wizard.py 2011-02-09 09:48:36 +0000
28@@ -66,7 +66,7 @@
29 if not id:
30 id = context['src_rec_ids'][0]
31 return get_value(cursor, user, id, message, template, context)
32-
33+
34 def _get_template(self, cr, uid, context=None):
35 if context is None:
36 context = {}
37@@ -116,13 +116,13 @@
38 'to':fields.char('To',size=250,required=True),
39 'cc':fields.char('CC',size=250,),
40 'bcc':fields.char('BCC',size=250,),
41- 'reply_to':fields.char('Reply-To',
42- size=250,
43+ 'reply_to':fields.char('Reply-To',
44+ size=250,
45 help="The address recipients should reply to,"
46 " if different from the From address."
47 " Placeholders can be used here."),
48- 'message_id':fields.char('Message-ID',
49- size=250,
50+ 'message_id':fields.char('Message-ID',
51+ size=250,
52 help="The Message-ID header value, if you need to"
53 "specify it, for example to automatically recognize the replies later."
54 " Placeholders can be used here."),
55@@ -133,12 +133,12 @@
56 'signature':fields.boolean('Attach my signature to mail'),
57 #'filename':fields.text('File Name'),
58 'requested':fields.integer('No of requested Mails',readonly=True),
59- 'generated':fields.integer('No of generated Mails',readonly=True),
60+ 'generated':fields.integer('No of generated Mails',readonly=True),
61 'full_success':fields.boolean('Complete Success',readonly=True),
62 'attachment_ids': fields.many2many('ir.attachment','send_wizard_attachment_rel', 'wizard_id', 'attachment_id', 'Attachments'),
63 }
64
65- #FIXME: probably better by overriding default_get directly
66+ #FIXME: probably better by overriding default_get directly
67 _defaults = {
68 'state': lambda self,cr,uid,ctx: len(ctx['src_rec_ids']) > 1 and 'multi' or 'single',
69 'rel_model': lambda self,cr,uid,ctx: self.pool.get('ir.model').search(cr,uid,[('model','=',ctx['src_model'])],context=ctx)[0],
70@@ -156,7 +156,7 @@
71 'reply_to': lambda self,cr,uid,ctx: self._get_template_value(cr, uid, 'reply_to', ctx),
72 'requested':lambda self,cr,uid,ctx: len(ctx['src_rec_ids']),
73 'full_success': False,
74- 'attachment_ids': [],
75+ 'attachment_ids': [],
76 }
77
78 def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
79@@ -200,7 +200,7 @@
80 else:
81 raise osv.except_osv(_("Email Template"),_("Email sending failed for one or more objects."))
82 return True
83-
84+
85 def save_to_mailbox(self, cr, uid, ids, context=None):
86 def get_end_value(id, value):
87 if len(context['src_rec_ids']) > 1: # Multiple Mail: Gets value from the template
88@@ -213,7 +213,7 @@
89 mail_ids = []
90 template = self._get_template(cr, uid, context)
91 for id in context['src_rec_ids']:
92- screen_vals = self.read(cr, uid, ids[0], [],context)
93+ screen_vals = self.read(cr, uid, ids[0], [],context=context)
94 account = self.pool.get('email_template.account').read(cr, uid, screen_vals['from'], context=context)
95 vals = {
96 'email_from': tools.ustr(account['name']) + "<" + tools.ustr(account['email_id']) + ">",

Subscribers

People subscribed via source and target branches