Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013322Openbravo ERPA. Platformpublic2010-05-14 09:412010-05-14 09:41
alostale 
iciordia 
normalminorhave not tried
newopen 
5
 
 
Core
No
0013322: Entity subtypes
A very common pattern in openbravo is subtypes. For example there is a super type of Invoices and two subtypes for it: Sales Invoices and Purchase Invoices.

All subtypes are physically stored in the same table, C_Invoice in this case.

This should be definable in AD. A subtype would be defined as:

-Subtype entity: is the subtype entity. In the example Purchases and Sales.
-Parent type: which would be the parent entity. In the example Invoice.
-Where clause: it is a boolean expression that for each record in the physical table, this clause defines the record subtype. In the example IsSoTrx value would define to which subtype belongs each record.
-Columns: subtypes should also be allowed to define specific columns, which are accessible from other subtypes at the same level, but are present in the super type. This would allow to have subtype specific properties.

With this definition subtypes could be used in different places:
-They would become DAL objects, so they could be instantiated.
-They could be used to define tabs, in this way many of the where clauses that currently tabs have would be unnecessary.
-Navigation window could be defined at this level, solving issues like 0012938
-...
No tags attached.
Issue History
2010-05-14 09:41alostaleNew Issue
2010-05-14 09:41alostaleAssigned To => iciordia
2010-05-14 09:41alostaleDescription Updatedbug_revision_view_page.php?rev_id=362#r362

There are no notes attached to this issue.