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
1
Merge Requests
1
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
f9dffaf0
Commit
f9dffaf0
authored
Mar 24, 2020
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: BuilderMixin, update call to newTempMovement
parent
d44d3df3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
7 deletions
+44
-7
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+5
-3
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.xml
...emplateItem/portal_components/mixin.erp5.BuilderMixin.xml
+39
-4
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
f9dffaf0
...
...
@@ -174,7 +174,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
def
generateMovementListForStockOptimisation
(
self
,
group_by_node
=
1
,
allow_intermediate_negative_stock
=
True
,
**
kw
):
from
Products.ERP5Type.Document
import
newTempMovement
now
=
DateTime
()
movement_list
=
[]
for
attribute
,
method
in
[(
'node_uid'
,
'getDestinationUid'
),
...
...
@@ -298,7 +297,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
from_date
=
None
,
group_by_node
=
1
,
allow_intermediate_negative_stock
=
True
,
**
kw
):
from
Products.ERP5Type.Document
import
newTempMovement
portal
=
self
.
getPortalObject
()
if
not
from_date
:
from_date
=
DateTime
().
earliestTime
()
...
...
@@ -392,7 +390,11 @@ class BuilderMixin(XMLObject, Amount, Predicate):
def
newMovement
(
effective_date
,
start_date
,
stop_date
,
quantity
,
quantity_unit
):
# Create temporary movement
# Do not handle variation and Item for now
movement
=
newTempMovement
(
portal
,
"temp"
)
movement
=
self
.
getPortalObject
().
newContent
(
temp_object
=
True
,
portal_type
=
"Movement"
,
id
=
"temp"
,
)
movement
.
edit
(
resource_value
=
resource_value
,
destination_value
=
supply
.
getDestinationValue
(),
...
...
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.xml
View file @
f9dffaf0
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
BuilderMixin
</string>
</value>
...
...
@@ -14,6 +20,12 @@
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.mixin.builder
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
mixin.erp5.BuilderMixin
</string>
</value>
...
...
@@ -37,7 +49,15 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
<tuple>
<string>
W:496, 0: Bad indentation. Found 9 spaces, expected 8 (bad-indentation)
</string>
<string>
W:447, 14: Unused variable \'inventory\' (unused-variable)
</string>
<string>
W:447, 35: Unused variable \'portal_type\' (unused-variable)
</string>
<string>
W:328, 4: Unused variable \'max_order_in_default_quantity_unit\' (unused-variable)
</string>
<string>
W:447, 8: Unused variable \'date\' (unused-variable)
</string>
<string>
W:327, 4: Unused variable \'min_order_in_default_quantity_unit\' (unused-variable)
</string>
<string>
W:506, 18: Unused variable \'total_inventory\' (unused-variable)
</string>
</tuple>
</value>
</item>
<item>
...
...
@@ -47,13 +67,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -66,7 +101,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -75,7 +110,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
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