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
79f2b475
Commit
79f2b475
authored
10 years ago
by
Guewen Baconnier
Browse files
Options
Downloads
Patches
Plain Diff
Wrong variable name. The write() method should accept both int/long and tuple/list
parent
1c482529
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/product/product.py
+3
-1
3 additions, 1 deletion
addons/product/product.py
with
3 additions
and
1 deletion
addons/product/product.py
+
3
−
1
View file @
79f2b475
...
...
@@ -202,6 +202,8 @@ class product_uom(osv.osv):
return
{}
def
write
(
self
,
cr
,
uid
,
ids
,
vals
,
context
=
None
):
if
isinstance
(
ids
,
(
int
,
long
)):
ids
=
[
ids
]
if
'
category_id
'
in
vals
:
for
uom
in
self
.
browse
(
cr
,
uid
,
ids
,
context
=
context
):
if
uom
.
category_id
.
id
!=
vals
[
'
category_id
'
]:
...
...
@@ -677,7 +679,7 @@ class product_template(osv.osv):
def
write
(
self
,
cr
,
uid
,
ids
,
vals
,
context
=
None
):
'''
Store the standard price change in order to be able to retrieve the cost of a product template for a given date
'''
if
isinstance
(
id
,
(
int
,
long
)):
if
isinstance
(
id
s
,
(
int
,
long
)):
ids
=
[
ids
]
if
'
uom_po_id
'
in
vals
:
new_uom
=
self
.
pool
.
get
(
'
product.uom
'
).
browse
(
cr
,
uid
,
vals
[
'
uom_po_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