[Erp5-dev] tutorial

Kevin Deldycke kevin at nexedi.com
Wed Apr 20 14:29:37 CEST 2005


Le lundi 18 Avril 2005 21:22, Yoshinori Okuji a écrit :
> In the description of PaySheetTransaction:
>
> Cette classe dérive de la classe de base Folder via Invoice. Nous avons
> choisi cet héritage car les objets de type PaySheetTransaction vont nous
> servir à regrouper au même endroit les objets relatifs à une feuille de
> paie. C'est pour cela que PaySheetTransaction n'a pas comme classe ancêtre
> l'une des 5 classes de base d'ERP5. Folder est en quelque sorte une "classe
> utilitaire" qui nous permet de réduire l'entropie du système.
>
> This paragraph is impossible for me to understand. I don't see why
> PaySheetTransaction does not derive from any of the 5 basic classes, only
> from this description. What does "à regrouper endroit les objets relatifs à
> une feuille de paie" mean here?
>
> Kevin, could you elaborate on this?


PaySheetTransaction is a subclass of Invoice. As we can see in 
Products/ERP5/Document/PaySheetTransaction.py :
** class PaySheetTransaction(Invoice)

Invoice is a subclass of AccountingTransaction:
** class Invoice(AccountingTransaction)

Invoice is a subclass of AccountingTransaction:
** class Invoice(AccountingTransaction)

AccountingTransaction is a subclass of Delivery:
** class AccountingTransaction(Delivery)

Delivery is a subclass of XMLObject:
** class Delivery(XMLObject)

And XMLObject is a subclass of folder (see Products/ERP5Type/WMLObject.py) :
** class XMLObject( Folder )


So the PaySheetTransaction is a subclass of the Folder Class. That's a fact. 
When I have build the payroll system, I used Accouting Transaction module as 
a model. And at this moment, Folder was a parent of AccountingTansaction (and 
it's always the case). If you think that this class relationship is not 
correct, please tell me.

In my paragraph I try to explain why PaySheetTansaction is not a subClass of 
any of the 5 basic class : because PaySheetTansaction is a place where 
paysheet-related objects are stored. Folder is just a utility class to 
classify and regroup objects. If you have a better way to explain this, I 
will be happy.

"objets de type PaySheetTransaction vont nous servir à regrouper au même 
endroit les objets relatifs à une feuille de paie" -> We will use 
PaySheetTransaction objects to store every paysheet-related sub-objects (like 
PaySheetLine and PaySheetTransactionLine).

Kev



More information about the Erp5-dev mailing list