Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2883 Weergaven

Hello I would like to extend to the web client folder in web_enterprise to attempt to make a edit/make a new homepage.  

how would I go about that interacting with static/src/webclient/home_menu.xml and other  various JavaScript and scss files in the webclient folders

The studio module does not allow for all the modification I want to add 

Avatar
Annuleer
Beste antwoord

Hi @jd,

I'm sharing an example of how you can add your custom changes to the home menu (v15 enterprise).

1. Create your custom module and create files to write the below code
2. For styling. (.scss)

.o_custom_div {
    border: 5px outset red;
    background-color: lightblue;
}

3. To inherit HomeMenu template and add a new div in the home menu. (.xml)


4. To add a function to the HomeMenu component. (.js)

      /* @odoo-module */

import { patch } from 'web.utils';
import { HomeMenu } from "@web_enterprise/webclient/home_menu/home_menu";

patch(HomeMenu.prototype, 'MyHomeMenu', {

// This function is called when we click on the div that we added in the HomeMenu template
_onItemClicked(ev) {
// Do Something
},

});

I hope This will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jul. 25
544
2
jul. 25
1052
1
jun. 25
768
1
apr. 25
961
1
mrt. 25
1163