site_header
en
fr
ja
zh
Most Powerful Open Source ERP
Contact
Login
header_title
Developer Documentation
breadcrumb
Home
Documentation
Developer
Document List
16
-
04
2024
Guideline FailUnless Should Not Be Used In Python Unit Tests To Test Identity
Use assertEqual.
Categories
crime
;
coding
;
Python
;
test
15
-
07
2019
Guideline Never Use GetPath To Retrieve A Url In ERP5
Absolute and physical path may differ.
Categories
crime
;
coding
;
url
15
-
07
2019
Guideline Never Use ZODB Temp Folder Across Multiple Requests
Incompatible with ZEO and clustering.
Categories
crime
;
coding
;
zodb
;
scale
15
-
07
2019
Guideline Never Store Calculation Result In Python Property
Only store original content.
Categories
crime
;
coding
;
property
;
Python
15
-
07
2019
Guideline Sessions Are Not Allowed
Sessions are incompatible with clustering.
Categories
rule
;
coding
;
scale
15
-
07
2019
Guideline Never Use Aq_parent To Get Document Parent In Python
Use getParentValue()
Categories
crime
;
coding
;
Python
15
-
07
2019
Guideline Never Access State_change Object In ERP5 Workflow Scripts
Use state_change["attribute_name"].
Categories
crime
;
coding
;
workflow
15
-
07
2019
Guideline Never Modify 100+ Objects In A Transaction
Use activities instead.
Categories
crime
;
coding
;
transaction
15
-
07
2019
Guideline Never Name A Base Category The Same As A Property In ERP5
They form a global vocabulary.
Categories
crime
;
coding
;
property
;
category
15
-
07
2019
Guideline Cookies Are Not Allowed
Cookies have limitations and should not be used in ERP5.
Categories
crime
;
coding
;
scale
15
-
07
2019
Guideline Never Write To ZODB If Not Required
ZODB is an incremental storage and every write creates more data.
Categories
crime
;
coding
;
zodb
15
-
07
2019
Guideline Never Hardcode Interactions
Use interaction workflows instead.
Categories
crime
;
coding
;
workflow
15
-
07
2019
Guideline Never Override Python Builtin Names
Debugging will be much harder.
Categories
crime
;
coding
;
Python
15
-
07
2019
Guideline Never Use ContentValues or ObjectValues On More Than 50 Documents In ZODB
Folders may contain million of documents.
Categories
crime
;
coding
;
ZODB
15
-
07
2019
Guideline Never Use Reindex In ERP5
Reindexing is for debugging only.
Categories
crime
;
coding
;
reindex
;
debug
15
-
07
2019
Guideline Call Parent Method For Zope Hook Method Override In Python
Needs an explanation.
Categories
recommendation
;
coding
;
override
;
Python
15
-
07
2019
Guideline Python Class Method Should Have Security Declaration
Don't forget security declaration on class methods.
Categories
recommendation
;
coding
;
security
;
Python
15
-
07
2019
Guideline Code Should Work If All Else Fails
Always assume a part your code is depending on may not work.
Categories
recommendation
;
coding
;
resiliency
15
-
07
2019
Guideline Prevent Acquisition From Acquiring Restricted Properties In Python
To prevent acquisition errors.
Categories
recommendation
;
coding
;
acquisition
15
-
07
2019
Guideline Comments Should Be Used Wisely
Don't make unnecessary comments.
Categories
recommendation
;
coding
discussions