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
Yusei Tahara
erp5
Commits
58d5344b
Commit
58d5344b
authored
Mar 05, 2015
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builders: make order builders supporting multiple resource types
parent
e9a2bb9c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
287 deletions
+132
-287
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/DeliveryBuilder_viewPredicateGroupList.xml
...kins/erp5_base/DeliveryBuilder_viewPredicateGroupList.xml
+2
-2
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/DeliveryBuilder_viewPredicateGroupList/my_resource_portal_type.xml
...uilder_viewPredicateGroupList/my_resource_portal_type.xml
+0
-283
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/DeliveryBuilder_viewPredicateGroupList/my_resource_portal_type_list.xml
...r_viewPredicateGroupList/my_resource_portal_type_list.xml
+121
-0
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/DeliveryBuilder/resource_portal_type_property.xml
..._sheets/DeliveryBuilder/resource_portal_type_property.xml
+4
-0
product/ERP5/mixin/builder.py
product/ERP5/mixin/builder.py
+5
-2
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/DeliveryBuilder_viewPredicateGroupList.xml
View file @
58d5344b
...
...
@@ -2,7 +2,7 @@
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5
Form"
module=
"Products.ERP5Form.Form
"
/>
<global
name=
"ERP5
Form"
module=
"erp5.portal_type
"
/>
</pickle>
<pickle>
<dictionary>
...
...
@@ -80,7 +80,7 @@
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
my_resource_portal_type
</string>
<string>
my_resource_portal_type
_list
</string>
</list>
</value>
</item>
...
...
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/DeliveryBuilder_viewPredicateGroupList/my_resource_portal_type.xml
deleted
100644 → 0
View file @
e9a2bb9c
This diff is collapsed.
Click to expand it.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/DeliveryBuilder_viewPredicateGroupList/my_resource_portal_type_list.xml
0 → 100644
View file @
58d5344b
<?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>
title
</string>
<string>
required
</string>
<string>
items
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_resource_portal_type_list
</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>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_parallel_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</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>
Resource Portal Type
</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 here.getPortalResourceTypeList()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/DeliveryBuilder/resource_portal_type_property.xml
View file @
58d5344b
...
...
@@ -43,6 +43,10 @@
<key>
<string>
mode
</string>
</key>
<value>
<string>
w
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
...
...
product/ERP5/mixin/builder.py
View file @
58d5344b
...
...
@@ -202,9 +202,12 @@ class BuilderMixin(XMLObject, Amount, Predicate):
movement
=
newTempMovement
(
self
.
getPortalObject
(),
str
(
id_count
))
id_count
+=
1
resource_portal_type
=
self
.
getResourcePortalType
()
resource_portal_type
_list
=
self
.
getResourcePortalTypeList
()
resource
=
portal
.
portal_catalog
.
getObject
(
inventory_item
.
resource_uid
)
assert
resource
.
getPortalType
()
==
resource_portal_type
resource_portal_type
=
resource
.
getPortalType
()
assert
resource_portal_type
in
(
resource_portal_type_list
),
\
"Builder %r does not support resource of type : %r"
%
(
self
.
getRelativeUrl
(),
resource_portal_type
)
movement
.
edit
(
resource
=
inventory_item
.
resource_relative_url
,
variation_category_list
=
dumb_movement
.
getVariationCategoryList
(),
...
...
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