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