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
f02cafa0
Commit
f02cafa0
authored
6 years ago
by
Christophe Simonis
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] stock_account: define variable in right function
parent
6d04faf6
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/stock_account/models/stock.py
+5
-5
5 additions, 5 deletions
addons/stock_account/models/stock.py
with
5 additions
and
5 deletions
addons/stock_account/models/stock.py
+
5
−
5
View file @
f02cafa0
...
...
@@ -514,11 +514,6 @@ class StockMove(models.Model):
else
:
valuation_amount
=
cost
if
self
.
_context
.
get
(
'
forced_ref
'
):
ref
=
self
.
_context
[
'
forced_ref
'
]
else
:
ref
=
self
.
picking_id
.
name
# the standard_price of the product may be in another decimal precision, or not compatible with the coinage of
# the company currency... so we need to use round() before creating the accounting entries.
debit_value
=
self
.
company_id
.
currency_id
.
round
(
valuation_amount
)
...
...
@@ -549,6 +544,11 @@ class StockMove(models.Model):
# This method returns a dictonary to provide an easy extension hook to modify the valuation lines (see purchase for an example)
self
.
ensure_one
()
if
self
.
_context
.
get
(
'
forced_ref
'
):
ref
=
self
.
_context
[
'
forced_ref
'
]
else
:
ref
=
self
.
picking_id
.
name
debit_line_vals
=
{
'
name
'
:
self
.
name
,
'
product_id
'
:
self
.
product_id
.
id
,
...
...
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