Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

How to inherit calendar popup?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
inheritancepopupodoo8.0
6 Respostes
16285 Vistes
Avatar
Yenthe Van Ginneken (Mainframe Monkey)

Hi guys,

I usually have no problems at all with inheritance but I can't inherit the popup dialog which is on the calendar view.
The code is in the module calender, which you can find here: https://github.com/odoo/odoo/blob/8.0/addons/web_calendar/static/src/xml/web_fullcalendar.xml#L57-70

It has the following code:

 <div t-name="CalendarView.quick_create" class="oe_calendar_quick_create openerp">
    
    <div class="form-group">
        <label for='name' class='control-label'>Event summary:</label>
        <input name='name' class="form-control"/>
    </div>     
    
    <t t-if="widget._buttons">
      <div class="oe_calendar_quick_create_buttons">
        <button class="openerp oe_button oe_highlight oe_calendar_quick_create_add ">Create event</button>
        <button class="oe_button oe_form_button oe_link oe_calendar_quick_create_edit" ><span>Edit Event <![CDATA[]]></span></button>
      </div>
    </t>
  </div>

A simple question: what is the correct way to inherit this? it has no template id and/or name so how can I inherit that div t-name and add a field after this line with xpath?

<input name='name' class="form-control"/> 

Thanks,
Yenthe

8
Avatar
Descartar
David Bertha

"Template inheritance is performed via the t-extend directive which takes the name of the template to alter as parameter." src : https://www.odoo.com/documentation/8.0/reference/qweb.html

Emipro Technologies Pvt. Ltd.

@yenthe, I noted down your issue. Definitely I will keep you updated after trying at my side. Since so many days I am facing this problem ( in some of web templates ) Before me if you have got the answer then don't hesitate to post here, otherwise I will give you answer surely within short time. I have marked this question as important.

Emipro Technologies Pvt. Ltd.

and yes, +1 from me !

Yenthe Van Ginneken (Mainframe Monkey)
Autor

@david I'm aware of the t-extend but they do not seem to work on templates in another module without name/ID. @Emipro thanks! If I find a solution I will post it here too!

Qutechs, Ahmed M.Elmubarak

+1, Me too I'm trying to change the behavior of the popup ...

Yenthe Van Ginneken (Mainframe Monkey)
Autor

@Emipro and @Ahmed I've posted the solution to inherit these views.

Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Autor Best Answer

Hi guys,

The solution is to create a (new) XML file under /static/src/xml and to include this file in your __openerp__.py. For inheriting this view you need to work with <templates> in place of <openerp><data>.
With a t-extend you can extend the view. For example for the calendar popup:

 <?xml version="1.0" encoding="utf-8"?>
<templates>
    <tr t-extend="CalendarView.quick_create">
        <t t-jquery=".form-group" t-operation="after">
            <div class="form-group">
                <h3>Example - put fields here </h3>
            </div>
        </t>
    </tr>
</templates>

Thats it!
Yenthe

9
Avatar
Descartar
Emipro Technologies Pvt. Ltd.

+1, Thanks I will test and let you know Yenthe. You're a star !

Emipro Technologies Pvt. Ltd.

@yenthe, I am so sorry that I couldn't got a time to give you solution.

Yenthe Van Ginneken (Mainframe Monkey)
Autor

Thanks Emipro! It doesn't matter that you didn't have a solution yet, I have one now and I hope it saves you some time too :)

Prakash

@Yenthe: I would like to add custom many2one field in calendar pop up after inheriting the template CalendarView.quick_create. Is it possible?. And override Create Event button to save many2one field in the form (project.task). Thanks

mars@trueplus.vn

Impressive, Thank you so much !

russ@russellbriggs.com

NOTE: While this works, you also have to modify the widget JS code to get it to pick up any new fields you add.

In my case it was simpler to override the calendar view and set the quick_add attribute to False, so when you create a new appointment it goes straight to the full calendar appointment form.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
How to inherit / modify point of sale pages & create restrictions? Solved
inheritance point_of_sale odoo8.0
Avatar
Avatar
1
de nov. 21
8014
how to inherit the timesheet view in my new modul.
modules inheritance odoo8.0
Avatar
1
de juny 16
4153
Why am I getting a mandatory field is not correctly error on this extended contracts code? Solved
inheritance integrityerror contracts odoo8.0
Avatar
Avatar
Avatar
Avatar
20
de maig 19
19125
How to add field to One2Many with xpath expressions? Solved
inheritance one2many xpath odoo8.0
Avatar
Avatar
1
d’abr. 15
14425
How to make pop ups after actions? Solved
popup
Avatar
Avatar
Avatar
2
de jul. 25
9219
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now