Hi can someone show me how can i add an empty home page to add html elements (div and buttons to redirect to views) just with the navbar for my custom module ? Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
thanks but the nav bar that i want to use is the odoo's nav bar with my custom module sub menus
thanks but the nav bar that i want to use is the odoo's nav bar with my custom module sub menus
Hi,
To add an empty home page with a navbar for your custom module in Odoo, you can follow these steps:
Create a new view for your home page with a navbar and empty content. Here's an example XML code for your view:
xml:-
1<odoo>
2 <data>
3 <template id="my_module_home_page" name="My Module Home Page">
4 <div class="o_page_summary">
5 <div class="o_main_navbar">
6 <!-- Add your navbar links here -->
7 </div>
8 <div class="o_content">
9 <!-- Add your empty content or other HTML elements here -->
10 </div>
11 </div>
12 </template>
13 </data>
14</odoo>
Create a new controller for your home page. Here's an example Python code for your controller:
from odoo import http
from odoo.http import request
class MyModuleHomeController(http.
@http.route('/my_module/home'
def home(self, **kwargs):
return request.render('my_module.my_
Add the new view to your module's __manifest__.py file. Here's an example code:
{
'name': 'My Module',
'version': '1.0',
'author': 'Your Name',
'category': 'Uncategorized',
'website': 'https://www.yourwebsite.com" rel="noopener nofollow noreferrer" target="_blank">https://www.yourwebsite.com',
'depends': ['base',website],
'data': [
'views/my_module_home_page_
],
'application': True,
}
Hope it helps
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
2
dec. 24
|
1533 | ||
|
0
mei 23
|
3603 | ||
|
0
jun. 20
|
2774 | ||
|
1
apr. 25
|
1340 | ||
|
0
nov. 24
|
1411 |