@@ -483,7 +483,8 @@ class GeneralLedgerReport(models.AbstractModel):
|
|||||||
for tax_id in move_line["tax_ids"]:
|
for tax_id in move_line["tax_ids"]:
|
||||||
taxes_ids.add(tax_id)
|
taxes_ids.add(tax_id)
|
||||||
for analytic_account in move_line["analytic_distribution"] or {}:
|
for analytic_account in move_line["analytic_distribution"] or {}:
|
||||||
analytic_ids.add(int(analytic_account))
|
for analytic_account_id in analytic_account.split(","):
|
||||||
|
analytic_ids.add(int(analytic_account_id))
|
||||||
if move_line["full_reconcile_id"]:
|
if move_line["full_reconcile_id"]:
|
||||||
rec_id = move_line["full_reconcile_id"][0]
|
rec_id = move_line["full_reconcile_id"][0]
|
||||||
if rec_id not in full_reconcile_ids:
|
if rec_id not in full_reconcile_ids:
|
||||||
|
|||||||
@@ -195,16 +195,17 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||||||
taxes_description += taxes_data[tax_id]["tax_name"] + " "
|
taxes_description += taxes_data[tax_id]["tax_name"] + " "
|
||||||
if line["tax_line_id"]:
|
if line["tax_line_id"]:
|
||||||
taxes_description += line["tax_line_id"][1]
|
taxes_description += line["tax_line_id"][1]
|
||||||
for account_id, value in line["analytic_distribution"].items():
|
for account_ids, value in line["analytic_distribution"].items():
|
||||||
if value < 100:
|
for account_id in account_ids.split(","):
|
||||||
analytic_distribution += "%s %d%% " % (
|
if value < 100:
|
||||||
analytic_data[int(account_id)]["name"],
|
analytic_distribution += "%s %d%% " % (
|
||||||
value,
|
analytic_data[int(account_id)]["name"],
|
||||||
)
|
value,
|
||||||
else:
|
)
|
||||||
analytic_distribution += (
|
else:
|
||||||
f"{analytic_data[int(account_id)]['name']} "
|
analytic_distribution += (
|
||||||
)
|
f"{analytic_data[int(account_id)]['name']} "
|
||||||
|
)
|
||||||
line.update(
|
line.update(
|
||||||
{
|
{
|
||||||
"taxes_description": taxes_description,
|
"taxes_description": taxes_description,
|
||||||
@@ -303,18 +304,19 @@ class GeneralLedgerXslx(models.AbstractModel):
|
|||||||
taxes_description += (
|
taxes_description += (
|
||||||
taxes_data[tax_id]["tax_name"] + " "
|
taxes_data[tax_id]["tax_name"] + " "
|
||||||
)
|
)
|
||||||
for account_id, value in line[
|
for account_ids, value in line[
|
||||||
"analytic_distribution"
|
"analytic_distribution"
|
||||||
].items():
|
].items():
|
||||||
if value < 100:
|
for account_id in account_ids.split(","):
|
||||||
analytic_distribution += "%s %d%% " % (
|
if value < 100:
|
||||||
analytic_data[int(account_id)]["name"],
|
analytic_distribution += "%s %d%% " % (
|
||||||
value,
|
analytic_data[int(account_id)]["name"],
|
||||||
)
|
value,
|
||||||
else:
|
)
|
||||||
analytic_distribution += (
|
else:
|
||||||
f"{analytic_data[int(account_id)]['name']} "
|
analytic_distribution += (
|
||||||
)
|
f"{analytic_data[int(account_id)]['name']} "
|
||||||
|
)
|
||||||
line.update(
|
line.update(
|
||||||
{
|
{
|
||||||
"taxes_description": taxes_description,
|
"taxes_description": taxes_description,
|
||||||
|
|||||||
@@ -480,22 +480,27 @@
|
|||||||
t-as="analytic_id"
|
t-as="analytic_id"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<span
|
<t
|
||||||
t-att-res-id="analytic_id"
|
t-foreach="analytic_id.split(',')"
|
||||||
res-model="account.analytic.account"
|
t-as="analytic_account_id"
|
||||||
view-type="form"
|
|
||||||
>
|
>
|
||||||
<t
|
<span
|
||||||
t-out="o._get_atr_from_dict(int(analytic_id), analytic_data, 'name')"
|
t-att-res-id="analytic_account_id"
|
||||||
/>
|
res-model="account.analytic.account"
|
||||||
<t
|
view-type="form"
|
||||||
t-if="int(line['analytic_distribution'][analytic_id]) < 100"
|
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-out="int(line['analytic_distribution'][analytic_id])"
|
t-out="o._get_atr_from_dict(int(analytic_account_id), analytic_data, 'name')"
|
||||||
/>%
|
/>
|
||||||
</t>
|
<t
|
||||||
</span>
|
t-if="int(line['analytic_distribution'][analytic_id]) < 100"
|
||||||
|
>
|
||||||
|
<t
|
||||||
|
t-out="int(line['analytic_distribution'][analytic_id])"
|
||||||
|
/>%
|
||||||
|
</t>
|
||||||
|
</span>
|
||||||
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user