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
cac6a261
Commit
cac6a261
authored
10 years ago
by
Denis Ledoux
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] project_mrp: task description duplicated + product name translation
parent
af37b302
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/project_mrp/project_procurement.py
+10
-2
10 additions, 2 deletions
addons/project_mrp/project_procurement.py
with
10 additions
and
2 deletions
addons/project_mrp/project_procurement.py
+
10
−
2
View file @
cac6a261
...
...
@@ -67,19 +67,27 @@ class procurement_order(osv.osv):
return
project
def
action_produce_assign_service
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
if
not
context
:
context
=
{}
project_task
=
self
.
pool
.
get
(
'
project.task
'
)
for
procurement
in
self
.
browse
(
cr
,
uid
,
ids
,
context
=
context
):
project
=
self
.
_get_project
(
cr
,
uid
,
procurement
,
context
=
context
)
planned_hours
=
self
.
_convert_qty_company_hours
(
cr
,
uid
,
procurement
,
context
=
context
)
manager
=
procurement
.
product_id
.
product_manager
partner
=
procurement
.
sale_line_id
and
procurement
.
sale_line_id
.
order_id
.
partner_id
or
None
lang
=
(
manager
and
manager
.
lang
)
or
(
partner
and
partner
.
lang
)
or
False
if
not
lang
:
lang
=
self
.
pool
[
'
res.users
'
].
browse
(
cr
,
uid
,
uid
,
context
=
context
).
lang
product
=
self
.
pool
[
'
product.product
'
].
browse
(
cr
,
uid
,
procurement
.
product_id
.
id
,
context
=
dict
(
context
,
lang
=
lang
))
task_id
=
project_task
.
create
(
cr
,
uid
,
{
'
name
'
:
'
%s:%s
'
%
(
procurement
.
origin
or
''
,
procurement
.
product
_id
.
name
),
'
name
'
:
'
%s:%s
'
%
(
procurement
.
origin
or
''
,
product
.
name
),
'
date_deadline
'
:
procurement
.
date_planned
,
'
planned_hours
'
:
planned_hours
,
'
remaining_hours
'
:
planned_hours
,
'
partner_id
'
:
procurement
.
sale_line_id
and
procurement
.
sale_line_id
.
order_id
.
partner_id
.
id
or
False
,
'
user_id
'
:
procurement
.
product_id
.
product_manager
.
id
,
'
procurement_id
'
:
procurement
.
id
,
'
description
'
:
procurement
.
name
+
'
\n
'
+
(
procurement
.
note
or
''
)
,
'
description
'
:
procurement
.
sale_line_id
and
procurement
.
sale_line_id
.
name
or
procurement
.
name
,
'
project_id
'
:
project
and
project
.
id
or
False
,
'
company_id
'
:
procurement
.
company_id
.
id
,
},
context
=
context
)
...
...
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