Most Powerful Open Source ERP

Developer Documentation

Guideline Never Use GetPath To Retrieve A Url In ERP5

Absolute and physical path may differ.

Guideline Never Use ZODB Temp Folder Across Multiple Requests

Incompatible with ZEO and clustering.

Guideline Never Store Calculation Result In Python Property

Only store original content.

Guideline Sessions Are Not Allowed

Sessions are incompatible with clustering.

Guideline Never Use Aq_parent To Get Document Parent In Python

Use getParentValue()

Guideline Never Access State_change Object In ERP5 Workflow Scripts

Use state_change["attribute_name"].

Guideline Never Modify 100+ Objects In A Transaction

Use activities instead.

Guideline Never Name A Base Category The Same As A Property In ERP5

They form a global vocabulary.

Guideline Cookies Are Not Allowed

Cookies have limitations and should not be used in ERP5.

Guideline Never Write To ZODB If Not Required

ZODB is an incremental storage and every write creates more data.

Guideline Never Hardcode Interactions

Use interaction workflows instead.

Guideline Never Override Python Builtin Names

Debugging will be much harder.

Guideline Never Use ContentValues or ObjectValues On More Than 50 Documents In ZODB

Folders may contain million of documents.

Guideline Never Use Reindex In ERP5

Reindexing is for debugging only.

Guideline Call Parent Method For Zope Hook Method Override In Python

Needs an explanation.

Guideline Python Class Method Should Have Security Declaration

Don't forget security declaration on class methods.

Guideline Code Should Work If All Else Fails

Always assume a part your code is depending on may not work.

Guideline Prevent Acquisition From Acquiring Restricted Properties In Python

To prevent acquisition errors.

Guideline Comments Should Be Used Wisely

Don't make unnecessary comments.

Guideline Never Use Python If Obj if Obj Is Not A Simple Type

Truth testing in Zope/ERP5 can be surprising.