[FIX] account: partner ledger with currency.

In the partner ledger wizard, you can check
a boolean to display the amount within the
currency the amount has been invoiced.

This feature was simply no more working
in Odoo 8.0.

opw-630268
This commit is contained in:
Denis Ledoux 2015-04-01 15:34:51 +02:00
parent 32bc9fcb3a
commit 433feb5a38
2 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,7 @@ class third_party_ledger(report_sxw.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context=None): def __init__(self, cr, uid, name, context=None):
super(third_party_ledger, self).__init__(cr, uid, name, context=context) super(third_party_ledger, self).__init__(cr, uid, name, context=context)
self.init_bal_sum = 0.0 self.init_bal_sum = 0.0
self.amount_currency = {}
self.localcontext.update({ self.localcontext.update({
'time': time, 'time': time,
'lines': self.lines, 'lines': self.lines,
@ -50,6 +51,7 @@ class third_party_ledger(report_sxw.rml_parse, common_report_header):
'display_initial_balance':self._display_initial_balance, 'display_initial_balance':self._display_initial_balance,
'display_currency':self._display_currency, 'display_currency':self._display_currency,
'get_target_move': self._get_target_move, 'get_target_move': self._get_target_move,
'amount_currency': self.amount_currency,
}) })
def _get_filter(self, data): def _get_filter(self, data):
@ -70,7 +72,10 @@ class third_party_ledger(report_sxw.rml_parse, common_report_header):
if data['form']['filter'] == 'unreconciled': if data['form']['filter'] == 'unreconciled':
self.reconcil = False self.reconcil = False
self.result_selection = data['form'].get('result_selection', 'customer') self.result_selection = data['form'].get('result_selection', 'customer')
self.amount_currency = data['form'].get('amount_currency', False) if data['form'].get('amount_currency'):
self.amount_currency['currency'] = True
else:
self.amount_currency.pop('currency', False)
self.target_move = data['form'].get('target_move', 'all') self.target_move = data['form'].get('target_move', 'all')
PARTNER_REQUEST = '' PARTNER_REQUEST = ''
move_state = ['draft','posted'] move_state = ['draft','posted']

View File

@ -117,7 +117,7 @@
<span t-esc="formatLang(line['progress'], currency_obj=res_company.currency_id)"/> <span t-esc="formatLang(line['progress'], currency_obj=res_company.currency_id)"/>
</td> </td>
<td t-if="amount_currency"> <td t-if="amount_currency">
<span t-esc="formatLang(line['amount_currency'])"/> <span t-esc="formatLang(line['amount_currency'])"/>&amp;nbsp;<span t-esc="line['currency_code']"/>
</td> </td>
</tr> </tr>
</t> </t>