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
07b8c2ca
Commit
07b8c2ca
authored
16 years ago
by
Fabien Pinckaers
Browse files
Options
Downloads
Patches
Plain Diff
bugfix
bzr revid: fp@tinyerp.com-20090204221853-9yuklpqe1v0wsjgn
parent
53bdfd52
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/sale/sale.py
+9
-9
9 additions, 9 deletions
addons/sale/sale.py
with
9 additions
and
9 deletions
addons/sale/sale.py
+
9
−
9
View file @
07b8c2ca
...
...
@@ -911,7 +911,7 @@ class sale_order_line(osv.osv):
result
[
'
name
'
]
=
product_obj
.
partner_ref
domain
=
{}
if
not
uom
and
not
uos
:
if
(
not
uom
)
and
(
not
uos
)
:
result
[
'
product_uom
'
]
=
product_obj
.
uom_id
.
id
if
product_obj
.
uos_id
:
result
[
'
product_uos
'
]
=
product_obj
.
uos_id
.
id
...
...
@@ -926,21 +926,21 @@ class sale_order_line(osv.osv):
[(
'
category_id
'
,
'
=
'
,
product_obj
.
uom_id
.
category_id
.
id
)],
'
product_uos
'
:
[(
'
category_id
'
,
'
=
'
,
uos_category_id
)]}
elif
uos
:
# only happens if uom is False
result
[
'
product_uom
'
]
=
product_obj
.
uom_id
and
product_obj
.
uom_id
.
id
result
[
'
product_uom_qty
'
]
=
qty_uos
/
product_obj
.
uos_coeff
result
[
'
th_weight
'
]
=
result
[
'
product_uom_qty
'
]
*
product_obj
.
weight
elif
uom
:
# whether uos is set or not
default_uom
=
product_obj
.
uom_id
and
product_obj
.
uom_id
.
id
q
=
product_uom_obj
.
_compute_qty
(
cr
,
uid
,
uom
,
qty
,
default_uom
)
if
product_obj
.
uos_id
:
result
[
'
product_uos
'
]
=
product_obj
.
uos_id
.
id
result
[
'
product_uos_qty
'
]
=
q
*
product_obj
.
uos_coeff
result
[
'
product_uos_qty
'
]
=
q
ty
*
product_obj
.
uos_coeff
else
:
result
[
'
product_uos
'
]
=
False
result
[
'
product_uos_qty
'
]
=
q
result
[
'
th_weight
'
]
=
q
*
product_obj
.
weight
elif
uos
:
# only happens if uom is False
result
[
'
product_uom
'
]
=
product_obj
.
uom_id
and
product_obj
.
uom_id
.
id
result
[
'
product_uom_qty
'
]
=
qty_uos
/
product_obj
.
uos_coeff
result
[
'
th_weight
'
]
=
result
[
'
product_uom_qty
'
]
*
product_obj
.
weight
# Round the quantity up
result
[
'
product_uos_qty
'
]
=
qty
result
[
'
th_weight
'
]
=
q
*
product_obj
.
weight
# Round the quantity up
# get unit price
...
...
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