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
2a1f0414
Commit
2a1f0414
authored
1 year ago
by
Emanuel Buzey
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] explicit transaltion added
parent
194a5a3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!213
[REL] Release sprint 25/09/23
,
!210
[IMP] domains related to partner_id removed and is_member field added
Pipeline
#52419
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
energy_project/models/inscription.py
+4
-2
4 additions, 2 deletions
energy_project/models/inscription.py
with
4 additions
and
2 deletions
energy_project/models/inscription.py
+
4
−
2
View file @
2a1f0414
...
...
@@ -32,13 +32,15 @@ class Inscription(models.Model):
)
effective_date
=
fields
.
Date
(
required
=
True
)
is_member
=
fields
.
Char
(
string
=
"
Typology
"
,
compute
=
"
_compute_is_member
"
,
readonly
=
True
string
=
_
(
"
Typology
"
)
,
compute
=
"
_compute_is_member
"
,
readonly
=
True
)
@api.depends
(
"
partner_id.member
"
)
def
_compute_is_member
(
self
):
for
record
in
self
:
record
.
is_member
=
"
Socia
"
if
record
.
partner_id
.
member
else
"
No socia
"
record
.
is_member
=
(
_
(
"
Partner
"
)
if
record
.
partner_id
.
member
else
_
(
"
Non-partner
"
)
)
def
has_matching_supply_assignations
(
self
):
matching_tables
=
(
...
...
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