Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1776 Vizualizări

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)

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează

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>

Related Posts Răspunsuri Vizualizări Activitate
1
iul. 23
2091
0
nov. 22
1544
0
iun. 25
694
1
feb. 25
1237
0
apr. 19
3258