Most Powerful Open Source ERP

Guideline Never Use Aq_parent To Get Document Parent In Python

Use getParentValue()
  • Last Update:2019-07-15
  • Version:001
  • Language:en

Never Use aq_parent To Get Document Parent In Python

Use the getParentValue() method instead of aq_parent, which is defined on Base class. aq_parent is only useful if you wish to get the acquisition context of an object, which may be different from its physical container. For example, aq_parent is useful to calculate a breadcrumb whenever the acquisition path results from the combination of multiple physical path (ex. web_site_module/a/b/web_page_module/c). Refer to the Zope Developer Guide for more information on acquisition.