Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1771 Widoki

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)

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

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>

Powiązane posty Odpowiedzi Widoki Czynność
1
lip 23
2089
0
lis 22
1543
0
cze 25
692
1
lut 25
1234
0
kwi 19
3258