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
Léo-Paul Géneau
erp5
Commits
4c8bc987
Commit
4c8bc987
authored
May 26, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: erp5_pdm: Migrate Documents and Unit Test from filesystem.
parent
d32a1124
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1753 additions
and
377 deletions
+1753
-377
bt5/erp5_apparel/DocumentTemplateItem/portal_components/document.erp5.VariationImage.py
...ateItem/portal_components/document.erp5.VariationImage.py
+1
-1
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.AssortedResource.py
...eItem/portal_components/document.erp5.AssortedResource.py
+353
-353
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.AssortedResource.xml
...Item/portal_components/document.erp5.AssortedResource.xml
+110
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Measure.py
...ntTemplateItem/portal_components/document.erp5.Measure.py
+0
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Measure.xml
...tTemplateItem/portal_components/document.erp5.Measure.xml
+104
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.QuantityUnitConversionDefinition.py
...ponents/document.erp5.QuantityUnitConversionDefinition.py
+0
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.QuantityUnitConversionDefinition.xml
...onents/document.erp5.QuantityUnitConversionDefinition.xml
+104
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.QuantityUnitConversionGroup.py
...l_components/document.erp5.QuantityUnitConversionGroup.py
+0
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.QuantityUnitConversionGroup.xml
..._components/document.erp5.QuantityUnitConversionGroup.xml
+104
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.ResourceMeasuresConsistencyConstraint.py
...ts/document.erp5.ResourceMeasuresConsistencyConstraint.py
+0
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.ResourceMeasuresConsistencyConstraint.xml
...s/document.erp5.ResourceMeasuresConsistencyConstraint.xml
+104
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Transformation.py
...ateItem/portal_components/document.erp5.Transformation.py
+242
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Transformation.xml
...teItem/portal_components/document.erp5.Transformation.xml
+110
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.TransformedResource.py
...em/portal_components/document.erp5.TransformedResource.py
+165
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.TransformedResource.xml
...m/portal_components/document.erp5.TransformedResource.xml
+110
-0
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Variation.py
...TemplateItem/portal_components/document.erp5.Variation.py
+18
-19
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Variation.xml
...emplateItem/portal_components/document.erp5.Variation.xml
+110
-0
bt5/erp5_pdm/TestTemplateItem/portal_components/test.erp5.testPDM.py
...m/TestTemplateItem/portal_components/test.erp5.testPDM.py
+0
-0
bt5/erp5_pdm/TestTemplateItem/portal_components/test.erp5.testPDM.xml
.../TestTemplateItem/portal_components/test.erp5.testPDM.xml
+104
-0
bt5/erp5_pdm/bt/template_document_id_list
bt5/erp5_pdm/bt/template_document_id_list
+9
-1
bt5/erp5_pdm/bt/template_test_id_list
bt5/erp5_pdm/bt/template_test_id_list
+1
-0
bt5/erp5_pdm/bt/test_dependency_list
bt5/erp5_pdm/bt/test_dependency_list
+1
-0
product/ERP5/tests/testERP5Interfaces.py
product/ERP5/tests/testERP5Interfaces.py
+3
-3
No files found.
bt5/erp5_apparel/DocumentTemplateItem/portal_components/document.erp5.VariationImage.py
View file @
4c8bc987
...
...
@@ -30,7 +30,7 @@
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5.D
ocument.Variation
import
Variation
from
erp5.component.d
ocument.Variation
import
Variation
from
erp5.component.document.Image
import
Image
class
VariationImage
(
Image
,
Variation
):
...
...
product/ERP5/Document/
AssortedResource.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
AssortedResource.py
View file @
4c8bc987
...
...
@@ -28,17 +28,14 @@
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
Constraint
from
Products.ERP5Type
import
Permissions
,
Constraint
from
Products.ERP5Type.XMLMatrix
import
XMLMatrix
from
Products.ERP5Type.Utils
import
cartesianProduct
from
Products.ERP5.Document.AmountGeneratorLine
import
AmountGeneratorLine
from
Products.ERP5.Document.TransformedResource
import
TransformedResource
from
Products.ERP5Type.Base
import
TempBase
from
erp5.component.document.TransformedResource
import
TransformedResource
from
Products.CMFCore.Expression
import
Expression
import
operator
class
AssortedResource
(
TransformedResource
):
"""
This code was copied from TransformedResource very stupidly.
...
...
@@ -131,7 +128,6 @@ class AssortedResource(TransformedResource):
)
getCellAggregateKey
=
AmountGeneratorLine
.
getCellAggregateKey
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getAssortedVariationCategoryList'
)
def
getAssortedVariationCategoryList
(
self
,
cell_index
):
"""
...
...
@@ -210,7 +206,7 @@ class AssortedResource(TransformedResource):
return
sorted_list
# Update the range of cells according to the currently selected base categories.
def
_updateCellRange
(
self
,
base
=
1
,
current_category
=
None
):
def
_updateCellRange
(
self
,
base
=
1
,
current_category
=
None
,
*
args
,
**
kw
):
transformation
=
self
.
getParentValue
()
kwd
=
{
'base_id'
:
'quantity'
}
kw
=
[]
...
...
@@ -429,7 +425,7 @@ class AssortedResource(TransformedResource):
return
result
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'newCellContent'
)
def
newCellContent
(
self
,
id
,
portal_type
=
'Set Mapped Value'
,
**
kw
):
def
newCellContent
(
self
,
id
,
portal_type
=
'Set Mapped Value'
,
**
kw
):
# pylint: disable=redefined-builtin
"""Overriden to specify default portal type
"""
return
self
.
newContent
(
id
=
id
,
portal_type
=
portal_type
,
**
kw
)
...
...
@@ -493,8 +489,11 @@ class AssortedResource(TransformedResource):
error_list
+=
q_constraint
.
checkConsistency
(
c
)
return
error_list
"""
if 0: # obsolete
from Products.ERP5Type.Base import TempBase
import operator
def getAggregatedAmountList(self, REQUEST):
# First, we set initial values for quantity and variation
# Currently, we only consider discrete variations
...
...
@@ -726,3 +725,4 @@ class AssortedResource(TransformedResource):
reduce(operator.add, total_variated_base_price_list, 0),
\
reduce(operator.add, total_variated_source_base_price_list, 0),
\
duration
"""
\ No newline at end of file
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.AssortedResource.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
AssortedResource
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.AssortedResource
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.AssortedResource
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
Measure.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
Measure.py
View file @
4c8bc987
File moved
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Measure.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
Measure
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.Measure
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.Measure
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
QuantityUnitConversionDefinition.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
QuantityUnitConversionDefinition.py
View file @
4c8bc987
File moved
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.QuantityUnitConversionDefinition.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
QuantityUnitConversionDefinition
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.QuantityUnitConversionDefinition
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.QuantityUnitConversionDefinition
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
QuantityUnitConversionGroup.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
QuantityUnitConversionGroup.py
View file @
4c8bc987
File moved
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.QuantityUnitConversionGroup.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
QuantityUnitConversionGroup
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.QuantityUnitConversionGroup
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.QuantityUnitConversionGroup
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
ResourceMeasuresConsistencyConstraint.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
ResourceMeasuresConsistencyConstraint.py
View file @
4c8bc987
File moved
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.ResourceMeasuresConsistencyConstraint.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ResourceMeasuresConsistencyConstraint
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.ResourceMeasuresConsistencyConstraint
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.ResourceMeasuresConsistencyConstraint
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
Transformation.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
Transformation.py
View file @
4c8bc987
...
...
@@ -30,7 +30,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
zLOG
import
LOG
,
WARNING
from
warnings
import
warn
from
AccessControl
import
ClassSecurityInfo
...
...
@@ -41,8 +40,6 @@ from Products.ERP5.Document.MappedValue import MappedValue
from
Products.ERP5.mixin.amount_generator
import
AmountGeneratorMixin
from
Products.ERP5.mixin.variated
import
VariatedMixin
from
Products.ERP5.mixin.composition
import
CompositionMixin
from
Products.ERP5Type.XMLObject
import
XMLObject
# XXX Give priority to VariatedMixin (over Amount) due to conflicting
# implementations of getVariationBaseCategoryList
...
...
@@ -55,7 +52,6 @@ class Transformation(MappedValue, VariatedMixin, Amount, AmountGeneratorMixin):
XXX Transformation works only for a maximum of 3 variation base category...
Matrixbox must be rewritten for a clean implementation of n base category
"""
meta_type
=
'ERP5 Transformation'
portal_type
=
'Transformation'
...
...
@@ -112,7 +108,7 @@ class Transformation(MappedValue, VariatedMixin, Amount, AmountGeneratorMixin):
def
getMappedValuePropertyList
(
self
):
return
()
def
getMappedValueBaseCategoryList
(
self
):
def
getMappedValueBaseCategoryList
(
self
,
*
args
,
**
kw
):
return
()
# IVariationRange and IVariated Implementation
...
...
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Transformation.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
Transformation
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.Transformation
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.Transformation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
TransformedResource.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
TransformedResource.py
View file @
4c8bc987
...
...
@@ -31,7 +31,7 @@
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5.Document.AmountGeneratorLine
import
AmountGeneratorLine
...
...
@@ -81,7 +81,7 @@ class TransformedResource(AmountGeneratorLine):
result
=
filter
(
self
.
hasProperty
,
result
)
return
result
def
getMappedValueBaseCategoryList
(
self
):
def
getMappedValueBaseCategoryList
(
self
,
*
args
,
**
kw
):
result
=
list
(
self
.
_baseGetMappedValueBaseCategoryList
())
if
not
result
:
if
not
self
.
hasCellContent
(
base_id
=
'variation'
):
...
...
@@ -97,7 +97,7 @@ class TransformedResource(AmountGeneratorLine):
return
None
@
classmethod
def
getBaseAmountQuantity
(
cls
,
delivery_amount
,
base_application
,
rounding
):
def
getBaseAmountQuantity
(
cls
,
delivery_amount
,
base_application
,
rounding
,
*
args
,
**
kw
):
value
=
delivery_amount
.
getGeneratedAmountQuantity
(
base_application
)
if
base_application
==
'base_amount/produced_quantity'
:
value
+=
delivery_amount
.
getConvertedQuantity
()
...
...
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.TransformedResource.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TransformedResource
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.TransformedResource
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.TransformedResource
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/Document/
Variation.py
→
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.
Variation.py
View file @
4c8bc987
...
...
@@ -38,7 +38,6 @@ class Variation(XMLObject):
"""
A Variation
"""
meta_type
=
'ERP5 Variation'
portal_type
=
'Variation'
add_permission
=
Permissions
.
AddPortalContent
...
...
bt5/erp5_pdm/DocumentTemplateItem/portal_components/document.erp5.Variation.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
Variation
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.Document.Variation
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.Variation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Document Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/tests/
testPDM.py
→
bt5/erp5_pdm/TestTemplateItem/portal_components/test.erp5.
testPDM.py
View file @
4c8bc987
File moved
bt5/erp5_pdm/TestTemplateItem/portal_components/test.erp5.testPDM.xml
0 → 100644
View file @
4c8bc987
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testPDM
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5.tests.testPDM
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testPDM
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm/bt/template_document_id_list
View file @
4c8bc987
document.erp5.AssortedResource
document.erp5.Consumption
document.erp5.Measure
document.erp5.QuantityUnitConversionDefinition
document.erp5.QuantityUnitConversionGroup
document.erp5.ResourceMeasuresConsistencyConstraint
document.erp5.Transformation
document.erp5.TransformedResource
document.erp5.Variation
\ No newline at end of file
bt5/erp5_pdm/bt/template_test_id_list
0 → 100644
View file @
4c8bc987
test.erp5.testPDM
\ No newline at end of file
bt5/erp5_pdm/bt/test_dependency_list
0 → 100644
View file @
4c8bc987
erp5_full_text_mroonga_catalog
\ No newline at end of file
product/ERP5/tests/testERP5Interfaces.py
View file @
4c8bc987
...
...
@@ -45,9 +45,9 @@ implements_tuple_list = [
((
'erp5.component.document.TradeModelLine'
,
'TradeModelLine'
),
'IAmountGenerator'
),
((
'erp5.component.document.TradeModelLine'
,
'TradeModelLine'
),
'IVariated'
),
((
'erp5.component.document.TradeModelPath'
,
'TradeModelPath'
),
'IArrowBase'
),
((
'
Products.ERP5.D
ocument.Transformation'
,
'Transformation'
),
'IAmountGenerator'
),
((
'
Products.ERP5.D
ocument.Transformation'
,
'Transformation'
),
'IVariated'
),
((
'
Products.ERP5.D
ocument.TransformedResource'
,
'TransformedResource'
),
'IVariated'
),
((
'
erp5.component.d
ocument.Transformation'
,
'Transformation'
),
'IAmountGenerator'
),
((
'
erp5.component.d
ocument.Transformation'
,
'Transformation'
),
'IVariated'
),
((
'
erp5.component.d
ocument.TransformedResource'
,
'TransformedResource'
),
'IVariated'
),
#IDocument
((
'Products.ERP5.Document.Document'
,
'Document'
),
'IDocument'
),
((
'erp5.component.document.Image'
,
'Image'
),
'IDocument'
),
...
...
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