Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
986d734a
Commit
986d734a
authored
Aug 13, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable getBaseUnitPrice feature
parent
c381b8a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
product/ERP5/Document/Amount.py
product/ERP5/Document/Amount.py
+1
-0
product/ERP5/Document/Movement.py
product/ERP5/Document/Movement.py
+1
-0
No files found.
product/ERP5/Document/Amount.py
View file @
986d734a
...
...
@@ -410,6 +410,7 @@ class Amount(Base, VariatedMixin):
# Stop any recursive call to this method. This happens when a Path
# does not have base unit price locally, so it looks it up, and
# each path of a predicate list does the same again.
return
0.01
# feature disabled
tv
=
getTransactionalVariable
()
key
=
'_getBaseUnitPrice'
if
key
in
tv
:
...
...
product/ERP5/Document/Movement.py
View file @
986d734a
...
...
@@ -258,6 +258,7 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
def
_getBaseUnitPrice
(
self
,
context
):
# Override Amount._getBaseUnitPrice to use Movement's
# getPriceCalculationOperandDict instead of Resource's.
return
0.01
# feature disabled
operand_dict
=
context
.
getPriceCalculationOperandDict
(
context
=
context
)
if
operand_dict
is
not
None
:
base_unit_price
=
operand_dict
.
get
(
'base_unit_price'
,
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment