Browse Source

Qweb: honor translated account names (#227)

[IMP] account_financial_report_qweb: honor translated account names
pull/246/head
Louis Bettens 8 years ago
committed by Pedro M. Baeza
parent
commit
7289915002
  1. 4
      account_financial_report_qweb/i18n/fr.po
  2. 8
      account_financial_report_qweb/report/general_ledger.py
  3. 8
      account_financial_report_qweb/report/open_items.py

4
account_financial_report_qweb/i18n/fr.po

@ -985,7 +985,7 @@ msgstr "Écritures comptabilisées seulement"
#: model:ir.ui.view,arch_db:account_financial_report_qweb.report_open_items_qweb
#, python-format
msgid "Open Items"
msgstr "Écritures non léttrées"
msgstr "Écritures non lettrées"
#. module: account_financial_report_qweb
#: model:ir.model,name:account_financial_report_qweb.model_open_items_report_wizard
@ -995,7 +995,7 @@ msgstr "Open Items Report Wizard"
#. module: account_financial_report_qweb
#: model:ir.actions.report.xml,name:account_financial_report_qweb.action_report_open_items_xlsx
msgid "Open Items XLSX"
msgstr "Écritures non léttrées XLSX"
msgstr "Écritures non lettrées XLSX"
#. module: account_financial_report_qweb
#: model:ir.model.fields,field_description:account_financial_report_qweb.field_report_aged_partner_balance_qweb_open_items_id

8
account_financial_report_qweb/report/general_ledger.py

@ -413,7 +413,7 @@ SELECT
NOW() AS create_date,
a.id AS account_id,
a.code,
a.name,
COALESCE(tr.value, a.name) AS name,
COALESCE(i.debit, 0.0) AS initial_debit,
COALESCE(i.credit, 0.0) AS initial_credit,
COALESCE(i.balance, 0.0) AS initial_balance,
@ -427,6 +427,11 @@ LEFT JOIN
initial_sum_amounts i ON a.id = i.account_id
LEFT JOIN
final_sum_amounts f ON a.id = f.account_id
LEFT JOIN
ir_translation tr ON a.id = tr.res_id
AND tr.lang = %s
AND tr.type = 'model'
AND tr.name = 'account.account,name'
WHERE
(
i.debit IS NOT NULL AND i.debit != 0
@ -492,6 +497,7 @@ AND
query_inject_account_params += (
self.id,
self.env.uid,
self.env.lang,
)
self.env.cr.execute(query_inject_account, query_inject_account_params)

8
account_financial_report_qweb/report/open_items.py

@ -233,9 +233,14 @@ SELECT
NOW() AS create_date,
a.id AS account_id,
a.code,
a.name
COALESCE(tr.value, a.name) AS name
FROM
accounts a
LEFT JOIN
ir_translation tr ON a.id = tr.res_id
AND tr.lang = %s
AND tr.type = 'model'
AND tr.name = 'account.account,name'
"""
query_inject_account_params = (
self.date_at,
@ -252,6 +257,7 @@ FROM
query_inject_account_params += (
self.id,
self.env.uid,
self.env.lang,
)
self.env.cr.execute(query_inject_account, query_inject_account_params)

Loading…
Cancel
Save