Commit 138cbced authored by Nicolas Delaby's avatar Nicolas Delaby

Much better with or.

This enable listing of quantity_unit item list on 'Update Lines' fast input.
because resource is defined on line, so there is no need to querying for a new resource (first condition)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3eef7a32
......@@ -70,7 +70,7 @@ resource_title = request.form.get("field_listbox_title_%s" % context.getUid())\n
resource_reference = request.form.get("field_listbox_reference_%s" % context.getUid())\n
resource_value = context.getResourceValue()\n
result = [(\'\', \'\')]\n
if (resource_title or resource_reference) and resource_value is not None:\n
if (resource_title or resource_reference) or resource_value is not None:\n
quantity_unit_list = [(x.getLogicalPath(), x.getCategoryRelativeUrl(base=0))\n
for x in resource_value.getQuantityUnitValueList()]\n
# return the first quantity_unit item of resource\n
......
1044
\ No newline at end of file
1045
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment