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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
erp5
Commits
40cf4c9c
Commit
40cf4c9c
authored
Mar 24, 2020
by
Cédric Le Ninivin
Committed by
Klaus Wölfel
Apr 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: BuilderMixin, update call to newTempMovement
parent
7d4baf54
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 @
40cf4c9c
...
@@ -174,7 +174,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -174,7 +174,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
def
generateMovementListForStockOptimisation
(
self
,
group_by_node
=
1
,
def
generateMovementListForStockOptimisation
(
self
,
group_by_node
=
1
,
allow_intermediate_negative_stock
=
True
,
allow_intermediate_negative_stock
=
True
,
**
kw
):
**
kw
):
from
Products.ERP5Type.Document
import
newTempMovement
now
=
DateTime
()
now
=
DateTime
()
movement_list
=
[]
movement_list
=
[]
for
attribute
,
method
in
[(
'node_uid'
,
'getDestinationUid'
),
for
attribute
,
method
in
[(
'node_uid'
,
'getDestinationUid'
),
...
@@ -298,7 +297,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -298,7 +297,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
from_date
=
None
,
from_date
=
None
,
group_by_node
=
1
,
allow_intermediate_negative_stock
=
True
,
group_by_node
=
1
,
allow_intermediate_negative_stock
=
True
,
**
kw
):
**
kw
):
from
Products.ERP5Type.Document
import
newTempMovement
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
if
not
from_date
:
if
not
from_date
:
from_date
=
DateTime
().
earliestTime
()
from_date
=
DateTime
().
earliestTime
()
...
@@ -392,7 +390,11 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -392,7 +390,11 @@ class BuilderMixin(XMLObject, Amount, Predicate):
def
newMovement
(
effective_date
,
start_date
,
stop_date
,
quantity
,
quantity_unit
):
def
newMovement
(
effective_date
,
start_date
,
stop_date
,
quantity
,
quantity_unit
):
# Create temporary movement
# Create temporary movement
# Do not handle variation and Item for now
# 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
(
movement
.
edit
(
resource_value
=
resource_value
,
resource_value
=
resource_value
,
destination_value
=
supply
.
getDestinationValue
(),
destination_value
=
supply
.
getDestinationValue
(),
...
...
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.xml
View file @
40cf4c9c
...
@@ -6,6 +6,12 @@
...
@@ -6,6 +6,12 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
BuilderMixin
</string>
</value>
<value>
<string>
BuilderMixin
</string>
</value>
...
@@ -14,6 +20,12 @@
...
@@ -14,6 +20,12 @@
<key>
<string>
default_source_reference
</string>
</key>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.mixin.builder
</string>
</value>
<value>
<string>
Products.ERP5.mixin.builder
</string>
</value>
</item>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
mixin.erp5.BuilderMixin
</string>
</value>
<value>
<string>
mixin.erp5.BuilderMixin
</string>
</value>
...
@@ -37,7 +49,15 @@
...
@@ -37,7 +49,15 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<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>
</value>
</item>
</item>
<item>
<item>
...
@@ -47,13 +67,28 @@
...
@@ -47,13 +67,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<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>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -66,7 +101,7 @@
...
@@ -66,7 +101,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -75,7 +110,7 @@
...
@@ -75,7 +110,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</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