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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
9b9e07fa
Commit
9b9e07fa
authored
Apr 29, 2024
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_real_time_inventory_accounting: price document can be purchase
parent
7813bf6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
bt5/erp5_real_time_inventory_accounting/DocumentTemplateItem/portal_components/document.erp5.InventoryAssetPriceAccountingSimulationRule.py
...ument.erp5.InventoryAssetPriceAccountingSimulationRule.py
+8
-2
No files found.
bt5/erp5_real_time_inventory_accounting/DocumentTemplateItem/portal_components/document.erp5.InventoryAssetPriceAccountingSimulationRule.py
View file @
9b9e07fa
...
...
@@ -41,12 +41,18 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(
# No expand if SourceAssetPrice is not defined (already checked in 'Test Method ID' on the Rule).
#let's trace which internal supply line is used for ME, Production, Sale
delivery_value
=
simulation_movement
.
getDeliveryValue
()
if
delivery_value
and
(
'Purchase'
not
in
delivery_value
.
getPortalType
()
and
'Internal'
not
in
delivery_value
.
getPortalType
()):
if
delivery_value
\
and
((
'Manufacturing'
in
delivery_value
.
getPortalType
())
\
or
(
'Production'
in
delivery_value
.
getPortalType
())
\
or
(
'Internal'
in
delivery_value
.
getPortalType
()
and
delivery_value
.
getSpecialise
(
portal_type
=
'Internal Trade Condition'
)
==
'internal_trade_condition_module/skd_movement_internal_trade_condition'
)):
supply
=
simulation_movement
.
Movement_getSourceAssetPrice
(
return_internal_supply_line
=
True
,
return_price_document
=
True
)
if
supply
is
None
:
return
[]
if
supply
.
getPortalType
().
startswith
(
'Internal Supply'
):
base_price
=
supply
.
getBasePrice
()
else
:
base_price
=
supply
.
getDestinationAssetPrice
()
base_price
=
supply
.
getBasePrice
()
simulation_movement
=
simulation_movement
.
asContext
()
simulation_movement
.
setAggregateValue
(
supply
,
portal_type
=
supply
.
getPortalType
())
else
:
...
...
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