diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2017-03-30 13:43:33 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2017-03-30 15:50:45 +0200 |
| commit | bbb3bd876a337d35f75c06ff53bbb5284c830f76 (patch) | |
| tree | fabe23bcf2a28fb6c217a33069324011dd83cf7e /addons | |
| parent | cc6a5110eec2e7a9434c6e1b98b8452e43dde75d (diff) | |
[FIX] account_extra_reports: Partner Ledger report
- Activate multi-currency
- Create an invoice in a currency different from the company currency
- Go to Accounting > Reporting > Management > Partner Ledger
- Activate the option "With Currency"
The report printed doesn't contain the amount currency.
opw-726440
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account_extra_reports/report/account_partner_ledger.py | 2 | ||||
| -rw-r--r-- | addons/account_extra_reports/views/report_partnerledger.xml | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/addons/account_extra_reports/report/account_partner_ledger.py b/addons/account_extra_reports/report/account_partner_ledger.py index 53b9164f032..9d72a4c1b3f 100644 --- a/addons/account_extra_reports/report/account_partner_ledger.py +++ b/addons/account_extra_reports/report/account_partner_ledger.py @@ -11,6 +11,7 @@ class ReportPartnerLedger(models.AbstractModel): def _lines(self, data, partner): full_account = [] + currency = self.env['res.currency'] query_get_data = self.env['account.move.line'].with_context(data['form'].get('used_context', {}))._query_get() reconcile_clause = "" if data['form']['reconciled'] else ' AND "account_move_line".reconciled = false ' params = [partner.id, tuple(data['computed']['move_state']), tuple(data['computed']['account_ids'])] + query_get_data[2] @@ -40,6 +41,7 @@ class ReportPartnerLedger(models.AbstractModel): ) sum += r['debit'] - r['credit'] r['progress'] = sum + r['currency_id'] = currency.browse(r.get('currency_id')) full_account.append(r) return full_account diff --git a/addons/account_extra_reports/views/report_partnerledger.xml b/addons/account_extra_reports/views/report_partnerledger.xml index e8cb8c3e263..e200d0f08a8 100644 --- a/addons/account_extra_reports/views/report_partnerledger.xml +++ b/addons/account_extra_reports/views/report_partnerledger.xml @@ -36,7 +36,7 @@ <th>Debit</th> <th>Credit</th> <th>Balance</th> - <th t-if="amount_currency">Currency</th> + <th t-if="data['form']['amount_currency']">Currency</th> </tr> </thead> <tbody> @@ -77,8 +77,10 @@ <td class="text-right"> <span t-esc="line['progress']" t-esc-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> </td> - <td t-if="amount_currency"> - <span t-esc="line['amount_currency']" t-esc-options='{"widget": "monetary", "display_currency": "line[\"currency_id\"]"}'/> + <td class="text-right" t-if="data['form']['amount_currency']"> + <t t-if="line['currency_id']"> + <span t-esc="line['amount_currency']" t-esc-options='{"widget": "monetary", "display_currency": "line[\"currency_id\"]"}'/> + </t> </td> </tr> </tbody> |
