Merge lp:~openerp-dev/openobject-addons/6.1-opw-578237-rgo into lp:openobject-addons/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-578237-rgo
Merge into: lp:openobject-addons/6.1
Diff against target: 31 lines (+4/-3)
1 file modified
account_followup/report/account_followup_print.py (+4/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-578237-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+120342@code.launchpad.net

Description of the change

Hello,

Generated pdf does not translate the address in partner language and "Description" and "Ref" column's values in pdf are incorrect.

This fix fixes these issues. Kindly review the fix.

Thanks.

To post a comment you must log in.

Unmerged revisions

6953. By Ravi Gohil (OpenERP)

[FIX] account_followup: address on pdf generated is not translated and wrong values in description and invoice columns of pdf: (Maintenance Case : 578237)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_followup/report/account_followup_print.py'
--- account_followup/report/account_followup_print.py 2011-12-19 16:54:40 +0000
+++ account_followup/report/account_followup_print.py 2012-08-20 07:36:25 +0000
@@ -34,6 +34,7 @@
34 'getLines': self._lines_get,34 'getLines': self._lines_get,
35 'get_text': self._get_text35 'get_text': self._get_text
36 })36 })
37 self.context = context
3738
38 def _ids_to_objects(self, ids):39 def _ids_to_objects(self, ids):
39 pool = pooler.get_pool(self.cr.dbname)40 pool = pooler.get_pool(self.cr.dbname)
@@ -47,7 +48,7 @@
47 res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')48 res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
48 res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')49 res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')
49 adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type]50 adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type]
50 return adr and res_partner_address.read(self.cr, self.uid, [adr]) or [{}]51 return adr and res_partner_address.read(self.cr, self.uid, [adr], context=self.context.copy()) or [{}]
5152
52 def _lines_get(self, stat_by_partner_line):53 def _lines_get(self, stat_by_partner_line):
53 pool = pooler.get_pool(self.cr.dbname)54 pool = pooler.get_pool(self.cr.dbname)
@@ -68,8 +69,8 @@
68 line_cur[line.currency_id.id] = {'line': []}69 line_cur[line.currency_id.id] = {'line': []}
69 currency = line.currency_id or line.company_id.currency_id70 currency = line.currency_id or line.company_id.currency_id
70 line_data = {71 line_data = {
71 'name': line.move_id.name,72 'name': line.invoice.name,
72 'ref': line.ref,73 'ref': line.invoice.number,
73 'date':line.date,74 'date':line.date,
74 'date_maturity': line.date_maturity,75 'date_maturity': line.date_maturity,
75 'balance': currency.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),76 'balance': currency.id <> line.company_id.currency_id.id and line.amount_currency or (line.debit - line.credit),