Most Powerful Open Source ERP

Technical Note on the Accessor Grammar

Technical Note with overview of the grammar used when working with accessors.
  • Last Update:2018-04-11
  • Version:001
  • Language:en

This note defines accessors and the grammar used to write them to provide a lookup reference or cheat sheet when working with accessors in ERP5.

Table of Contents

Accesors Explained

Accessors are functions dynamically generated on objects to access the member properties defined in PropertySheets. They also can access properties with complex relations to current object (like the default address of a related assignment of a person).

Base elements

Those elements serve as a base to the grammar definition.


  lowercase               ::= "a"..."z"
  digit                   ::= "0"..."9"
  property_id             ::= lowercase (lowercase | "_")*
  private                 ::= "_"
  getter                  ::= "get"
  setter                  ::= "set"
  tester                  ::= "has"
  default                 ::= "default"
  translation             ::= "translated"
  translation_domain      ::= "translation_domain"
  list                    ::= "list"
  set                     ::= "set"
  property_super_private  ::= "base"
  category_super_private  ::= "category"

Slot definition

Each slot can contain a value (or nothing).


  private_slot            ::= ( | private )
  super_private_slot      ::= ( | property_super_private | category_super_private )
  type_slot               ::= ( get | set | has )
  translation_slot        ::= ( | translation )
  default_slot            ::= ( | default )
  cardinality_slot        ::= ( | list | set | "s")

Slot assembly


  accessor_id             ::= private_slot super_private_slot type_slot "_" to finish...

Boolean Testers (is)

"Strange" Accessors (...Ids, ... Values)

These type of accessors are strange only in the fact that they do not follow the general naming conventions.

Related Articles