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

Now I'm working with odoo15 and I have the following task:

you need to add next to the “Edit” button (in the calendar in a pop-up form clarifying with brief information), a “Completed” button, which will move the lead to the desired status for which this meeting is assigned. Tell me how to correctly add a button in a pop-up window (next to the edit button)

Avatar
Annuleer
Beste antwoord

Hello Oleg,


To add the new button calendar in a popup form view next to the edit button here the steps below which you need to follow


step1:- make the module structure like this which I have already mentioned below



step2:- you need to inherit the correct template like this which i have mentioned the code for that also attach the image for code


//Code in Comment//



step3:- put your file in the manifest like this



Output Image:-



Hope this helps.

   

If you need any help in customization feel free to contact us.

       

Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

Avatar
Annuleer

Code:

<?xml version="1.0" encoding="UTF-8"?>
<template>
<!-- Inherit the web.CalendarQuickCreate template -->
<t t-inherit="web.CalendarQuickCreate" t-inherit-mode="extension">
<xpath expr="//button[contains(@class, 'o-calendar-quick-create--edit-btn')]" position="after">
<!-- Add your custom buttons here -->
<button class="btn btn-primary o-calendar-quick-create--create-btn" t-on-click="onCreateBtnClick">
Custom
</button>
</xpath>
</t>
</template>

<t t-inherit="web.CalendarQuickCreate" - mention the name of the module in which the template belongs with template id
here the "web" is the module name and "CalendarQuickCreate" is template id

<xpath expr="//button[contains(@class, 'o-calendar-quick-create--edit-btn')]" inherit the correct button class like this and after
put your button like this

<button class="btn btn-primary o-calendar-quick-create--create-btn" t-on-click="onCreateBtnClick">
Custom
</button>

Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 23
2091
0
nov. 22
1544
0
jun. 25
696
1
feb. 25
1242
0
apr. 19
3259