Model Classes cross references should use IModelFactory

Description

When using IModelFactory to override existing models, other built-in models that reference these models should honour the overrides. For example:

Create a new model factory and a model for MOrderLine lets call it MyMOrderLine, when using the Client or Web interface MyMOrderLine is used. However other model classes don't use modelfactory and directly reference the original MOrderLine (e.g. MInOut line 1303 uses org.compiere.model.MOrderLine)

All references to Model classes should be instantiated using ModelFactory.

Environment

None

Activity

Show:

Hesham Ahmed April 9, 2015 at 5:35 AM

It is a massive change indeed, EventHandler can be considered a viable workaround and the wiki can be updated to clarify that ModelFactory should not be used to override built-in Models and instead should only be used for custom Models. Please close this issue if there is no other better solution.

Carlos Ruiz April 8, 2015 at 5:30 PM

it sounds like a massive change to core classes - I think in such case is better to use EventHandler to modify the behavior

Won't Fix

Details

Assignee

Reporter

Priority

Created March 16, 2015 at 2:40 PM
Updated February 3, 2016 at 12:57 PM
Resolved April 9, 2015 at 3:22 PM