Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Overwriting a method in OCA module.

by
Opener B.V., Stefan Rijnhart
- 15/09/2015 09:51:08
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.

Reference