commit
09249e9ee2
|
@ -84,7 +84,9 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
{
|
||||
"header": _("Cumul cur."),
|
||||
"field": "total_bal_curr",
|
||||
"type": "amount_different_company_currency",
|
||||
"field_initial_balance": "initial_bal_curr",
|
||||
"field_final_balance": "final_bal_curr",
|
||||
"type": "amount_currency",
|
||||
"width": 10,
|
||||
},
|
||||
]
|
||||
|
@ -151,6 +153,7 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
# For each account
|
||||
for account in general_ledger:
|
||||
# Write account title
|
||||
total_bal_curr = account["init_bal"]["bal_curr"]
|
||||
self.write_array_title(
|
||||
account["code"] + " - " + accounts_data[account["id"]]["name"],
|
||||
report_data,
|
||||
|
@ -175,7 +178,6 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
self.write_initial_balance_from_dict(account, report_data)
|
||||
|
||||
# Display account move lines
|
||||
total_bal_curr = 0
|
||||
for line in account["move_lines"]:
|
||||
line.update(
|
||||
{
|
||||
|
@ -232,6 +234,7 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
|
||||
else:
|
||||
# For each partner
|
||||
total_bal_curr = account["init_bal"]["bal_curr"]
|
||||
for group_item in account["list_grouped"]:
|
||||
# Write partner title
|
||||
self.write_array_title(group_item["name"], report_data)
|
||||
|
@ -261,7 +264,6 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||
self.write_initial_balance_from_dict(group_item, report_data)
|
||||
|
||||
# Display account move lines
|
||||
total_bal_curr = 0
|
||||
for line in group_item["move_lines"]:
|
||||
line.update(
|
||||
{
|
||||
|
|
|
@ -227,16 +227,24 @@
|
|||
</t>
|
||||
<!--## matching_number-->
|
||||
<div class="act_as_cell" />
|
||||
<t
|
||||
t-set="misc_domain"
|
||||
t-value="[('account_id', '=', account['id']),('date', '<', date_from)]"
|
||||
/>
|
||||
<t
|
||||
t-set="misc_grouped_domain"
|
||||
t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
|
||||
t-if="'partners' in account"
|
||||
/>
|
||||
<t t-set="misc_grouped_domain" t-value="[]" t-else="" />
|
||||
<!--## debit-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-set="debit_domain" t-value="[('debit', '<>', 0)]" />
|
||||
<t t-if="type == 'account_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('date', '<', date_from),
|
||||
('debit', '<>', 0)]"
|
||||
/>
|
||||
<span t-att-domain="domain" res-model="account.move.line">
|
||||
<span
|
||||
t-att-domain="misc_domain+debit_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['debit']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||
|
@ -244,14 +252,10 @@
|
|||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('partner_id', '=', group_item['id']),
|
||||
('date', '<', date_from),
|
||||
('debit', '<>', 0)]"
|
||||
/>
|
||||
<span t-att-domain="domain" res-model="account.move.line">
|
||||
<span
|
||||
t-att-domain="misc_domain+debit_domain+misc_grouped_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['debit']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||
|
@ -261,14 +265,12 @@
|
|||
</div>
|
||||
<!--## credit-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-set="credit_domain" t-value="[('credit', '<>', 0)]" />
|
||||
<t t-if="type == 'account_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('date', '<', date_from),
|
||||
('credit', '<>', 0)]"
|
||||
/>
|
||||
<span t-att-domain="domain" res-model="account.move.line">
|
||||
<span
|
||||
t-att-domain="misc_domain+credit_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['credit']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||
|
@ -276,14 +278,10 @@
|
|||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('partner_id', '=', group_item['id']),
|
||||
('date', '<', date_from),
|
||||
('credit', '<>', 0)]"
|
||||
/>
|
||||
<span t-att-domain="domain" res-model="account.move.line">
|
||||
<span
|
||||
t-att-domain="misc_domain+credit_domain+misc_grouped_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['credit']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||
|
@ -294,12 +292,7 @@
|
|||
<!--## balance cumulated-->
|
||||
<div class="act_as_cell amount">
|
||||
<t t-if="type == 'account_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('date', '<', date_from)]"
|
||||
/>
|
||||
<span t-att-domain="domain" res-model="account.move.line">
|
||||
<span t-att-domain="misc_domain" res-model="account.move.line">
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['balance']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||
|
@ -307,13 +300,10 @@
|
|||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('partner_id', '=', group_item['id']),
|
||||
('date', '<', date_from)]"
|
||||
/>
|
||||
<span t-att-domain="domain" res-model="account.move.line">
|
||||
<span
|
||||
t-att-domain="misc_domain+misc_grouped_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['balance']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||
|
@ -325,13 +315,8 @@
|
|||
<t t-if="account['currency_id']">
|
||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||
<t t-if="type == 'account_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('date', '<', o.date_from)]"
|
||||
/>
|
||||
<span
|
||||
t-att-domain="domain"
|
||||
t-att-domain="misc_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
|
@ -341,14 +326,32 @@
|
|||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('partner_id', '=', group_item['id']),
|
||||
('date', '<', o.date_from)]"
|
||||
/>
|
||||
<span
|
||||
t-att-domain="domain"
|
||||
t-att-domain="misc_domain+misc_grouped_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||
<t t-if="type == 'account_type'">
|
||||
<span
|
||||
t-att-domain="misc_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['init_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<span
|
||||
t-att-domain="misc_domain+misc_grouped_domain"
|
||||
res-model="account.move.line"
|
||||
>
|
||||
<t
|
||||
|
@ -358,7 +361,6 @@
|
|||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_cell amount" style="width: 3.63%;" />
|
||||
</t>
|
||||
<t t-if="not account['currency_id']">
|
||||
<div class="act_as_cell" style="width: 3.63%;" />
|
||||
|
@ -367,7 +369,10 @@
|
|||
</t>
|
||||
</div>
|
||||
<!-- Display each lines -->
|
||||
<t t-set="total_bal_curr" t-value="0" />
|
||||
<t
|
||||
t-set="total_bal_curr"
|
||||
t-value="account_or_group_item_object['init_bal']['bal_curr'] or 0"
|
||||
/>
|
||||
<t t-foreach="account_or_group_item_object['move_lines']" t-as="line">
|
||||
<!-- # lines or centralized lines -->
|
||||
<div class="act_as_row lines">
|
||||
|
@ -679,18 +684,23 @@
|
|||
/>
|
||||
</div>
|
||||
<!--## currency_name + amount_currency-->
|
||||
<t
|
||||
t-set="misc_domain"
|
||||
t-value="[('account_id', '=', account['id']),('date', '<', date_from)]"
|
||||
/>
|
||||
<t
|
||||
t-set="misc_grouped_domain"
|
||||
t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
|
||||
t-if="'partners' in account"
|
||||
/>
|
||||
<t t-set="misc_grouped_domain" t-value="[]" t-else="" />
|
||||
<t t-if="foreign_currency">
|
||||
<t t-if="account['currency_id']">
|
||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||
<t t-if="type == 'account_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('date', '<', date_from)]"
|
||||
/>
|
||||
<span>
|
||||
<a
|
||||
t-att-data-t-att-domain="domain"
|
||||
t-att-data-t-att-domain="misc_domain"
|
||||
t-att-data-res-model="'account.move.line'"
|
||||
class="o_account_financial_reports_web_action_monetary_multi"
|
||||
style="color: black;"
|
||||
|
@ -703,15 +713,41 @@
|
|||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<t
|
||||
t-set="domain"
|
||||
t-value="[('account_id', '=', account['id']),
|
||||
('partner_id', '=', group_item['id']),
|
||||
('date', '<', date_from)]"
|
||||
/>
|
||||
<span>
|
||||
<a
|
||||
t-att-data-t-att-domain="domain"
|
||||
t-att-data-t-att-domain="misc_domain+misc_grouped_domain"
|
||||
t-att-data-res-model="'account.move.line'"
|
||||
class="o_account_financial_reports_web_action_monetary_multi"
|
||||
style="color: black;"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['fin_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||
<t t-if="type == 'account_type'">
|
||||
<span>
|
||||
<a
|
||||
t-att-data-t-att-domain="misc_domain"
|
||||
t-att-data-res-model="'account.move.line'"
|
||||
class="o_account_financial_reports_web_action_monetary_multi"
|
||||
style="color: black;"
|
||||
>
|
||||
<t
|
||||
t-raw="account_or_group_item_object['fin_bal']['bal_curr']"
|
||||
t-options="{'widget': 'monetary', 'display_currency': account['currency_id']}"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="type == 'grouped_type'">
|
||||
<span>
|
||||
<a
|
||||
t-att-data-t-att-domain="misc_domain+misc_grouped_domain"
|
||||
t-att-data-res-model="'account.move.line'"
|
||||
class="o_account_financial_reports_web_action_monetary_multi"
|
||||
style="color: black;"
|
||||
|
@ -724,7 +760,6 @@
|
|||
</span>
|
||||
</t>
|
||||
</div>
|
||||
<div class="act_as_cell amount" style="width: 3.63%;" />
|
||||
</t>
|
||||
<t t-if="not account['currency_id']">
|
||||
<div class="act_as_cell amount" style="width: 3.63%;" />
|
||||
|
|
Loading…
Reference in New Issue