In order to facilitate creation of Compiere extensions
I suggest that the way new M-Class objects are created
in code is changed to a Factory-type approach.
Currently the GUI nicely supports custom M-Classes if
they are correctly named and placed in package
"compiere.model". However, it is currently not possible
in the same way to make the standard Compiere code use
a customized M-class.
Today an MClass object is created by the code:
new MOrder(ctx, ID)
However, this means that the standard Compiere code
will always use the org.compiere.model.MOrder, even if
a compiere.model.MOrder object exists.
I suggest to everywhere in Compiere use a ModelFactory
which has some logic to check whick MClass to instantiate.
This is a considerable change to the code, but would
facilitate the creation of extensions and
Log in to post a comment.