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
fad98f7c
Commit
fad98f7c
authored
3 months ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[UPD] contract sale report compute tags for performance
parent
6ae562e8
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
report/hall_contract_sale_report.py
+8
-5
8 additions, 5 deletions
report/hall_contract_sale_report.py
with
8 additions
and
5 deletions
report/hall_contract_sale_report.py
+
8
−
5
View file @
fad98f7c
# Copyright 2023 Le Filament (https://le-filament.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from
odoo
import
api
,
fields
,
models
,
tools
from
odoo
import
fields
,
models
,
tools
class
HallContractSaleReport
(
models
.
Model
):
...
...
@@ -88,18 +88,21 @@ class HallContractSaleReport(models.Model):
"
partner_id
"
,
"
manager_id
"
,
"
commercial_name
"
,
"
tag_ids
"
,
],
}
@api.depends
(
"
contract_id
"
)
# ------------------------------------------------------
# Compute functions
# ------------------------------------------------------
def
_compute_tags
(
self
):
for
s
in
self
:
s
.
tag_ids
=
s
.
contract_id
.
tag_ids
self
.
tag_ids
=
self
.
env
[
"
hall.contract.tag
"
].
search
([])
def
_search_tags
(
self
,
operator
,
value
):
return
[(
"
contract_id.tag_ids
"
,
operator
,
value
)]
# ------------------------------------------------------
# Query functions
# ------------------------------------------------------
def
_select
(
self
):
return
"""
SELECT
...
...
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