Contributors mailing list archives


Re: Overwriting a method in OCA module.

by "Kitti U." <> - 15/09/2015 08:19:15
May I confirm my understanding,

Like, if I want to submit a new addon, I would end up with 2 addons instead of one?
  • my_addon
  • my_addon_monkeypatch

On Tue, Sep 15, 2015 at 3:08 PM, Stefan Rijnhart <> wrote:
On 15-09-15 09:38, Kitti U. wrote:
> 1. In module C, create a MonkeyPatch to module A with a new
> "hook_point". (just the hook point only). -> as the result we can
> think of module A as if it already have the hook_point.
> 2. In module C, we write method as if hook_point exists (now we can
> call super())

Crystal clear! But I would follow Nhomar's practice of putting the
monkeypatch with the hooks in its own module, separated from the
module(s) that make use of those hooks.


Post to:

Mobile: +66-(0)8-1841-7480
Your ERP Partner =>