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
Xavier Thompson
erp5
Commits
458ae10c
Commit
458ae10c
authored
Mar 10, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade: allow setting function and funding by trade model path
parent
00c4a1f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
750 additions
and
0 deletions
+750
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile.xml
...em/portal_skins/erp5_trade/TradeModelPath_viewProfile.xml
+4
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_destination_function_title.xml
...deModelPath_viewProfile/my_destination_function_title.xml
+184
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_destination_funding_title.xml
...adeModelPath_viewProfile/my_destination_funding_title.xml
+184
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_source_function_title.xml
...e/TradeModelPath_viewProfile/my_source_function_title.xml
+184
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_source_funding_title.xml
...de/TradeModelPath_viewProfile/my_source_funding_title.xml
+184
-0
product/ERP5/tests/testBPMCore.py
product/ERP5/tests/testBPMCore.py
+10
-0
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile.xml
View file @
458ae10c
...
...
@@ -81,6 +81,8 @@
<string>
my_source_project_title
</string>
<string>
my_source_reference
</string>
<string>
my_source_carrier_title
</string>
<string>
my_source_function_title
</string>
<string>
my_source_funding_title
</string>
</list>
</value>
</item>
...
...
@@ -97,6 +99,8 @@
<string>
my_destination_project_title
</string>
<string>
my_destination_reference
</string>
<string>
my_destination_carrier_title
</string>
<string>
my_destination_function_title
</string>
<string>
my_destination_funding_title
</string>
</list>
</value>
</item>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_destination_function_title.xml
0 → 100644
View file @
458ae10c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
portal_type
</string>
<string>
proxy_listbox_ids
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_destination_function_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_destination_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewTradeFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<list>
<tuple>
<string>
Organisation
</string>
<string>
Organisation
</string>
</tuple>
<tuple>
<string>
Person
</string>
<string>
Person
</string>
</tuple>
<tuple>
<string>
Account
</string>
<string>
Account
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<list>
<tuple>
<string>
Base_viewRelatedObjectListBase/listbox
</string>
<string>
All
</string>
</tuple>
<tuple>
<string>
ActivityModule_viewAActivityList/listbox
</string>
<string>
Activities
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewClientNodeList/listbox
</string>
<string>
Clients
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewSupplierNodeList/listbox
</string>
<string>
Suppliers
</string>
</tuple>
<tuple>
<string>
OrganisationModule_viewOrganisationList/listbox
</string>
<string>
Organisations
</string>
</tuple>
<tuple>
<string>
PersonModule_viewPersonList/listbox
</string>
<string>
Persons
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Destination Function
</string>
</value>
</item>
</dictionary>
</value>
</item>
</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: [(x, x) for x in context.getPortalNodeTypeList()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_destination_funding_title.xml
0 → 100644
View file @
458ae10c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
portal_type
</string>
<string>
proxy_listbox_ids
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_destination_funding_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_destination_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewTradeFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<list>
<tuple>
<string>
Organisation
</string>
<string>
Organisation
</string>
</tuple>
<tuple>
<string>
Person
</string>
<string>
Person
</string>
</tuple>
<tuple>
<string>
Account
</string>
<string>
Account
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<list>
<tuple>
<string>
Base_viewRelatedObjectListBase/listbox
</string>
<string>
All
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewClientNodeList/listbox
</string>
<string>
Clients
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewSupplierNodeList/listbox
</string>
<string>
Suppliers
</string>
</tuple>
<tuple>
<string>
OrganisationModule_viewOrganisationList/listbox
</string>
<string>
Organisations
</string>
</tuple>
<tuple>
<string>
PersonModule_viewPersonList/listbox
</string>
<string>
Persons
</string>
</tuple>
<tuple>
<string>
AccountModule_viewAccountList/listbox
</string>
<string>
Accounts
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Destination Funding
</string>
</value>
</item>
</dictionary>
</value>
</item>
</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: [(x, x) for x in context.getPortalNodeTypeList()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_source_function_title.xml
0 → 100644
View file @
458ae10c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
portal_type
</string>
<string>
proxy_listbox_ids
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_source_function_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_source_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewTradeFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<list>
<tuple>
<string>
Organisation
</string>
<string>
Organisation
</string>
</tuple>
<tuple>
<string>
Person
</string>
<string>
Person
</string>
</tuple>
<tuple>
<string>
Account
</string>
<string>
Account
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<list>
<tuple>
<string>
Base_viewRelatedObjectListBase/listbox
</string>
<string>
All
</string>
</tuple>
<tuple>
<string>
ActivityModule_viewAActivityList/listbox
</string>
<string>
Activities
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewClientNodeList/listbox
</string>
<string>
Clients
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewSupplierNodeList/listbox
</string>
<string>
Suppliers
</string>
</tuple>
<tuple>
<string>
OrganisationModule_viewOrganisationList/listbox
</string>
<string>
Organisations
</string>
</tuple>
<tuple>
<string>
PersonModule_viewPersonList/listbox
</string>
<string>
Persons
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Source Function
</string>
</value>
</item>
</dictionary>
</value>
</item>
</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: [(x, x) for x in context.getPortalNodeTypeList()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/TradeModelPath_viewProfile/my_source_funding_title.xml
0 → 100644
View file @
458ae10c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
portal_type
</string>
<string>
proxy_listbox_ids
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_source_funding_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_source_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewTradeFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<list>
<tuple>
<string>
Organisation
</string>
<string>
Organisation
</string>
</tuple>
<tuple>
<string>
Person
</string>
<string>
Person
</string>
</tuple>
<tuple>
<string>
Account
</string>
<string>
Account
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
proxy_listbox_ids
</string>
</key>
<value>
<list>
<tuple>
<string>
Base_viewRelatedObjectListBase/listbox
</string>
<string>
All
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewSupplierNodeList/listbox
</string>
<string>
Suppliers
</string>
</tuple>
<tuple>
<string>
ERP5Site_viewClientNodeList/listbox
</string>
<string>
Clients
</string>
</tuple>
<tuple>
<string>
OrganisationModule_viewOrganisationList/listbox
</string>
<string>
Organisations
</string>
</tuple>
<tuple>
<string>
PersonModule_viewPersonList/listbox
</string>
<string>
Persons
</string>
</tuple>
<tuple>
<string>
AccountModule_viewAccountList/listbox
</string>
<string>
Accounts
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Source Funding
</string>
</value>
</item>
</dictionary>
</value>
</item>
</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: [(x, x) for x in context.getPortalNodeTypeList()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/tests/testBPMCore.py
View file @
458ae10c
...
...
@@ -385,13 +385,23 @@ class TestBPMImplementation(TestBPMDummyDeliveryMovementMixin):
portal_type
=
'Organisation'
)
source_section_node
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
source_function_node
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
source_funding_node
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
)
business_link
=
self
.
createBusinessLink
()
business_link
.
setSourceValue
(
source_node
)
business_link
.
setSourceSectionValue
(
source_section_node
)
business_link
.
setSourceFunctionValue
(
source_function_node
)
business_link
.
setSourceFundingValue
(
source_funding_node
)
self
.
assertEqual
([
source_node
],
business_link
.
getSourceValueList
())
self
.
assertEqual
([
source_node
.
getRelativeUrl
()],
business_link
.
getSourceList
())
self
.
assertEqual
(
source_node
.
getRelativeUrl
(),
business_link
.
getSource
(
default
=
'something'
))
self
.
assertEqual
([
source_section_node
],
business_link
.
getSourceSectionValueList
())
self
.
assertEqual
([
source_function_node
],
business_link
.
getSourceFunctionValueList
())
self
.
assertEqual
([
source_funding_node
],
business_link
.
getSourceFundingValueList
())
def
test_EmptyBusinessLinkStandardCategoryAccessProvider
(
self
):
business_link
=
self
.
createBusinessLink
()
...
...
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