Odoo Ajuda


2 Respostas

Tintuk Tomin Índia

--Tintuk Tomin--

| 2 2 4
--Tintuk Tomin--
Tintuk Tomin Índia
21/05/19 06:25

The below code should is the xml code

<template id="new_link" name="New Link" inherit_id="website_portal.portal_layout" priority="25">
    <xpath expr="//ul[contains(@class,'o_portal_submenu')]" position="inside">
            <a href="/my/newlink">New Menu</a>

The above code is used to create a new menu in the portal view of odoo 10. Also you want to create a new python function in the controller for creating the action. What to do on clicking on this new menu, with the link /my/newlink

For example

class CustomerPortal(CustomerPortal):

    @http.route(['/my/newlink', '/my/quotes/page/<int:page>'], type='http', auth="user", website=True)
    def portal_my_records(self, page=1, date_begin=None, date_end=None, sortby=None, **kw):
        print("IN PYTHON CONTROLLER")
        return request.render("call.template", data)

When you click on the New menu in the portal page the python function will execute. and from here you can pass the controll to another template. in the above code call.template is the template name and data is the values that you need to pass into that particular template.

If you want to create a new menu in the portal page of odoo 11 refer the below link.


FG Alemanha
21/05/19 04:47

typo orderr maybe. If you have an order as in <t t-if="orders"> you still have no orderr and nothing is displayed

Faça uma Pergunta
Keep Informed
1 seguidor (es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now