Contributors mailing list archives

contributors@odoo-community.org

Re: Overwriting a method in OCA module.

by "Kitti U." <kittiu@ecosoft.co.th> - 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 <stefan@opener.am> 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.

Cheers,
Stefan.

_______________________________________________
Mailing-List: http://odoo-community.org/groups/oca-contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe




--
Mobile: +66-(0)8-1841-7480
Your ERP Partner => www.ecosoft.co.th