Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Eteri
erp5_fork
Commits
f0529181
Commit
f0529181
authored
Feb 05, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prefer _uid over _relative_url for catalog searches
parent
b84c1c64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml
...pts/ProductionOrderLine_setTransformationFromResource.xml
+3
-3
product/ERP5/Document/Resource.py
product/ERP5/Document/Resource.py
+1
-1
No files found.
bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml
View file @
f0529181
...
@@ -54,12 +54,12 @@
...
@@ -54,12 +54,12 @@
\n
\n
if not production_order_line.hasSpecialise():\n
if not production_order_line.hasSpecialise():\n
portal = production_order_line.getPortalObject()\n
portal = production_order_line.getPortalObject()\n
resource
= production_order_line.getResourceValue
()\n
resource
_uid = production_order_line.getResourceUid
()\n
if resource
is not None
:\n
if resource
_uid
:\n
transformation_list = portal.portal_catalog(\n
transformation_list = portal.portal_catalog(\n
portal_type=portal.getPortalTransformationTypeList(),\n
portal_type=portal.getPortalTransformationTypeList(),\n
validation_state="!=invalidated",\n
validation_state="!=invalidated",\n
resource_relative_url=resource.getRelativeUrl()
)\n
default_resource_uid=resource_uid
)\n
if len(transformation_list) == 1:\n
if len(transformation_list) == 1:\n
transformation = transformation_list[0].getRelativeUrl()\n
transformation = transformation_list[0].getRelativeUrl()\n
production_order_line.setSpecialise(transformation)\n
production_order_line.setSpecialise(transformation)\n
...
...
product/ERP5/Document/Resource.py
View file @
f0529181
...
@@ -291,7 +291,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
...
@@ -291,7 +291,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
if
context
is
None
:
if
context
is
None
:
transformation_list
=
self
.
portal_catalog
(
transformation_list
=
self
.
portal_catalog
(
portal_type
=
"Transformation"
,
portal_type
=
"Transformation"
,
resource_relative_url
=
self
.
getRelativeUrl
(),
default_resource_uid
=
self
.
getUid
(),
sort_on
=
[(
'version'
,
'descending'
)],
sort_on
=
[(
'version'
,
'descending'
)],
limit
=
1
limit
=
1
)
)
...
...
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