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
Laurent S
erp5
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
Hide 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 @@
\n
if not production_order_line.hasSpecialise():\n
portal = production_order_line.getPortalObject()\n
resource
= production_order_line.getResourceValue
()\n
if resource
is not None
:\n
resource
_uid = production_order_line.getResourceUid
()\n
if resource
_uid
:\n
transformation_list = portal.portal_catalog(\n
portal_type=portal.getPortalTransformationTypeList(),\n
validation_state="!=invalidated",\n
resource_relative_url=resource.getRelativeUrl()
)\n
default_resource_uid=resource_uid
)\n
if len(transformation_list) == 1:\n
transformation = transformation_list[0].getRelativeUrl()\n
production_order_line.setSpecialise(transformation)\n
...
...
product/ERP5/Document/Resource.py
View file @
f0529181
...
...
@@ -291,7 +291,7 @@ class Resource(XMLObject, XMLMatrix, VariatedMixin):
if
context
is
None
:
transformation_list
=
self
.
portal_catalog
(
portal_type
=
"Transformation"
,
resource_relative_url
=
self
.
getRelativeUrl
(),
default_resource_uid
=
self
.
getUid
(),
sort_on
=
[(
'version'
,
'descending'
)],
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