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
Merge requests
!502
Refactor module energy communities service invoicing
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Refactor module energy communities service invoicing
feacture/selfconsumption_service_invoice
into
dev
Overview
0
Commits
85
Pipelines
12
Changes
16
Merged
Álvaro García
requested to merge
feacture/selfconsumption_service_invoice
into
dev
2 weeks ago
Overview
0
Commits
85
Pipelines
12
Changes
16
Expand
Refactor energy_communities_service_invoicing
0
0
Merge request reports
Viewing commit
60f7943a
Prev
Next
Show latest version
16 files
+
146
−
77
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
16
Search (e.g. *.vue) (Ctrl+P)
60f7943a
[IMP]
Define config journal and pack_type mixin
· 60f7943a
daniquilez
authored
2 weeks ago
energy_communities_service_invoicing/components/contract_utils.py
+
6
−
4
Options
@@ -55,10 +55,12 @@ class ContractUtils(Component):
for
line
in
self
.
work
.
record
.
contract_line_ids
:
line
.
write
({
"
discount
"
:
discount
})
def
set_configuration_service_invoicing_journal_if_defined
(
self
):
journal_id
=
self
.
work
.
record
.
company_id
.
service_invoicing_journal_id
if
journal_id
:
self
.
work
.
record
.
write
({
"
journal_id
"
:
journal_id
.
id
})
# method to be extended if using component for another pack_type
def
set_configuration_journal_if_defined
(
self
):
if
self
.
work
.
record
.
pack_type
==
"
platform_pack
"
:
journal_id
=
self
.
work
.
record
.
company_id
.
service_invoicing_sale_journal_id
if
journal_id
:
self
.
work
.
record
.
write
({
"
journal_id
"
:
journal_id
.
id
})
def
clean_non_service_lines
(
self
):
for
line
in
self
.
work
.
record
.
contract_line_ids
:
Loading