Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
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
Odoo
Coopdevs OCB mirror
Commits
cf7ed33e
Commit
cf7ed33e
authored
9 years ago
by
Yannick Tivisse
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] Project : remove issue escalation feature
Conflicts: addons/project_issue/project_issue_view.xml
parent
e485b6c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/project_issue/project_issue.py
+0
-39
0 additions, 39 deletions
addons/project_issue/project_issue.py
addons/project_issue/project_issue_view.xml
+0
-5
0 additions, 5 deletions
addons/project_issue/project_issue_view.xml
with
0 additions
and
44 deletions
addons/project_issue/project_issue.py
+
0
−
39
View file @
cf7ed33e
...
...
@@ -123,14 +123,6 @@ class project_issue(osv.Model):
return
res
def
_can_escalate
(
self
,
cr
,
uid
,
ids
,
field_name
,
arg
,
context
=
None
):
res
=
{}
for
issue
in
self
.
browse
(
cr
,
uid
,
ids
,
context
=
context
):
esc_proj
=
issue
.
project_id
.
project_escalation_id
if
esc_proj
and
esc_proj
.
analytic_account_id
.
type
==
'
contract
'
:
res
[
issue
.
id
]
=
True
return
res
def
on_change_project
(
self
,
cr
,
uid
,
ids
,
project_id
,
context
=
None
):
if
project_id
:
project
=
self
.
pool
.
get
(
'
project.project
'
).
browse
(
cr
,
uid
,
project_id
,
context
=
context
)
...
...
@@ -196,7 +188,6 @@ class project_issue(osv.Model):
'
user_email
'
:
fields
.
related
(
'
user_id
'
,
'
email
'
,
type
=
'
char
'
,
string
=
'
User Email
'
,
readonly
=
True
),
'
date_action_last
'
:
fields
.
datetime
(
'
Last Action
'
,
readonly
=
1
),
'
date_action_next
'
:
fields
.
datetime
(
'
Next Action
'
,
readonly
=
1
),
'
can_escalate
'
:
fields
.
function
(
_can_escalate
,
type
=
'
boolean
'
,
string
=
'
Can Escalate
'
),
}
_defaults
=
{
...
...
@@ -311,22 +302,6 @@ class project_issue(osv.Model):
return
stage_ids
[
0
]
return
False
def
case_escalate
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
# FIXME rename this method to issue_escalate
for
issue
in
self
.
browse
(
cr
,
uid
,
ids
,
context
=
context
):
data
=
{}
esc_proj
=
issue
.
project_id
.
project_escalation_id
if
not
esc_proj
:
raise
UserError
(
_
(
'
You cannot escalate this issue.
\n
The relevant Project has not configured the Escalation Project!
'
))
data
[
'
project_id
'
]
=
esc_proj
.
id
if
esc_proj
.
user_id
:
data
[
'
user_id
'
]
=
esc_proj
.
user_id
.
id
issue
.
write
(
data
)
if
issue
.
task_id
:
issue
.
task_id
.
write
({
'
project_id
'
:
esc_proj
.
id
,
'
user_id
'
:
False
})
return
True
# -------------------------------------------------------
# Mail gateway
# -------------------------------------------------------
...
...
@@ -411,25 +386,11 @@ class project(osv.Model):
}
_columns
=
{
'
project_escalation_id
'
:
fields
.
many2one
(
'
project.project
'
,
'
Project Escalation
'
,
help
=
'
If any issue is escalated from the current Project, it will be listed under the project selected here.
'
,
states
=
{
'
close
'
:
[(
'
readonly
'
,
True
)],
'
cancelled
'
:
[(
'
readonly
'
,
True
)]}),
'
issue_count
'
:
fields
.
function
(
_issue_count
,
type
=
'
integer
'
,
string
=
"
Issues
"
,),
'
issue_ids
'
:
fields
.
one2many
(
'
project.issue
'
,
'
project_id
'
,
string
=
"
Issues
"
,
domain
=
[(
'
stage_id.fold
'
,
'
=
'
,
False
)]),
}
def
_check_escalation
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
project_obj
=
self
.
browse
(
cr
,
uid
,
ids
[
0
],
context
=
context
)
if
project_obj
.
project_escalation_id
:
if
project_obj
.
project_escalation_id
.
id
==
project_obj
.
id
:
return
False
return
True
_constraints
=
[
(
_check_escalation
,
'
Error! You cannot assign escalation to the same project!
'
,
[
'
project_escalation_id
'
])
]
class
account_analytic_account
(
osv
.
Model
):
_inherit
=
'
account.analytic.account
'
...
...
This diff is collapsed.
Click to expand it.
addons/project_issue/project_issue_view.xml
+
0
−
5
View file @
cf7ed33e
...
...
@@ -35,8 +35,6 @@
<label
for=
"project_id"
/>
<div
name=
"project"
>
<field
name=
"project_id"
on_change=
"on_change_project(project_id)"
class=
"oe_inline"
context=
"{'default_use_issues':1}"
/>
<field
name=
"can_escalate"
invisible=
"1"
/>
<button
name=
"case_escalate"
string=
"Escalate"
type=
"object"
class=
"btn-default"
attrs=
"{'invisible':[('can_escalate','=',False)]}"
groups=
"base.group_user"
/>
</div>
</group>
<group>
...
...
@@ -293,9 +291,6 @@
<xpath
expr=
'//field[@name="use_tasks"]'
position=
"attributes"
>
<attribute
name=
"attrs"
>
{'on_change': 'on_change_use_tasks_or_issues(use_tasks, use_issues)'}
</attribute>
</xpath>
<field
name=
"sequence"
position=
"before"
>
<field
name=
"project_escalation_id"
/>
</field>
</field>
</record>
...
...
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