I need to call method "new_page" in one module from another. I made a button to call this function.
In templates:
<a href="#" data-action="method_add" aria-label="New page" title="New page">
<p>New Page</p>
</a>
In models i defined the action:
@api.model
def method_add(self, name=False, add_menu=False, template='website.default_page', ispage=True, namespace=None):
self.env.ref('website').new_page
return True
This method must call function from module. But nothing happens.
Is it required to make a new controller?