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
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
Tomáš Peterka
erp5
Commits
2b7e8701
Commit
2b7e8701
authored
Jan 09, 2014
by
Aurel
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into test_page
parents
6431f953
5ec2f886
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
695 additions
and
48 deletions
+695
-48
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/account_statement_export.xml
...lateItem/portal_types/Person/account_statement_export.xml
+1
-1
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/account_statement_report.xml
...lateItem/portal_types/Person/account_statement_report.xml
+1
-1
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/general_ledger_export.xml
...emplateItem/portal_types/Person/general_ledger_export.xml
+1
-1
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/general_ledger_report.xml
...emplateItem/portal_types/Person/general_ledger_report.xml
+1
-1
bt5/erp5_accounting/bt/revision
bt5/erp5_accounting/bt/revision
+1
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewDetails/listbox_start_date.xml
...skins/erp5_base/Person_viewDetails/listbox_start_date.xml
+26
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewDetails/listbox_stop_date.xml
..._skins/erp5_base/Person_viewDetails/listbox_stop_date.xml
+26
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewDetails/listbox_title.xml
...rtal_skins/erp5_base/Person_viewDetails/listbox_title.xml
+37
-12
bt5/erp5_base/bt/revision
bt5/erp5_base/bt/revision
+1
-1
bt5/erp5_configurator_standard_trade_template/PathTemplateItem/portal_rules/new_delivery_simulation_rule/journal_tester.xml
...tal_rules/new_delivery_simulation_rule/journal_tester.xml
+80
-0
bt5/erp5_configurator_standard_trade_template/PathTemplateItem/portal_rules/new_order_root_simulation_rule/journal_tester.xml
...l_rules/new_order_root_simulation_rule/journal_tester.xml
+80
-0
bt5/erp5_configurator_standard_trade_template/bt/revision
bt5/erp5_configurator_standard_trade_template/bt/revision
+1
-1
bt5/erp5_project/PathTemplateItem/portal_deliveries/task_report_builder/category_movement_group_on_delivery.xml
...sk_report_builder/category_movement_group_on_delivery.xml
+1
-0
bt5/erp5_project/bt/revision
bt5/erp5_project/bt/revision
+1
-1
bt5/erp5_research_item/SkinTemplateItem/portal_skins/erp5_research_item/ResearchItemModule_callResearchSummaryReport.xml
...rch_item/ResearchItemModule_callResearchSummaryReport.xml
+13
-10
bt5/erp5_research_item/TestTemplateItem/portal_components/test.erp5.testResearchItemSummaryReport.py
...tal_components/test.erp5.testResearchItemSummaryReport.py
+168
-0
bt5/erp5_research_item/TestTemplateItem/portal_components/test.erp5.testResearchItemSummaryReport.xml
...al_components/test.erp5.testResearchItemSummaryReport.xml
+150
-0
bt5/erp5_research_item/bt/revision
bt5/erp5_research_item/bt/revision
+1
-1
bt5/erp5_research_item/bt/template_test_id_list
bt5/erp5_research_item/bt/template_test_id_list
+1
-0
bt5/erp5_research_item/bt/test_dependency_list
bt5/erp5_research_item/bt/test_dependency_list
+5
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InternalTradeCondition_view/listbox.xml
..._skins/erp5_trade/InternalTradeCondition_view/listbox.xml
+20
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PurchaseTradeCondition_view/listbox.xml
..._skins/erp5_trade/PurchaseTradeCondition_view/listbox.xml
+20
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SaleTradeCondition_view/listbox.xml
...rtal_skins/erp5_trade/SaleTradeCondition_view/listbox.xml
+20
-0
bt5/erp5_trade/bt/revision
bt5/erp5_trade/bt/revision
+1
-1
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+3
-1
product/ERP5/tests/testTaskReporting.py
product/ERP5/tests/testTaskReporting.py
+7
-1
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+11
-10
product/ERP5Type/tests/runUnitTest.py
product/ERP5Type/tests/runUnitTest.py
+17
-2
No files found.
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/account_statement_export.xml
View file @
2b7e8701
...
...
@@ -77,7 +77,7 @@
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/
accounting_module/
AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
string:${object_url}/AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
]]>
</string>
</value>
</item>
...
...
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/account_statement_report.xml
View file @
2b7e8701
...
...
@@ -75,7 +75,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/
accounting_module/
AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}
</string>
</value>
<value>
<string>
string:${object_url}/AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/general_ledger_export.xml
View file @
2b7e8701
...
...
@@ -77,7 +77,7 @@
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/
accounting_module/
AccountModule_viewGeneralLedgerReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
string:${object_url}/AccountModule_viewGeneralLedgerReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
]]>
</string>
</value>
</item>
...
...
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/general_ledger_report.xml
View file @
2b7e8701
...
...
@@ -75,7 +75,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/
accounting_module/
AccountModule_viewGeneralLedgerReportDialog?mirror_section=${object/getRelativeUrl}
</string>
</value>
<value>
<string>
string:${object_url}/AccountModule_viewGeneralLedgerReportDialog?mirror_section=${object/getRelativeUrl}
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_accounting/bt/revision
View file @
2b7e8701
1557
\ No newline at end of file
1558
\ No newline at end of file
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewDetails/listbox_start_date.xml
View file @
2b7e8701
...
...
@@ -9,7 +9,9 @@
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
...
...
@@ -50,6 +52,12 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -69,6 +77,10 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_start_date
</string>
</value>
...
...
@@ -87,4 +99,17 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.Base_checkPermission(cell.getRelativeUrl(), "Modify portal content")
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewDetails/listbox_stop_date.xml
View file @
2b7e8701
...
...
@@ -9,7 +9,9 @@
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
...
...
@@ -50,6 +52,12 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -69,6 +77,10 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_stop_date
</string>
</value>
...
...
@@ -87,4 +99,17 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.Base_checkPermission(cell.getRelativeUrl(), "Modify portal content")
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_viewDetails/listbox_title.xml
View file @
2b7e8701
...
...
@@ -9,7 +9,9 @@
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
...
...
@@ -56,6 +58,12 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -75,6 +83,10 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_title
</string>
</value>
...
...
@@ -124,37 +136,37 @@
<item>
<key>
<string>
ampm
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
day
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
U
=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
hour
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
U
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Y
=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
minute
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Y
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
c
=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
month
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
c
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
g
=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
year
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
g
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
k
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -227,6 +239,19 @@
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.Base_checkPermission(cell.getRelativeUrl(), "Modify portal content")
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<tuple>
<tuple>
...
...
@@ -489,7 +514,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
5"
aka=
"AAAAAAAAAAU
="
>
<pickle>
<tuple>
<tuple>
...
...
@@ -744,7 +769,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
5"
aka=
"AAAAAAAAAAU
="
>
<record
id=
"
6"
aka=
"AAAAAAAAAAY
="
>
<pickle>
<tuple>
<tuple>
...
...
@@ -999,7 +1024,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
6"
aka=
"AAAAAAAAAAY
="
>
<record
id=
"
7"
aka=
"AAAAAAAAAAc
="
>
<pickle>
<tuple>
<tuple>
...
...
@@ -1254,7 +1279,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
7"
aka=
"AAAAAAAAAAc
="
>
<record
id=
"
8"
aka=
"AAAAAAAAAAg
="
>
<pickle>
<tuple>
<tuple>
...
...
@@ -1509,7 +1534,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
8"
aka=
"AAAAAAAAAAg
="
>
<record
id=
"
9"
aka=
"AAAAAAAAAAk
="
>
<pickle>
<tuple>
<tuple>
...
...
bt5/erp5_base/bt/revision
View file @
2b7e8701
1059
\ No newline at end of file
1060
bt5/erp5_configurator_standard_trade_template/PathTemplateItem/portal_rules/new_delivery_simulation_rule/journal_tester.xml
0 → 100644
View file @
2b7e8701
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category Membership Divergence Tester"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
journal_tester
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category Membership Divergence Tester
</string>
</value>
</item>
<item>
<key>
<string>
tested_property
</string>
</key>
<value>
<tuple>
<string>
journal
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
journal divergence tester
</string>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_configurator_standard_trade_template/PathTemplateItem/portal_rules/new_order_root_simulation_rule/journal_tester.xml
0 → 100644
View file @
2b7e8701
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category Membership Divergence Tester"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
journal_tester
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category Membership Divergence Tester
</string>
</value>
</item>
<item>
<key>
<string>
tested_property
</string>
</key>
<value>
<tuple>
<string>
journal
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
journal divergence tester
</string>
</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/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_configurator_standard_trade_template/bt/revision
View file @
2b7e8701
1
\ No newline at end of file
3
\ No newline at end of file
bt5/erp5_project/PathTemplateItem/portal_deliveries/task_report_builder/category_movement_group_on_delivery.xml
View file @
2b7e8701
...
...
@@ -41,6 +41,7 @@
<string>
destination
</string>
<string>
source_section
</string>
<string>
destination_section
</string>
<string>
journal
</string>
<string>
source_project
</string>
<string>
destination_project
</string>
<string>
source_payment
</string>
...
...
bt5/erp5_project/bt/revision
View file @
2b7e8701
837
\ No newline at end of file
838
\ No newline at end of file
bt5/erp5_research_item/SkinTemplateItem/portal_skins/erp5_research_item/ResearchItemModule_callResearchSummaryReport.xml
View file @
2b7e8701
...
...
@@ -63,7 +63,6 @@ if multiplier is None:\n
\n
portal = context.getPortalObject()\n
\n
portal = context.getPortalObject()\n
simulation_state_set = set(simulation_state_list)\n
# We will use inventory API in order to find all quantities\n
before_confirmed_task_state_set = set(portal.getPortalPlannedOrderStateList() + \\\n
...
...
@@ -150,14 +149,18 @@ column_url_script_list = []\n
for item_url in item_title_dict.keys():\n
column_url_script_list.append((item_url, "getColumnUrl"))\n
\n
context = context.asContext(column_list=column_list,\n
at_date=at_date,\n
from_date=from_date,\n
simulation_state_list=simulation_state_list,\n
column_url_script_list=column_url_script_list,\n
journal=journal,\n
multiplier=multiplier,\n
listbox_line_list=listbox_line_list)\n
context_kw = {}\n
context_kw.update(column_list=column_list,\n
at_date=at_date,\n
from_date=from_date,\n
simulation_state_list=simulation_state_list,\n
column_url_script_list=column_url_script_list,\n
journal=journal,\n
multiplier=multiplier,\n
listbox_line_list=listbox_line_list)\n
context = context.getObject().asContext(**context_kw)\n
if batch_mode:\n
return context\n
return context.ResearchItemModule_viewResearchSummaryReportData()\n
...
...
@@ -165,7 +168,7 @@ return context.ResearchItemModule_viewResearchSummaryReportData()\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
at_date=None, from_date=None, simulation_state_list=None, journal=None, multiplier=None, **kw
</string>
</value>
<value>
<string>
at_date=None, from_date=None, simulation_state_list=None, journal=None, multiplier=None,
batch_mode=False,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_research_item/TestTemplateItem/portal_components/test.erp5.testResearchItemSummaryReport.py
0 → 100644
View file @
2b7e8701
##############################################################################
#
# Copyright (c) 2002-2013 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
DateTime
import
DateTime
from
Products.ERP5.tests.testTaskReporting
import
TestTaskReportingMixin
class
TestResearchItemSummaryReport
(
TestTaskReportingMixin
):
"""
Test Research Items Reports
"""
def
getTitle
(
self
):
return
"ResearchItemSummaryReport"
def
afterSetUp
(
self
):
"""Make sure to initialize needed categories
"""
super
(
TestResearchItemSummaryReport
,
self
).
afterSetUp
()
journal_base_category
=
self
.
portal
.
portal_categories
.
journal
for
category_id
in
(
"operation"
,
"research"
):
if
not
journal_base_category
.
has_key
(
category_id
):
journal_base_category
.
newContent
(
portal_type
=
'Category'
,
title
=
category_id
.
title
(),
reference
=
category_id
,
id
=
category_id
)
# create items
if
not
self
.
portal
.
research_item_module
.
has_key
(
'Item_1'
):
self
.
portal
.
research_item_module
.
newContent
(
title
=
"Item_1"
,
id
=
"Item_1"
,
portal_type
=
"Research Item"
)
if
not
self
.
portal
.
research_item_module
.
has_key
(
'Item_2'
):
self
.
portal
.
research_item_module
.
newContent
(
title
=
"Item_2"
,
id
=
"Item_2"
,
portal_type
=
"Research Item"
)
def
getBusinessTemplateList
(
self
):
"""
Tuple of Business Templates we need to install
"""
bt_list
=
super
(
TestResearchItemSummaryReport
,
self
).
getBusinessTemplateList
()
return
list
(
bt_list
)
+
[
"erp5_research_item"
]
def
_makeOneTask
(
self
,
**
kw
):
task
=
super
(
TestResearchItemSummaryReport
,
self
).
_makeOneTask
(
resource
=
'product_module/development'
,
source_section
=
'organisation_module/Organisation_1'
,
destination
=
'organisation_module/Organisation_2'
,
destination_section
=
'organisation_module/Organisation_2'
,
source_project
=
'project_module/Project_1/Line_1'
,
start_date
=
DateTime
(
'2013/01/10'
),
stop_date
=
DateTime
(
'2013/02/15'
),
journal
=
"research"
,
simulation_state
=
"confirmed"
,
**
kw
)
return
task
def
testResearchSummaryReport
(
self
):
"""
Test research summary report available on item research module
"""
report
=
self
.
portal
.
research_item_module
.
ResearchItemModule_callResearchSummaryReport
def
callReport
():
return
report
(
from_date
=
from_date
,
at_date
=
at_date
,
batch_mode
=
True
,
journal
=
"research"
,
simulation_state_list
=
[
"confirmed"
])
def
getDataResult
(
result
):
data_list
=
[]
column_id_list
=
[
x
[
0
]
for
x
in
result
.
column_list
]
self
.
assertEquals
(
column_id_list
[
0
],
"source_title"
)
self
.
assertEquals
(
column_id_list
[
-
1
],
"total"
)
column_id_list
.
pop
(
0
)
column_id_list
.
pop
(
-
1
)
column_id_list
.
sort
()
column_id_list
=
[
"source_title"
]
+
column_id_list
+
[
"total"
]
for
line
in
result
.
listbox_line_list
:
line_data
=
[]
for
property_name
in
column_id_list
:
line_data
.
append
(
line
.
getProperty
(
property_name
))
data_list
.
append
(
line_data
)
data_list
.
sort
(
key
=
lambda
x
:
x
[
0
])
column_list
=
[
x
for
x
in
result
.
column_list
]
column_list
.
sort
(
key
=
lambda
x
:
column_id_list
.
index
(
x
[
0
]))
return
[
x
[
1
]
for
x
in
column_list
],
data_list
# First call it when it is empty
from_date
=
DateTime
(
"2013/01/01"
)
at_date
=
DateTime
(
"2014/01/01"
)
result
=
callReport
()
# Initially we should have only one line for an empty total
self
.
assertEquals
(([
"Worker"
,
"Total"
],
[[
"Total"
,
None
]]),
getDataResult
(
result
))
# Then create one task with no item, see if we it is displayed in the report
self
.
_makeOneTask
(
title
=
'Task 1'
,
task_line_quantity
=
3
,
source
=
'person_module/Person_1'
,
)
result
=
callReport
()
self
.
assertEquals
(([
"Worker"
,
"undefined"
,
"Total"
],
[[
"Person_1"
,
3
,
3
],
[
"Total"
,
3
,
3
]]),
getDataResult
(
result
))
# Then create one task with item, see if we it is displayed in the report
self
.
_makeOneTask
(
title
=
'Task 2'
,
task_line_quantity
=
5.2
,
source
=
'person_module/Person_2'
,
line_aggregate_relative_url
=
'research_item_module/Item_1'
,
)
result
=
callReport
()
self
.
assertEquals
(([
"Worker"
,
"undefined"
,
"Item_1"
,
"Total"
],
[[
"Person_1"
,
3
,
None
,
3
],
[
"Person_2"
,
None
,
5.2
,
5.2
],
[
"Total"
,
3
,
5.2
,
8.2
]]),
getDataResult
(
result
))
# 3 additional tasks to check sums
self
.
_makeOneTask
(
title
=
'Task 3'
,
task_line_quantity
=
2.4
,
source
=
'person_module/Person_2'
,
line_aggregate_relative_url
=
'research_item_module/Item_1'
,
)
self
.
_makeOneTask
(
title
=
'Task 4'
,
task_line_quantity
=
1.7
,
source
=
'person_module/Person_1'
,
line_aggregate_relative_url
=
'research_item_module/Item_2'
,
)
self
.
_makeOneTask
(
title
=
'Task 5'
,
task_line_quantity
=
0.9
,
source
=
'person_module/Person_2'
,
line_aggregate_relative_url
=
'research_item_module/Item_2'
,
)
result
=
callReport
()
self
.
assertEquals
(([
"Worker"
,
"undefined"
,
"Item_1"
,
"Item_2"
,
"Total"
],
[[
"Person_1"
,
3
,
None
,
1.7
,
4.7
],
[
"Person_2"
,
None
,
7.6
,
0.9
,
8.5
],
[
"Total"
,
3
,
7.6
,
2.6
,
13.2
]]),
getDataResult
(
result
))
bt5/erp5_research_item/TestTemplateItem/portal_components/test.erp5.testResearchItemSummaryReport.xml
0 → 100644
View file @
2b7e8701
<?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>
testResearchItemSummaryReport
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testResearchItemSummaryReport
</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.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
seb
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1385030033.93
</float>
<string>
GMT+1
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_research_item/bt/revision
View file @
2b7e8701
6
\ No newline at end of file
8
\ No newline at end of file
bt5/erp5_research_item/bt/template_test_id_list
0 → 100644
View file @
2b7e8701
test.erp5.testResearchItemSummaryReport
\ No newline at end of file
bt5/erp5_research_item/bt/test_dependency_list
0 → 100644
View file @
2b7e8701
erp5_full_text_myisam_catalog
erp5_simulation
erp5_configurator_standard_trade_template
erp5_simulation_test
erp5_project
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InternalTradeCondition_view/listbox.xml
View file @
2b7e8701
...
...
@@ -85,6 +85,26 @@
<string>
resource_title
</string>
<string>
Product or Service
</string>
</tuple>
<tuple>
<string>
priced_quantity
</string>
<string>
Priced Quantity
</string>
</tuple>
<tuple>
<string>
base_price
</string>
<string>
Base Price
</string>
</tuple>
<tuple>
<string>
additional_price
</string>
<string>
Additional Price
</string>
</tuple>
<tuple>
<string>
discount_ratio
</string>
<string>
Discount Ratio
</string>
</tuple>
<tuple>
<string>
surcharge_ratio
</string>
<string>
Surcharge Ratio
</string>
</tuple>
</list>
</value>
</item>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PurchaseTradeCondition_view/listbox.xml
View file @
2b7e8701
...
...
@@ -85,6 +85,26 @@
<string>
resource_title
</string>
<string>
Product or Service
</string>
</tuple>
<tuple>
<string>
priced_quantity
</string>
<string>
Priced Quantity
</string>
</tuple>
<tuple>
<string>
base_price
</string>
<string>
Base Price
</string>
</tuple>
<tuple>
<string>
additional_price
</string>
<string>
Additional Price
</string>
</tuple>
<tuple>
<string>
discount_ratio
</string>
<string>
Discount Ratio
</string>
</tuple>
<tuple>
<string>
surcharge_ratio
</string>
<string>
Surcharge Ratio
</string>
</tuple>
</list>
</value>
</item>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SaleTradeCondition_view/listbox.xml
View file @
2b7e8701
...
...
@@ -85,6 +85,26 @@
<string>
resource_title
</string>
<string>
Product or Service
</string>
</tuple>
<tuple>
<string>
priced_quantity
</string>
<string>
Priced Quantity
</string>
</tuple>
<tuple>
<string>
base_price
</string>
<string>
Base Price
</string>
</tuple>
<tuple>
<string>
additional_price
</string>
<string>
Additional Price
</string>
</tuple>
<tuple>
<string>
discount_ratio
</string>
<string>
Discount Ratio
</string>
</tuple>
<tuple>
<string>
surcharge_ratio
</string>
<string>
Surcharge Ratio
</string>
</tuple>
</list>
</value>
</item>
...
...
bt5/erp5_trade/bt/revision
View file @
2b7e8701
1175
\ No newline at end of file
1176
\ No newline at end of file
product/ERP5/Document/BusinessTemplate.py
View file @
2b7e8701
...
...
@@ -5784,7 +5784,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
"""
missing_dep_list
=
self
.
getMissingDependencyList
()
if
len
(
missing_dep_list
)
!=
0
:
raise
BusinessTemplateMissingDependency
,
'Impossible to install, please install the following dependencies before: %s'
%
repr
(
missing_dep_list
)
raise
BusinessTemplateMissingDependency
,
\
'Impossible to install %s, please install the following dependencies before: %s'
\
%
(
self
.
getTitle
(),
repr
(
missing_dep_list
))
def
getMissingDependencyList
(
self
):
"""
...
...
product/ERP5/tests/testTaskReporting.py
View file @
2b7e8701
...
...
@@ -44,15 +44,21 @@ class TestTaskReportingMixin(ERP5ReportTestCase):
'erp5_project'
,
'erp5_simulation_test'
)
@
reindex
def
_makeOneTask
(
self
,
simulation_state
=
'planned'
,
**
kw
):
def
_makeOneTask
(
self
,
simulation_state
=
'planned'
,
line_aggregate_relative_url
=
None
,
**
kw
):
"""Create a task, support many options"""
task
=
self
.
portal
.
task_module
.
newContent
(
portal_type
=
'Task'
,
specialise
=
self
.
business_process
)
task
.
_edit
(
**
kw
)
if
line_aggregate_relative_url
:
task_line
,
=
task
.
objectValues
(
portal_type
=
"Task Line"
)
task_line
.
setAggregate
(
line_aggregate_relative_url
)
if
simulation_state
==
'planned'
:
task
.
plan
()
if
simulation_state
==
'confirmed'
:
task
.
confirm
()
return
task
def
afterSetUp
(
self
):
"""Setup the fixture.
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
2b7e8701
...
...
@@ -731,6 +731,16 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
return
sorted
([
str
(
message
.
getMessage
())
for
message
in
obj
.
checkConsistency
()
])
def
_callSetUpOnce
(
self
):
setup_once
=
getattr
(
self
,
'setUpOnce'
,
None
)
if
setup_once
is
not
None
and
\
not
getattr
(
self
.
portal
,
'set_up_once_called'
,
0
):
self
.
portal
.
set_up_once_called
=
1
ZopeTestCase
.
_print
(
'Executing setUpOnce ... '
)
start
=
time
.
time
()
setup_once
()
ZopeTestCase
.
_print
(
'done (%.3fs)
\
n
'
%
(
time
.
time
()
-
start
))
class
ERP5TypeCommandLineTestCase
(
ERP5TypeTestCaseMixin
):
def
getPortalName
(
self
):
...
...
@@ -1073,16 +1083,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
'Assignor'
,
'Author'
,
'Auditor'
,
'Associate'
],
[])
user
=
uf
.
getUserById
(
'ERP5TypeTestCase'
).
__of__
(
uf
)
setup_once
=
getattr
(
self
,
'setUpOnce'
,
None
)
if
setup_once
is
not
None
and
\
not
getattr
(
portal
,
'set_up_once_called'
,
0
):
portal
.
set_up_once_called
=
1
if
not
quiet
:
ZopeTestCase
.
_print
(
'Executing setUpOnce ... '
)
start
=
time
.
time
()
setup_once
()
if
not
quiet
:
ZopeTestCase
.
_print
(
'done (%.3fs)
\
n
'
%
(
time
.
time
()
-
start
))
self
.
_callSetUpOnce
()
# Enable reindexing
# Do hot reindexing # Does not work
...
...
product/ERP5Type/tests/runUnitTest.py
View file @
2b7e8701
...
...
@@ -10,6 +10,7 @@ import signal
import
shutil
import
errno
import
random
import
transaction
from
glob
import
glob
import
backportUnittest
...
...
@@ -303,10 +304,16 @@ class ERP5TypeTestLoader(unittest.TestLoader):
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
ERP5TypeLiveTestCase
class
ComponentTestCase
(
ERP5TypeLiveTestCase
):
def
setUp
(
self
):
super
(
ComponentTestCase
,
self
).
setUp
()
self
.
_callSetUpOnce
()
# Bootstrap has been done in loadTestsFromNames, so the test can now
# be loaded like any Live Test on a real instance
if
ERP5TypeLive
TestCase
not
in
ERP5TypeTestCase
.
__bases__
:
ERP5TypeTestCase
.
__bases__
=
ERP5TypeLive
TestCase
,
if
Component
TestCase
not
in
ERP5TypeTestCase
.
__bases__
:
ERP5TypeTestCase
.
__bases__
=
Component
TestCase
,
# TestLoader() does not perform any import so import the Module manually
module
=
__import__
(
'erp5.component.test'
,
...
...
@@ -675,6 +682,14 @@ def runUnitTestList(test_list, verbosity=1, debug=0, run_only=None):
root_logger
.
handlers
.
append
(
loghandler
.
StreamHandler
(
sys
.
stderr
))
_print
(
'done (%.3fs)
\
n
'
%
(
time
.
time
()
-
_start
))
result
=
TestRunner
(
verbosity
=
verbosity
).
run
(
suite
)
transaction
.
commit
()
except
:
import
traceback
print
"runUnitTestList Exception : %r"
%
(
traceback
.
print_exc
(),)
# finally does not expect opened transaction, even in the
# case of a Ctrl-C.
transaction
.
abort
()
raise
finally
:
ProcessingNodeTestCase
.
unregisterNode
()
Storage
.
close
()
...
...
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