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
d985fa79
Commit
d985fa79
authored
8 years ago
by
Josse Colpaert
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] mrp: Put back field 'priority' to avoid migration problems
parent
cc719412
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/mrp/models/mrp_production.py
+2
-0
2 additions, 0 deletions
addons/mrp/models/mrp_production.py
addons/mrp/models/procurement.py
+0
-1
0 additions, 1 deletion
addons/mrp/models/procurement.py
with
2 additions
and
1 deletion
addons/mrp/models/mrp_production.py
+
2
−
0
View file @
d985fa79
...
...
@@ -149,6 +149,8 @@ class MrpProduction(models.Model):
has_moves
=
fields
.
Boolean
(
compute
=
'
_has_moves
'
)
scrap_ids
=
fields
.
One2many
(
'
stock.scrap
'
,
'
production_id
'
,
'
Scraps
'
)
scrap_count
=
fields
.
Integer
(
compute
=
'
_compute_scrap_move_count
'
,
string
=
'
Scrap Move
'
)
priority
=
fields
.
Selection
([(
'
0
'
,
'
Not urgent
'
),
(
'
1
'
,
'
Normal
'
),
(
'
2
'
,
'
Urgent
'
),
(
'
3
'
,
'
Very Urgent
'
)],
'
Priority
'
,
readonly
=
True
,
states
=
{
'
confirmed
'
:
[(
'
readonly
'
,
False
)]},
default
=
'
1
'
)
@api.multi
@api.depends
(
'
workorder_ids
'
)
...
...
This diff is collapsed.
Click to expand it.
addons/mrp/models/procurement.py
+
0
−
1
View file @
d985fa79
...
...
@@ -84,7 +84,6 @@ class ProcurementOrder(models.Model):
# create the MO as SUPERUSER because the current user may not have the rights to do it (mto product launched by a sale for example)
production
=
ProductionSudo
.
create
(
procurement
.
_prepare_mo_vals
(
bom
))
res
[
procurement
.
id
]
=
production
.
id
procurement
.
message_post
(
body
=
_
(
"
Manufacturing Order <em>%s</em> created.
"
)
%
(
production
.
name
))
else
:
res
[
procurement
.
id
]
=
False
...
...
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