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
c640b10c
Commit
c640b10c
authored
Dec 15, 2023
by
Xiaowu Zhang
Committed by
Cédric Le Ninivin
May 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: keep current transformation if ME is already generated
parent
aa0e5ed4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
1 deletion
+77
-1
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.CompositionMixin.py
...lateItem/portal_components/mixin.erp5.CompositionMixin.py
+4
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_keepCurrentModel.py
...plateItem/portal_skins/erp5_core/Base_keepCurrentModel.py
+11
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_keepCurrentModel.xml
...lateItem/portal_skins/erp5_core/Base_keepCurrentModel.xml
+62
-0
No files found.
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.CompositionMixin.py
View file @
c640b10c
...
...
@@ -223,7 +223,10 @@ class CompositionMixin:
portal_type
=
specialise_type_list
or
())
effective_index
+=
1
for
model
in
model_list
:
model
=
_getEffectiveModel
(
model
,
start_date
,
stop_date
)
if
not
self
.
Base_keepCurrentModel
(
model
):
model
=
_getEffectiveModel
(
model
,
start_date
,
stop_date
)
if
model
not
in
effective_set
:
effective_set
.
add
(
model
)
if
1
:
#model.test(self): # XXX
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_keepCurrentModel.py
0 → 100644
View file @
c640b10c
if
current_model
.
getPortalType
()
==
'Transformation'
:
if
context
.
getPortalType
()
==
'Simulation Movement'
:
delivery
=
context
.
getDeliveryValue
(
portal_type
=
'Manufacturing Order Line'
)
if
delivery
:
applied_rule
=
context
.
objectValues
(
portal_type
=
'Applied Rule'
)
if
applied_rule
:
sm
=
applied_rule
[
0
].
objectValues
(
portal_type
=
'Simulation Movement'
)
if
sm
:
if
sm
[
0
].
getDeliveryValue
(
portal_type
=
'Manufacturing Execution Line'
):
return
True
return
False
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_keepCurrentModel.xml
0 → 100644
View file @
c640b10c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
current_model, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_keepCurrentModel
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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