clearcorp team mailing list archive
-
clearcorp team
-
Mailing list archive
-
Message #00795
lp:~dr.clearcorp/openerp-ccorp-addons/6.1-partner_ledger_report into lp:openerp-ccorp-addons/6.1
Diana Rodríguez Martínez has proposed merging lp:~dr.clearcorp/openerp-ccorp-addons/6.1-partner_ledger_report into lp:openerp-ccorp-addons/6.1.
Requested reviews:
CLEARCORP drivers (clearcorp-drivers)
For more details, see:
https://code.launchpad.net/~dr.clearcorp/openerp-ccorp-addons/6.1-partner_ledger_report/+merge/164541
[ADD] Add amount_currency column and compute the currency amount total
[FIX] Fix translations for the report
--
https://code.launchpad.net/~dr.clearcorp/openerp-ccorp-addons/6.1-partner_ledger_report/+merge/164541
Your team CLEARCORP development team is subscribed to branch lp:openerp-ccorp-addons/6.1.
=== modified file 'account_general_ledger_report/i18n/es_CR.po'
--- account_general_ledger_report/i18n/es_CR.po 2013-05-16 21:24:10 +0000
+++ account_general_ledger_report/i18n/es_CR.po 2013-05-17 21:08:26 +0000
@@ -6,8 +6,8 @@
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-05-16 21:14+0000\n"
-"PO-Revision-Date: 2013-05-16 21:14+0000\n"
+"POT-Creation-Date: 2013-05-17 21:01+0000\n"
+"PO-Revision-Date: 2013-05-17 21:01+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -21,19 +21,19 @@
msgstr "Filtrado por: "
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:95
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:99
msgid "Label"
msgstr "Etiqueta"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:100
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:104
msgid "Debit"
msgstr "Débito"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:77
-msgid "Initial balance:"
-msgstr "Balance inicial:"
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:97
+msgid "Journal"
+msgstr "Diario"
#. module: account_general_ledger_report
#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:57
@@ -41,21 +41,26 @@
msgstr "Movimientos destino: "
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:79
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:83
msgid "No move lines for this account"
msgstr "No existen líneas de asiento para esta cuenta"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:90
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:94
msgid "Date"
msgstr "Fecha"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:141
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:157
msgid "TOTAL"
msgstr "TOTAL"
#. module: account_general_ledger_report
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:109
+msgid "Curr. Bal."
+msgstr "Bal. M."
+
+#. module: account_general_ledger_report
#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:28
msgid "Fiscal Year: "
msgstr "Año fiscal: "
@@ -76,9 +81,9 @@
msgstr "Informe del libro mayor"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:92
-msgid "Entry"
-msgstr "Asiento"
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:108
+msgid "Curr. Am."
+msgstr "Mon. M."
#. module: account_general_ledger_report
#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:45
@@ -86,12 +91,12 @@
msgstr "Sin filtros"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:102
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:106
msgid "Cumul. Bal."
msgstr "Bal Acumul."
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:101
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:105
msgid "Credit"
msgstr "Crédito"
@@ -101,6 +106,11 @@
msgstr "Período: "
#. module: account_general_ledger_report
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:96
+msgid "Entry"
+msgstr "Asiento"
+
+#. module: account_general_ledger_report
#: constraint:general.ledger.webkit:0
msgid "The fiscalyear, periods or chart of account chosen have to belong to the same company."
msgstr "El año fiscal, períodos o plan contable elegidos deben pertenecer a la misma compañía."
@@ -116,7 +126,7 @@
msgstr "Catálogo de cuentas: "
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:98
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:102
msgid "Reconcile"
msgstr "Conciliación"
@@ -126,7 +136,7 @@
msgstr "Fechas: "
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:91
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:95
msgid "Period"
msgstr "Períodos"
@@ -137,12 +147,12 @@
msgstr "Informe del libro mayor"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:94
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:98
msgid "Partner"
msgstr "Empresa"
#. module: account_general_ledger_report
-#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:93
-msgid "Journal"
-msgstr "Diario"
+#: report:addons/account_general_ledger_report/report/account_general_ledger_report.mako:79
+msgid "Initial balance:"
+msgstr "Balance inicial:"
=== modified file 'account_general_ledger_report/report/account_general_ledger_report.mako'
--- account_general_ledger_report/report/account_general_ledger_report.mako 2013-05-16 21:24:10 +0000
+++ account_general_ledger_report/report/account_general_ledger_report.mako 2013-05-17 21:08:26 +0000
@@ -64,7 +64,9 @@
%for account in account_list_obj:
<%
cumul_balance = account_balance[account.id]['balance']
- amount_total_debit = amount_total_credit = amount_total_acum = 0.0
+ cumul_balance_curr = account_balance[account.id]['foreign_balance']
+
+ amount_total_debit = amount_total_credit = amount_total_curr = 0.0
print_column = False
move_lines = []
%>
@@ -74,9 +76,11 @@
<div class="table-row">
<div class="table-cell text">
<p class="subtitle">${account.code +' - ' +account.name}</p>
- <p class="subtitle">${_('Initial balance:')} ${formatLang(cumul_balance)}
-
- ${account.id not in account_lines.keys() and _('No move lines for this account') or ''}
+ <p class="subtitle">${_('Initial balance:')} ${formatLang(cumul_balance)}
+ %if account.currency_id:
+ ${account.currency_id.position == 'before' and (account.currency_id.symbol+' ') or ''}${formatLang(cumul_balance_curr)}${account.currency_id.position == 'after' and (' '+account.currency_id.symbol) or ''}
+ %endif
+ ${account.id not in account_lines.keys() and _('No move lines for this account') or ''}
</p>
</div>
</div>
@@ -88,18 +92,22 @@
<div class="table-header">
<div class="table-row labels no-wrap">
<div class="table-cell first-column" style="width: 55px">${_('Date')}</div>
- <div class="table-cell" style="width: 55px">${_('Period')}</div>
+ <div class="table-cell" style="width: 70px">${_('Period')}</div>
<div class="table-cell" style="width: 100px">${_('Entry')}</div>
<div class="table-cell" style="width: 70px">${_('Journal')}</div>
<div class="table-cell" style="width: 100px">${_('Partner')}</div>
<div class="table-cell" style="width: 100px">${_('Label')}</div>
%if account.reconcile or (account.id in account_conciliation.keys() and account_conciliation[account.id]):
<% print_column = True %>
- <div class="table-cell" style="width: 70px">${_('Reconcile')}</div>
- %endif
- <div class="table-cell" style="width: 80px">${_('Debit')}</div>
- <div class="table-cell" style="width: 80px">${_('Credit')}</div>
- <div class="table-cell amount last-column" style="width: 80px">${_('Cumul. Bal.')}</div>
+ <div class="table-cell" style="width: 75px">${_('Reconcile')}</div>
+ %endif
+ <div class="table-cell amount" style="width: 60px">${_('Debit')}</div>
+ <div class="table-cell amount" style="width: 60px">${_('Credit')}</div>
+ <div class="table-cell amount" style="width: 60px">${_('Cumul. Bal.')}</div>
+ %if account.currency_id:
+ <div class="table-cell amount" style="width: 60px">${_('Curr. Am.')}</div>
+ <div class="table-cell amount last-column" style="width: 60px">${_('Curr. Bal.')}</div>
+ %endif
</div>
</div>
<div class="table-body">
@@ -107,7 +115,11 @@
<%
amount_total_debit += line.debit
amount_total_credit += line.credit
- cumul_balance = cumul_balance + line.debit - line.credit
+
+ cumul_balance = cumul_balance + line.debit - line.credit
+ if line.amount_currency:
+ cumul_balance_curr = cumul_balance_curr + line.amount_currency
+ amount_total_curr += line.amount_currency
%>
<div class="table-row ${row_even and 'even' or 'odd'}">
<div class="table-cell first-column">${formatLang(line.date, date=True)}</div>
@@ -122,8 +134,12 @@
</div>
%endif
<div class="table-cell amount">${formatLang(line.debit)}</div>
- <div class="table-cell amount">${formatLang(line.credit)}</div>
- <div class="table-cell amount last-column">${formatLang(cumul_balance)}</div>
+ <div class="table-cell amount"> ${formatLang(line.credit)}</div>
+ <div class="table-cell amount last-column"> ${formatLang(cumul_balance)}</div>
+ %if account.currency_id:
+ <div class="table-cell amount"> ${line.amount_currency and formatLang(line.amount_currency) or ''}</div>
+ <div class="table-cell amount last-column"> ${formatLang(cumul_balance_curr)}</div>
+ %endif
</div>
%endfor
<div class="table-row spacer">
@@ -140,8 +156,14 @@
%endif
<div class="table-cell">${_('TOTAL')}</div>
<div class="table-cell amount" >${formatLang(amount_total_debit)}</div>
- <div class="table-cell amount" >${formatLang(amount_total_credit)}</div>
- <div class="table-cell amount last-column" >${formatLang(cumul_balance)}</div>
+ <div class="table-cell amount" > ${formatLang(amount_total_credit)}</div>
+ %if account.currency_id:
+ <div class="table-cell amount"> ${formatLang(cumul_balance)}</div>
+ <div class="table-cell amount"> ${formatLang(amount_total_curr)}</div>
+ <div class="table-cell amount last-column"> ${formatLang(cumul_balance_curr)}</div>
+ %else:
+ <div class="table-cell amount last-column"> ${formatLang(cumul_balance)}</div>
+ %endif
</div>
<%
amount_total_debit = amount_total_credit = 0.0
=== modified file 'account_general_ledger_report/report/account_general_ledger_report.py'
--- account_general_ledger_report/report/account_general_ledger_report.py 2013-05-16 21:24:10 +0000
+++ account_general_ledger_report/report/account_general_ledger_report.py 2013-05-17 21:08:26 +0000
@@ -131,12 +131,15 @@
account_lines[line.account_id.id] = []
account_lines[line.account_id.id].append(line)
-
-
+
+ fields = ['balance']
+ if self._get_amount_currency(data):
+ fields.append('foreign_balance')
+
if filter_type == 'filter_date':
account_balance = library_obj.get_account_balance(cr, uid,
account_list_ids,
- ['balance'],
+ fields,
initial_balance=True,
company_id=chart_account.company_id.id,
fiscal_year_id = fiscalyear.id,
@@ -148,7 +151,7 @@
elif filter_type == 'filter_period':
account_balance = library_obj.get_account_balance(cr, uid,
account_list_ids,
- ['balance'],
+ fields,
initial_balance=True,
company_id=chart_account.company_id.id,
fiscal_year_id = fiscalyear.id,
Follow ups