--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/8e55e343-1f42-497b-87a1-339aeada2acc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Been experimenting with POWrapper, but I really can't get my head around it. Where do I define what the methods do? Does POWrapper automagically implement the methods? Do I need to generate the X class (seems like no, from that explanation you linked to before, but it feels weird that POWrapper can implement an interface without actually knowing what the interface does)?
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/7ce96276-ef21-4e39-ae55-d302860a6a2c%40googlegroups.com.
Been experimenting with POWrapper, but I really can't get my head around it. Where do I define what the methods do? Does POWrapper automagically implement the methods? Do I need to generate the X class (seems like no, from that explanation you linked to before, but it feels weird that POWrapper can implement an interface without actually knowing what the interface does)?
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/7ce96276-ef21-4e39-ae55-d302860a6a2c%40googlegroups.com.
You may be doing more that way. Points to remember:
1. Removing methods from renamed X/I classes are not necessary as you keep local version of I in your bundle, which are wrapped in your local M class.
2. As long as you extend the core M_ class you are reusing the core and reduce impact whenever either changes.
However, I do have an issue. I also need to override MInvoicePaySchedule. I don't need to alter the model, I just need to add some logic to the constructor that takes an MInvoice and an MPaySchedule as the parameters. I extended MInvoicePaySchedule, and created the default constructors, calling super each time. I also edited the model factory, and set it to use my class instead of the default one. However, since the constructor I need to extend is not the default one, when iDempiere creates the payment terms on invoice complete, it calls the old constructor and not the one from my class. Every other part of the M Class works as expected, and my modifications produce the intended results, but this extra constructor is not correctly overridden.
How do I get to override this constructor, so the due dates are correctly calculated on invoice complete?
However, I do have an issue. I also need to override MInvoicePaySchedule. I don't need to alter the model, I just need to add some logic to the constructor that takes an MInvoice and an MPaySchedule as the parameters. I extended MInvoicePaySchedule, and created the default constructors, calling super each time. I also edited the model factory, and set it to use my class instead of the default one. However, since the constructor I need to extend is not the default one, when iDempiere creates the payment terms on invoice complete, it calls the old constructor and not the one from my class. Every other part of the M Class works as expected, and my modifications produce the intended results, but this extra constructor is not correctly overridden.
How do I get to override this constructor, so the due dates are correctly calculated on invoice complete?Any hints on how to tackle this?
Perhaps this can complicate the code and we may need to think of further decoupling of such inherent logic behind PaySchedule as an external plugin.
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/7b884c8d-9aac-4d30-86c1-c172a4a57ca6%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.