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
Paul Graydon
erp5
Commits
59571d6d
Commit
59571d6d
authored
Jul 08, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
4645e7b4
Changes
37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
1021 additions
and
17987 deletions
+1021
-17987
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testOOoParser.py
...TemplateItem/portal_components/test.erp5.testOOoParser.py
+5
-4
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testOOoParser.xml
...emplateItem/portal_components/test.erp5.testOOoParser.xml
+131
-0
bt5/erp5_core_test/bt/template_test_id_list
bt5/erp5_core_test/bt/template_test_id_list
+1
-0
bt5/erp5_deferred_style/TestTemplateItem/portal_components/test.erp5.testDeferredStyle.py
...lateItem/portal_components/test.erp5.testDeferredStyle.py
+14
-14
bt5/erp5_deferred_style/TestTemplateItem/portal_components/test.erp5.testDeferredStyle.xml
...ateItem/portal_components/test.erp5.testDeferredStyle.xml
+110
-0
bt5/erp5_deferred_style/bt/template_test_id_list
bt5/erp5_deferred_style/bt/template_test_id_list
+1
-0
bt5/erp5_deferred_style/bt/test_dependency_list
bt5/erp5_deferred_style/bt/test_dependency_list
+9
-0
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testIngestion.py
...TemplateItem/portal_components/test.erp5.testIngestion.py
+34
-44
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testIngestion.xml
...emplateItem/portal_components/test.erp5.testIngestion.xml
+110
-0
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testIngestionWithFlare.py
...tem/portal_components/test.erp5.testIngestionWithFlare.py
+1
-1
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testIngestionWithFlare.xml
...em/portal_components/test.erp5.testIngestionWithFlare.xml
+110
-0
bt5/erp5_dms/bt/template_test_id_list
bt5/erp5_dms/bt/template_test_id_list
+2
-0
bt5/erp5_dms/bt/test_dependency_list
bt5/erp5_dms/bt/test_dependency_list
+2
-1
bt5/erp5_odt_style/ModuleComponentTemplateItem/portal_components/module.erp5.TestFormPrintoutMixin.py
...em/portal_components/module.erp5.TestFormPrintoutMixin.py
+1
-1
bt5/erp5_odt_style/ModuleComponentTemplateItem/portal_components/module.erp5.TestFormPrintoutMixin.xml
...m/portal_components/module.erp5.TestFormPrintoutMixin.xml
+110
-0
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testFormPrintoutAsODG.py
...Item/portal_components/test.erp5.testFormPrintoutAsODG.py
+7
-5
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testFormPrintoutAsODG.xml
...tem/portal_components/test.erp5.testFormPrintoutAsODG.xml
+110
-0
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testFormPrintoutAsODT.py
...Item/portal_components/test.erp5.testFormPrintoutAsODT.py
+18
-19
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testFormPrintoutAsODT.xml
...tem/portal_components/test.erp5.testFormPrintoutAsODT.xml
+110
-0
bt5/erp5_odt_style/bt/template_module_component_id_list
bt5/erp5_odt_style/bt/template_module_component_id_list
+1
-0
bt5/erp5_odt_style/bt/template_test_id_list
bt5/erp5_odt_style/bt/template_test_id_list
+2
-0
bt5/erp5_odt_style/bt/test_dependency_list
bt5/erp5_odt_style/bt/test_dependency_list
+3
-0
bt5/erp5_ooo_import/TestTemplateItem/portal_components/test.erp5.testOOoImport.py
...TemplateItem/portal_components/test.erp5.testOOoImport.py
+4
-3
bt5/erp5_ooo_import/TestTemplateItem/portal_components/test.erp5.testOOoImport.xml
...emplateItem/portal_components/test.erp5.testOOoImport.xml
+110
-0
bt5/erp5_ooo_import/bt/template_test_id_list
bt5/erp5_ooo_import/bt/template_test_id_list
+1
-0
bt5/erp5_ooo_import/bt/test_dependency_list
bt5/erp5_ooo_import/bt/test_dependency_list
+3
-0
product/ERP5/bin/xml_beautifier.py
product/ERP5/bin/xml_beautifier.py
+0
-0
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.OOoTemplate.py
...TemplateItem/portal_components/module.erp5.OOoTemplate.py
+8
-4
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.OOoUtils.py
...entTemplateItem/portal_components/module.erp5.OOoUtils.py
+3
-0
product/ERP5/dtml/FormPrintout_add.dtml
product/ERP5/dtml/FormPrintout_add.dtml
+0
-0
product/ERP5/dtml/OOoTemplate_add.dtml
product/ERP5/dtml/OOoTemplate_add.dtml
+0
-0
product/ERP5/www/FormPrintout_manageEdit.zpt
product/ERP5/www/FormPrintout_manageEdit.zpt
+0
-0
product/ERP5/www/OOo.png
product/ERP5/www/OOo.png
+0
-0
product/ERP5/www/formSettings.zpt
product/ERP5/www/formSettings.zpt
+0
-0
product/ERP5/www/form_printout_icon.png
product/ERP5/www/form_printout_icon.png
+0
-0
product/ERP5OOo/Permissions.py
product/ERP5OOo/Permissions.py
+0
-0
product/ERP5OOo/tests/OpenDocument-schema-v1.1.rng
product/ERP5OOo/tests/OpenDocument-schema-v1.1.rng
+0
-17891
No files found.
product/ERP5OOo/tests/
testOOoParser.py
→
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.
testOOoParser.py
View file @
59571d6d
...
...
@@ -29,11 +29,12 @@
import
unittest
import
os
from
Products.ERP5OOo
.OOoUtils
import
OOoParser
from
erp5.component.module
.OOoUtils
import
OOoParser
def
makeFilePath
(
name
):
return
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_document'
,
name
)
import
Products.ERP5
return
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_data'
,
name
)
class
TestOOoParser
(
unittest
.
TestCase
):
""" OOoParser tests
...
...
@@ -45,7 +46,7 @@ class TestOOoParser(unittest.TestCase):
self
.
assertEqual
([
'Person'
],
mapping
.
keys
())
person_mapping
=
mapping
[
'Person'
]
self
.
assertTrue
(
isinstance
(
person_mapping
,
list
))
self
.
assert
True
(
102
,
len
(
person_mapping
)
)
self
.
assert
Equal
(
len
(
person_mapping
),
102
)
self
.
assertEqual
(
person_mapping
[
0
],
[
'Title'
,
'First Name'
,
'Last Name'
,
'Default Email Text'
])
self
.
assertEqual
(
person_mapping
[
1
],
...
...
@@ -99,7 +100,7 @@ class TestOOoParser(unittest.TestCase):
parser
.
openFile
(
open
(
makeFilePath
(
'import_big_spreadsheet.ods'
),
'rb'
))
mapping
=
parser
.
getSpreadsheetsMapping
()
not_ok
=
1
for
spread
,
values
in
mapping
.
iteritems
():
for
_
,
values
in
mapping
.
iteritems
():
self
.
assertEqual
(
len
(
values
),
41001
)
not_ok
=
0
if
not_ok
:
...
...
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testOOoParser.xml
0 → 100644
View file @
59571d6d
<?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>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testOOoParser
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testOOoParser
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testOOoParser
</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"
>
AAAAAAAAAAM=
</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>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<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_core_test/bt/template_test_id_list
View file @
59571d6d
...
...
@@ -30,6 +30,7 @@ test.erp5.testMemcachedTool
test.erp5.testNotificationMessageModule
test.erp5.testNotificationTool
test.erp5.testOOoBatchMode
test.erp5.testOOoParser
test.erp5.testPerson
test.erp5.testQueryModule
test.erp5.testRestrictedPythonSecurity
...
...
product/ERP5OOo/tests/
testDeferredStyle.py
→
bt5/erp5_deferred_style/TestTemplateItem/portal_components/test.erp5.
testDeferredStyle.py
View file @
59571d6d
...
...
@@ -118,13 +118,13 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
def
test_report_view
(
self
):
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
))
self
.
tic
()
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEquals
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
_
,
mto
,
message_text
=
last_message
self
.
assertEqual
(
'"%s" <%s>'
%
(
self
.
first_name
,
self
.
recipient_email_address
),
mto
[
0
])
mail_message
=
email
.
message_from_string
(
message_text
)
for
part
in
mail_message
.
walk
():
...
...
@@ -181,7 +181,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
_defineSystemPreference
()
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
))
self
.
tic
()
...
...
@@ -189,7 +189,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEquals
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
_
,
mto
,
message_text
=
last_message
self
.
assertEqual
(
'"%s" <%s>'
%
(
self
.
first_name
,
self
.
recipient_email_address
),
mto
[
0
])
mail_message
=
email
.
message_from_string
(
message_text
)
for
part
in
mail_message
.
walk
():
...
...
@@ -219,7 +219,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
_defineSystemPreference
(
"notification-deferred.report"
)
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
))
self
.
tic
()
...
...
@@ -227,7 +227,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEquals
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
_
,
mto
,
message_text
=
last_message
self
.
assertEqual
(
'"%s" <%s>'
%
(
self
.
first_name
,
self
.
recipient_email_address
),
mto
[
0
])
mail_message
=
email
.
message_from_string
(
message_text
)
for
part
in
mail_message
.
walk
():
...
...
@@ -242,7 +242,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
_defineSystemPreference
()
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s&format=pdf'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
))
self
.
tic
()
...
...
@@ -251,7 +251,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEquals
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
_
,
mto
,
message_text
=
last_message
self
.
assertEqual
(
'"%s" <%s>'
%
(
self
.
first_name
,
self
.
recipient_email_address
),
mto
[
0
])
mail_message
=
email
.
message_from_string
(
message_text
)
for
part
in
mail_message
.
walk
():
...
...
@@ -266,7 +266,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
loginAsUser
(
'bob'
)
# simulate a big request, for which Base_callDialogMethod will not issue a
# redirect
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_callDialogMethod?deferred_portal_skin=%s&'
'dialog_method=Person_view&dialog_id=Person_view&'
'deferred_style:int=1&junk=%s'
%
(
self
.
portal
.
getId
(),
...
...
@@ -276,7 +276,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self
.
tic
()
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEquals
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
_
,
mto
,
message_text
=
last_message
self
.
assertEqual
(
'"%s" <%s>'
%
(
self
.
first_name
,
self
.
recipient_email_address
),
mto
[
0
])
mail_message
=
email
.
message_from_string
(
message_text
)
for
part
in
mail_message
.
walk
():
...
...
@@ -300,7 +300,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
# User's Accept-Language header is honored in reports.
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
),
...
...
@@ -325,7 +325,7 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
# User's LOCALIZER_LANGUAGE cookie is honored in reports and have priority over Accept-Language
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
),
...
...
@@ -366,13 +366,13 @@ class TestODSDeferredStyle(TestDeferredStyle):
"""
self
.
loginAsUser
(
'bob'
)
self
.
portal
.
changeSkin
(
'Deferred'
)
response
=
self
.
publish
(
self
.
publish
(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s&sheet_per_report_section:int=1'
%
(
self
.
portal
.
getId
(),
self
.
skin
),
'%s:%s'
%
(
self
.
username
,
self
.
password
))
self
.
tic
()
last_message
=
self
.
portal
.
MailHost
.
_last_message
self
.
assertNotEquals
((),
last_message
)
mfrom
,
mto
,
message_text
=
last_message
_
,
mto
,
message_text
=
last_message
self
.
assertEqual
(
'"%s" <%s>'
%
(
self
.
first_name
,
self
.
recipient_email_address
),
mto
[
0
])
mail_message
=
email
.
message_from_string
(
message_text
)
for
part
in
mail_message
.
walk
():
...
...
bt5/erp5_deferred_style/TestTemplateItem/portal_components/test.erp5.testDeferredStyle.xml
0 → 100644
View file @
59571d6d
<?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>
testDeferredStyle
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testDeferredStyle
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testDeferredStyle
</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_deferred_style/bt/template_test_id_list
0 → 100644
View file @
59571d6d
test.erp5.testDeferredStyle
\ No newline at end of file
bt5/erp5_deferred_style/bt/test_dependency_list
0 → 100644
View file @
59571d6d
erp5_full_text_mroonga_catalog
erp5_core_proxy_field_legacy
erp5_base
erp5_ods_style
erp5_ingestion_mysql_innodb_catalog
erp5_ingestion
erp5_web
erp5_dms
erp5_l10n_fr
\ No newline at end of file
product/ERP5OOo/tests/
testIngestion.py
→
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.
testIngestion.py
View file @
59571d6d
This diff is collapsed.
Click to expand it.
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testIngestion.xml
0 → 100644
View file @
59571d6d
<?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>
testIngestion
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testIngestion
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testIngestion
</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>
product/ERP5OOo/tests/
testIngestionWithFlare.py
→
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.
testIngestionWithFlare.py
View file @
59571d6d
...
...
@@ -28,7 +28,7 @@
##############################################################################
import
unittest
from
testIngestion
import
TestIngestion
from
erp5.component.test.
testIngestion
import
TestIngestion
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getPersistentMemcachedServerDict
class
TestIngestionWithFlare
(
TestIngestion
):
...
...
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testIngestionWithFlare.xml
0 → 100644
View file @
59571d6d
<?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>
testIngestionWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testIngestionWithFlare
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testIngestionWithFlare
</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_dms/bt/template_test_id_list
View file @
59571d6d
test.erp5.testDms
test.erp5.testDmsWithFlare
test.erp5.testERP5WebWithDms
test.erp5.testIngestion
test.erp5.testIngestionWithFlare
test.erp5.testOOoConversionCache
test.erp5.testOOoConversionServerRetry
\ No newline at end of file
bt5/erp5_dms/bt/test_dependency_list
View file @
59571d6d
erp5_full_text_mroonga_catalog
erp5_ingestion_mysql_innodb_catalog
\ No newline at end of file
erp5_ingestion_mysql_innodb_catalog
erp5_core_proxy_field_legacy
\ No newline at end of file
product/ERP5OOo/tests/
TestFormPrintoutMixin.py
→
bt5/erp5_odt_style/ModuleComponentTemplateItem/portal_components/module.erp5.
TestFormPrintoutMixin.py
View file @
59571d6d
...
...
@@ -40,7 +40,7 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_base'
,
'erp5_ui_test'
,
'erp5_odt_style'
)
def
login
(
self
):
def
login
(
self
,
*
args
,
**
kw
):
uf
=
self
.
getPortal
().
acl_users
uf
.
_doAddUser
(
'zope'
,
''
,
[
'Manager'
],
[])
user
=
uf
.
getUserById
(
'zope'
).
__of__
(
uf
)
...
...
bt5/erp5_odt_style/ModuleComponentTemplateItem/portal_components/module.erp5.TestFormPrintoutMixin.xml
0 → 100644
View file @
59571d6d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Module Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
TestFormPrintoutMixin
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.TestFormPrintoutMixin
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
module.erp5.TestFormPrintoutMixin
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Module 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/ERP5OOo/tests/
testFormPrintoutAsODG.py
→
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.
testFormPrintoutAsODG.py
View file @
59571d6d
...
...
@@ -28,8 +28,9 @@
##############################################################################
import
unittest
from
Products.ERP5OOo.tests.TestFormPrintoutMixin
import
TestFormPrintoutMixin
from
Products.ERP5OOo.OOoUtils
import
OOoBuilder
import
Products.ERP5
from
erp5.component.module.TestFormPrintoutMixin
import
TestFormPrintoutMixin
from
erp5.component.module.OOoUtils
import
OOoBuilder
from
Products.ERP5OOo.tests.utils
import
Validator
from
Products.ERP5Type.tests.utils
import
FileUpload
from
lxml
import
etree
...
...
@@ -56,12 +57,13 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
def
afterSetUp
(
self
):
self
.
login
()
# XML validator
v12schema_url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
v12schema_url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_data'
,
'OpenDocument-v1.2-os-schema.rng'
)
self
.
validator
=
Validator
(
schema_url
=
v12schema_url
)
foo_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
foo_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_001.odg'
)
foo_file
=
open
(
foo_file_path
,
'rb'
)
self
.
_validate
(
foo_file
.
read
())
...
...
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testFormPrintoutAsODG.xml
0 → 100644
View file @
59571d6d
<?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>
testFormPrintoutAsODG
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testFormPrintoutAsODG
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testFormPrintoutAsODG
</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>
product/ERP5OOo/tests/
testFormPrintoutAsODT.py
→
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.
testFormPrintoutAsODT.py
View file @
59571d6d
...
...
@@ -30,11 +30,12 @@
##############################################################################
import
unittest
import
Products.ERP5
from
unittest
import
skip
from
Products.ERP5OOo.tests
.TestFormPrintoutMixin
import
TestFormPrintoutMixin
from
erp5.component.module
.TestFormPrintoutMixin
import
TestFormPrintoutMixin
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
from
Products.MimetypesRegistry.mime_types.magic
import
guessMime
from
Products.ERP5OOo
.OOoUtils
import
OOoBuilder
from
erp5.component.module
.OOoUtils
import
OOoBuilder
from
Products.ERP5OOo.tests.utils
import
Validator
from
Products.ERP5Type.tests.utils
import
FileUpload
from
DateTime
import
DateTime
...
...
@@ -52,27 +53,28 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
def
afterSetUp
(
self
):
self
.
login
()
# XML validator
v12schema_url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
v12schema_url
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_data'
,
'OpenDocument-v1.2-os-schema.rng'
)
self
.
validator
=
Validator
(
schema_url
=
v12schema_url
)
foo_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
foo_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_001.odt'
)
foo2_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
foo2_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_002.odt'
)
foo3_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
foo3_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_003.odt'
)
foo4_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
foo4_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_004.odt'
)
foo5_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
foo5_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_005.odt'
)
variable_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_d
ocument
'
,
variable_file_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_d
ata
'
,
'Foo_001_with_variable.odt'
)
foo_file
=
open
(
foo_file_path
,
'rb'
)
foo2_file
=
open
(
foo2_file_path
,
'rb'
)
...
...
@@ -154,7 +156,7 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
self
.
assertEqual
(
request
.
RESPONSE
.
getHeader
(
'content-disposition'
),
'inline;filename="Foo_viewAsPrintout.odt"'
)
self
.
_validate
(
odf_document
)
pdf_document
=
foo_printout
.
index_html
(
REQUEST
=
request
,
format
=
'pdf'
)
foo_printout
.
index_html
(
REQUEST
=
request
,
format
=
'pdf'
)
self
.
assertEqual
(
request
.
RESPONSE
.
getHeader
(
'content-type'
),
'application/pdf'
)
self
.
assertEqual
(
request
.
RESPONSE
.
getHeader
(
'content-disposition'
),
...
...
@@ -505,7 +507,6 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
test1
=
self
.
portal
.
foo_module
.
test1
foo_printout
=
test1
.
Foo_viewAsPrintout
foo_form
=
test1
.
Foo_view
listbox
=
foo_form
.
listbox
request
=
self
.
app
.
REQUEST
request
[
'here'
]
=
test1
...
...
@@ -564,7 +565,6 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
test1
=
self
.
portal
.
foo_module
.
test1
foo_printout
=
test1
.
Foo_viewAsPrintout
foo_form
=
test1
.
Foo_view
listbox
=
foo_form
.
listbox
request
=
self
.
app
.
REQUEST
request
[
'here'
]
=
test1
...
...
@@ -685,7 +685,6 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
test1
=
self
.
portal
.
foo_module
.
test1
foo_printout
=
test1
.
Foo_viewAsPrintout
foo_form
=
test1
.
Foo_view
listbox
=
foo_form
.
listbox
request
=
self
.
app
.
REQUEST
request
[
'here'
]
=
test1
...
...
bt5/erp5_odt_style/TestTemplateItem/portal_components/test.erp5.testFormPrintoutAsODT.xml
0 → 100644
View file @
59571d6d
<?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>
testFormPrintoutAsODT
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testFormPrintoutAsODT
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testFormPrintoutAsODT
</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_odt_style/bt/template_module_component_id_list
0 → 100644
View file @
59571d6d
module.erp5.TestFormPrintoutMixin
\ No newline at end of file
bt5/erp5_odt_style/bt/template_test_id_list
0 → 100644
View file @
59571d6d
test.erp5.testFormPrintoutAsODG
test.erp5.testFormPrintoutAsODT
\ No newline at end of file
bt5/erp5_odt_style/bt/test_dependency_list
View file @
59571d6d
erp5_full_text_mroonga_catalog
erp5_base
erp5_ui_test
\ No newline at end of file
product/ERP5OOo/tests/
testOOoImport.py
→
bt5/erp5_ooo_import/TestTemplateItem/portal_components/test.erp5.
testOOoImport.py
View file @
59571d6d
...
...
@@ -34,11 +34,12 @@ from AccessControl.SecurityManagement import newSecurityManager
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
FileUpload
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5OOo
.OOoUtils
import
OOoParser
from
erp5.component.module
.OOoUtils
import
OOoParser
from
DateTime
import
DateTime
def
makeFilePath
(
name
):
return
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_document'
,
name
)
import
Products.ERP5
return
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'test_data'
,
name
)
def
makeFileUpload
(
name
):
path
=
makeFilePath
(
name
)
...
...
@@ -887,7 +888,7 @@ class TestOOoImport(TestOOoImportMixin):
parser
.
openFile
(
open
(
makeFilePath
(
'import_big_spreadsheet.ods'
),
'rb'
))
mapping
=
parser
.
getSpreadsheetsMapping
()
not_ok
=
1
for
spread
,
values
in
mapping
.
iteritems
():
for
_
,
values
in
mapping
.
iteritems
():
self
.
assertEqual
(
len
(
values
),
41001
)
not_ok
=
0
if
not_ok
:
...
...
bt5/erp5_ooo_import/TestTemplateItem/portal_components/test.erp5.testOOoImport.xml
0 → 100644
View file @
59571d6d
<?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>
testOOoImport
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<string>
Products.ERP5OOo.tests.testOOoImport
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testOOoImport
</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_ooo_import/bt/template_test_id_list
0 → 100644
View file @
59571d6d
test.erp5.testOOoImport
\ No newline at end of file
bt5/erp5_ooo_import/bt/test_dependency_list
0 → 100644
View file @
59571d6d
erp5_full_text_mroonga_catalog
erp5_base
erp5_web
\ No newline at end of file
product/ERP5
OOo/scripts
/xml_beautifier.py
→
product/ERP5
/bin
/xml_beautifier.py
View file @
59571d6d
File moved
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.OOoTemplate.py
View file @
59571d6d
...
...
@@ -38,6 +38,7 @@ from zope.tal.talinterpreter import FasterStringIO
from
Products.ERP5Type
import
PropertySheet
from
urllib
import
quote
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
from
Products.ERP5
import
_dtmldir
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
erp5.component.module.OOoUtils
import
OOoBuilder
...
...
@@ -45,6 +46,8 @@ from zipfile import ZipFile, ZIP_DEFLATED
from
cStringIO
import
StringIO
import
re
import
itertools
import
os.path
import
Products.ERP5
try
:
# pylint: disable=no-name-in-module,unused-import
...
...
@@ -58,7 +61,7 @@ from lxml import etree
from
lxml.etree
import
Element
# Constructors
manage_addOOoTemplate
=
DTMLFile
(
"dtml/OOoTemplate_add"
,
globals
()
)
manage_addOOoTemplate
=
DTMLFile
(
"dtml/OOoTemplate_add"
,
_dtmldir
)
def
addOOoTemplate
(
self
,
id
,
title
=
""
,
xml_file_id
=
"content.xml"
,
REQUEST
=
None
):
# pylint: disable=redefined-builtin
"""Add OOo template to folder.
...
...
@@ -145,7 +148,7 @@ class OOoTemplate(Base, ZopePageTemplate):
"""
meta_type
=
"ERP5 OOo Template"
portal_type
=
"OOo Template"
icon
=
"www/OOo.png"
icon
=
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
"www"
,
"OOo.png"
)
# NOTE: 100 is just pure random starting number
# it won't influence the code at all
...
...
@@ -176,8 +179,9 @@ class OOoTemplate(Base, ZopePageTemplate):
)
security
.
declareProtected
(
'View management screens'
,
'formSettings'
)
formSettings
=
PageTemplateFile
(
'www/formSettings'
,
globals
(),
__name__
=
'formSettings'
)
formSettings
=
PageTemplateFile
(
os
.
path
.
join
(
os
.
path
.
dirname
(
Products
.
ERP5
.
__file__
),
'www'
,
'formSettings'
),
__name__
=
'formSettings'
)
formSettings
.
_owner
=
None
def
__init__
(
self
,
id
,
title
=
''
,
*
args
,
**
kw
):
# pylint: disable=redefined-builtin
...
...
product/ERP5/bootstrap/erp5_core/ModuleComponentTemplateItem/portal_components/module.erp5.OOoUtils.py
View file @
59571d6d
...
...
@@ -558,3 +558,6 @@ allow_class(CorruptedOOoFile)
def
newOOoParser
(
container
):
return
OOoParser
().
__of__
(
container
)
from
AccessControl
import
ModuleSecurityInfo
ModuleSecurityInfo
(
__name__
).
declarePublic
(
'OOoParser'
,)
ModuleSecurityInfo
(
__name__
).
declarePublic
(
'newOOoParser'
,)
\ No newline at end of file
product/ERP5
OOo
/dtml/FormPrintout_add.dtml
→
product/ERP5/dtml/FormPrintout_add.dtml
View file @
59571d6d
File moved
product/ERP5
OOo
/dtml/OOoTemplate_add.dtml
→
product/ERP5/dtml/OOoTemplate_add.dtml
View file @
59571d6d
File moved
product/ERP5
OOo
/www/FormPrintout_manageEdit.zpt
→
product/ERP5/www/FormPrintout_manageEdit.zpt
View file @
59571d6d
File moved
product/ERP5
OOo
/www/OOo.png
→
product/ERP5/www/OOo.png
View file @
59571d6d
File moved
product/ERP5
OOo
/www/formSettings.zpt
→
product/ERP5/www/formSettings.zpt
View file @
59571d6d
File moved
product/ERP5
OOo
/www/form_printout_icon.png
→
product/ERP5/www/form_printout_icon.png
View file @
59571d6d
File moved
product/ERP5OOo/Permissions.py
deleted
100644 → 0
View file @
4645e7b4
product/ERP5OOo/tests/OpenDocument-schema-v1.1.rng
deleted
100644 → 0
View file @
4645e7b4
This diff is collapsed.
Click to expand it.
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