[IMP] account_financial_report: Improve domain to reduce code in general ledger.
TT39754pull/939/head
parent
3577ef4900
commit
55ffebd6ec
|
@ -227,16 +227,22 @@
|
||||||
</t>
|
</t>
|
||||||
<!--## matching_number-->
|
<!--## matching_number-->
|
||||||
<div class="act_as_cell" />
|
<div class="act_as_cell" />
|
||||||
|
<t
|
||||||
|
t-set="misc_domain"
|
||||||
|
t-value="[('account_id', '=', account['id']),('date', '<', date_from)]"
|
||||||
|
/>
|
||||||
|
<t
|
||||||
|
t-set="partner_domain"
|
||||||
|
t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
|
||||||
|
/>
|
||||||
<!--## debit-->
|
<!--## debit-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount">
|
||||||
|
<t t-set="debit_domain" t-value="[('debit', '<>', 0)]" />
|
||||||
<t t-if="type == 'account_type'">
|
<t t-if="type == 'account_type'">
|
||||||
<t
|
<span
|
||||||
t-set="domain"
|
t-att-domain="misc_domain+debit_domain"
|
||||||
t-value="[('account_id', '=', account['id']),
|
res-model="account.move.line"
|
||||||
('date', '<', date_from),
|
>
|
||||||
('debit', '<>', 0)]"
|
|
||||||
/>
|
|
||||||
<span t-att-domain="domain" res-model="account.move.line">
|
|
||||||
<t
|
<t
|
||||||
t-raw="account_or_group_item_object['init_bal']['debit']"
|
t-raw="account_or_group_item_object['init_bal']['debit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||||
|
@ -244,14 +250,10 @@
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="type == 'grouped_type'">
|
<t t-if="type == 'grouped_type'">
|
||||||
<t
|
<span
|
||||||
t-set="domain"
|
t-att-domain="misc_domain+debit_domain+partner_domain"
|
||||||
t-value="[('account_id', '=', account['id']),
|
res-model="account.move.line"
|
||||||
('partner_id', '=', group_item['id']),
|
>
|
||||||
('date', '<', date_from),
|
|
||||||
('debit', '<>', 0)]"
|
|
||||||
/>
|
|
||||||
<span t-att-domain="domain" res-model="account.move.line">
|
|
||||||
<t
|
<t
|
||||||
t-raw="account_or_group_item_object['init_bal']['debit']"
|
t-raw="account_or_group_item_object['init_bal']['debit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||||
|
@ -261,14 +263,12 @@
|
||||||
</div>
|
</div>
|
||||||
<!--## credit-->
|
<!--## credit-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount">
|
||||||
|
<t t-set="credit_domain" t-value="[('credit', '<>', 0)]" />
|
||||||
<t t-if="type == 'account_type'">
|
<t t-if="type == 'account_type'">
|
||||||
<t
|
<span
|
||||||
t-set="domain"
|
t-att-domain="misc_domain+credit_domain"
|
||||||
t-value="[('account_id', '=', account['id']),
|
res-model="account.move.line"
|
||||||
('date', '<', date_from),
|
>
|
||||||
('credit', '<>', 0)]"
|
|
||||||
/>
|
|
||||||
<span t-att-domain="domain" res-model="account.move.line">
|
|
||||||
<t
|
<t
|
||||||
t-raw="account_or_group_item_object['init_bal']['credit']"
|
t-raw="account_or_group_item_object['init_bal']['credit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||||
|
@ -276,14 +276,10 @@
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="type == 'grouped_type'">
|
<t t-if="type == 'grouped_type'">
|
||||||
<t
|
<span
|
||||||
t-set="domain"
|
t-att-domain="misc_domain+credit_domain+partner_domain"
|
||||||
t-value="[('account_id', '=', account['id']),
|
res-model="account.move.line"
|
||||||
('partner_id', '=', group_item['id']),
|
>
|
||||||
('date', '<', date_from),
|
|
||||||
('credit', '<>', 0)]"
|
|
||||||
/>
|
|
||||||
<span t-att-domain="domain" res-model="account.move.line">
|
|
||||||
<t
|
<t
|
||||||
t-raw="account_or_group_item_object['init_bal']['credit']"
|
t-raw="account_or_group_item_object['init_bal']['credit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||||
|
@ -294,12 +290,7 @@
|
||||||
<!--## balance cumulated-->
|
<!--## balance cumulated-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount">
|
||||||
<t t-if="type == 'account_type'">
|
<t t-if="type == 'account_type'">
|
||||||
<t
|
<span t-att-domain="misc_domain" res-model="account.move.line">
|
||||||
t-set="domain"
|
|
||||||
t-value="[('account_id', '=', account['id']),
|
|
||||||
('date', '<', date_from)]"
|
|
||||||
/>
|
|
||||||
<span t-att-domain="domain" res-model="account.move.line">
|
|
||||||
<t
|
<t
|
||||||
t-raw="account_or_group_item_object['init_bal']['balance']"
|
t-raw="account_or_group_item_object['init_bal']['balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||||
|
@ -307,13 +298,10 @@
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="type == 'grouped_type'">
|
<t t-if="type == 'grouped_type'">
|
||||||
<t
|
<span
|
||||||
t-set="domain"
|
t-att-domain="misc_domain+partner_domain"
|
||||||
t-value="[('account_id', '=', account['id']),
|
res-model="account.move.line"
|
||||||
('partner_id', '=', group_item['id']),
|
>
|
||||||
('date', '<', date_from)]"
|
|
||||||
/>
|
|
||||||
<span t-att-domain="domain" res-model="account.move.line">
|
|
||||||
<t
|
<t
|
||||||
t-raw="account_or_group_item_object['init_bal']['balance']"
|
t-raw="account_or_group_item_object['init_bal']['balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
|
||||||
|
@ -325,13 +313,8 @@
|
||||||
<t t-if="account['currency_id']">
|
<t t-if="account['currency_id']">
|
||||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||||
<t t-if="type == 'account_type'">
|
<t t-if="type == 'account_type'">
|
||||||
<t
|
|
||||||
t-set="domain"
|
|
||||||
t-value="[('account_id', '=', account['id']),
|
|
||||||
('date', '<', o.date_from)]"
|
|
||||||
/>
|
|
||||||
<span
|
<span
|
||||||
t-att-domain="domain"
|
t-att-domain="misc_domain"
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
|
@ -341,14 +324,8 @@
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="type == 'grouped_type'">
|
<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
|
<span
|
||||||
t-att-domain="domain"
|
t-att-domain="misc_domain+partner_domain"
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
|
@ -679,18 +656,21 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!--## currency_name + amount_currency-->
|
<!--## currency_name + amount_currency-->
|
||||||
|
<t
|
||||||
|
t-set="misc_domain"
|
||||||
|
t-value="[('account_id', '=', account['id']),('date', '<', date_from)]"
|
||||||
|
/>
|
||||||
|
<t
|
||||||
|
t-set="partner_domain"
|
||||||
|
t-value="[('partner_id', '=', account_or_group_item_object['id'])]"
|
||||||
|
/>
|
||||||
<t t-if="foreign_currency">
|
<t t-if="foreign_currency">
|
||||||
<t t-if="account['currency_id']">
|
<t t-if="account['currency_id']">
|
||||||
<div class="act_as_cell amount" style="width: 3.63%;">
|
<div class="act_as_cell amount" style="width: 3.63%;">
|
||||||
<t t-if="type == 'account_type'">
|
<t t-if="type == 'account_type'">
|
||||||
<t
|
|
||||||
t-set="domain"
|
|
||||||
t-value="[('account_id', '=', account['id']),
|
|
||||||
('date', '<', date_from)]"
|
|
||||||
/>
|
|
||||||
<span>
|
<span>
|
||||||
<a
|
<a
|
||||||
t-att-data-t-att-domain="domain"
|
t-att-data-t-att-domain="misc_domain"
|
||||||
t-att-data-res-model="'account.move.line'"
|
t-att-data-res-model="'account.move.line'"
|
||||||
class="o_account_financial_reports_web_action_monetary_multi"
|
class="o_account_financial_reports_web_action_monetary_multi"
|
||||||
style="color: black;"
|
style="color: black;"
|
||||||
|
@ -703,15 +683,9 @@
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="type == 'grouped_type'">
|
<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>
|
<span>
|
||||||
<a
|
<a
|
||||||
t-att-data-t-att-domain="domain"
|
t-att-data-t-att-domain="misc_domain+partner_domain"
|
||||||
t-att-data-res-model="'account.move.line'"
|
t-att-data-res-model="'account.move.line'"
|
||||||
class="o_account_financial_reports_web_action_monetary_multi"
|
class="o_account_financial_reports_web_action_monetary_multi"
|
||||||
style="color: black;"
|
style="color: black;"
|
||||||
|
|
Loading…
Reference in New Issue