I am working on Odoo website module to create a customer portal where the user can see his own sale orders. And since I don't want anything to be customised from the UI side I am bound to do it from the code side.
I have created a menu of Sale Order form Views.py
Here is the code:
<odoo>
<data noupdate="0">
<record id="portal_sale_order_menu" model="website.menu">
<field name="name">Sale Orders</field>
<field name="sequence" type="int">2</field>
</record>
</data>
</odoo>
Now, I am able to see the Sale Order menu in the website UI.
Since I'm new to this I have no idea what to write in models/controllers or how to link the logged in users sale order after clicking on the menu.
Can anyone help me out in this with the code, it will be highly helpful to me. Thanks in advance.
Achieved my solution by just mentioning the URL:
<odoo>
<data noupdate="0">
<record id="portal_sale_order_menu"model="website.menu">
<field name="name">Sale Orders</field>
<field name="url">/my/orders</field>
<field name="sequence"type="int">1</field>
</record>
</data>
</odoo>
Thanks!