Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odoo CE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Comunitats Energètiques
Odoo CE
Commits
cb47d014
Commit
cb47d014
authored
1 year ago
by
Emanuel Buzey
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] energy_selfconsumption: add custom template
parent
2319775c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!277
[REL] Release Sprint 27/11/23
,
!265
C2/ Implementation delivered_energy_invoice_format
,
!258
feature/delivered_energy_invoice_format
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
energy_selfconsumption/reports/energy_delivered_invoice_template.xml
+57
-10
57 additions, 10 deletions
...consumption/reports/energy_delivered_invoice_template.xml
with
57 additions
and
10 deletions
energy_selfconsumption/reports/energy_delivered_invoice_template.xml
+
57
−
10
View file @
cb47d014
...
...
@@ -2,17 +2,64 @@
<odoo>
<data>
<template
inherit_id=
"account.report_invoice_document"
id=
"energy_delivered_invoice_template"
primary=
"True"
>
<xpath
expr=
"//table[@class='table table-sm o_main_table']"
position=
"replace"
>
<h3>
TEST: Custom Template
</h3>
<tr
t-foreach=
'o.invoice_line_ids'
t-as=
'line'
>
<td>
<span
t-field=
"line.selfconsumption_id.invoicing_mode"
/>
<!-- <span t-field="line.selfconsumption_id.distribution_table_ids.supply_point_assignation_ids.code[0]"/> -->
<span
t-field=
"line.selfconsumption_id.owner_id"
/>
<span
t-field=
"line.selfconsumption_id.code"
/>
</td>
</tr>
<xpath
expr=
"//th[@name='th_quantity']"
position=
"replace"
>
<th
name=
"th_total_installation_generation"
><span>
Total installation generation
</span></th>
</xpath>
<xpath
expr=
"//th[@name='th_total_installation_generation']"
position=
"after"
>
<th
name=
"th_partition_coefficient"
><span>
Partition coefficient
</span></th>
</xpath>
<xpath
expr=
"//th[@name='th_priceunit']"
position=
"after"
>
<th
name=
"th_import"
><span>
Import
</span></th>
</xpath>
<xpath
expr=
"//th[@name='th_taxes']"
position=
"replace"
></xpath>
<xpath
expr=
"//th[@name='th_subtotal']"
position=
"replace"
></xpath>
<xpath
expr=
"//th[@name='th_partition_coefficient']"
position=
"after"
>
<th
name=
"th_total_amount_invoiced"
><span>
Total amount invoiced
</span></th>
</xpath>
<xpath
expr=
"//td[@name='account_invoice_line_name']"
position=
"replace"
>
<td
name=
"account_invoice_line_name"
>
<span>
CAU:
<span
t-field=
"line.selfconsumption_id.code"
/></span>
<br/>
<span
t-field=
"line.name"
t-options=
"{'widget': 'text'}"
/>
</td>
</xpath>
<xpath
expr=
"//td[@name='account_invoice_line_name']"
position=
"after"
>
<td
name=
"td_total_installation_generation"
>
<span
t-field=
"line.selfconsumption_id.power"
/><span>
kWh
</span>
</td>
</xpath>
<xpath
expr=
"//td[@name='td_total_installation_generation']"
position=
"after"
>
<td
name=
"td_partition_coefficient"
>
<t
t-foreach=
"line.selfconsumption_id.distribution_table_ids.supply_point_assignation_ids"
t-as=
"assignation"
>
<t
t-if=
"assignation.owner_id.name == line.partner_id.name"
>
<span
t-field=
"assignation.coefficient"
/>
</t>
</t>
</td>
</xpath>
<xpath
expr=
"//td[@name='td_partition_coefficient']"
position=
"after"
>
<td
name=
"td_total_amount_invoiced"
>
kWh
</td>
</xpath>
<xpath
expr=
"//td[@name='td_total_amount_invoiced']"
position=
"after"
>
<td
name=
"td_total_amount_invoiced"
>
<span
t-field=
"line.selfconsumption_id.product_id.lst_price"
/><span>
€/kWh
</span>
</td>
</xpath>
<xpath
expr=
"//span[@t-field='line.price_unit']"
position=
"replace"
></xpath>
<xpath
expr=
"//span[@id='line_tax_ids']"
position=
"replace"
></xpath>
<xpath
expr=
"//td[@class='text-right o_price_total']"
position=
"replace"
></xpath>
</template>
<template
id=
"report_invoice_with_payments"
inherit_id=
"account.report_invoice_with_payments"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment