Most Powerful Open Source ERP

Guideline Set List Method To contentValues On Document Form Listboxes

Subobjects should be displayed.
  • Last Update:2017-04-07
  • Version:001
  • Language:en

Set List Method To contentValues On Document Form Listboxes

If the form contains a listbox, the corresponding "List Method" will be most of the time contentValues.

Generally we want to display sub documents. If you are not displaying sub objects but related objects, you will need to define another List Method, often category accessor, like getSourceProjectRelatedValueList.
In "default parameters" you have to specify "checked_permission | View" so that contentValues does not display sub-documents on which the user does not have the View permission.
searchFolder method uses SQL catalog to get documents so if the number of subdocuments is known to be small, it's usually faster to use contentValues directly; contentValues gets documents from Zope's object database.

Good Example:

Bad Example: