Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
festa_dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
Festa
festa_dashboard
Commits
a1e77f1c
Commit
a1e77f1c
authored
1 year ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[update] dashboard data single contract
parent
5a82d9d6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/hall_contract.py
+7
-0
7 additions, 0 deletions
models/hall_contract.py
with
7 additions
and
0 deletions
models/hall_contract.py
+
7
−
0
View file @
a1e77f1c
...
...
@@ -153,10 +153,17 @@ class HallContract(models.Model):
def
_get_revenue_detail
(
self
):
if
len
(
self
)
!=
1
:
return
False
today
=
fields
.
Date
.
today
()
start
=
today
.
replace
(
day
=
1
)
-
relativedelta
(
months
=
12
)
end
=
today
.
replace
(
day
=
1
)
target_report_ids
=
self
.
env
[
"
hall.contract.target.report
"
].
search
(
[
(
"
contract_id
"
,
"
=
"
,
self
.
id
),
(
"
day_date
"
,
"
>=
"
,
start
),
(
"
day_date
"
,
"
<=
"
,
end
),
],
order
=
"
day_date
"
,
limit
=
12
,
)
return
target_report_ids
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