Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

How to inherit calendar popup?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
inheritancepopupodoo8.0
6 Replies
16286 Tampilan
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
Buang
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)
Penulis

@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)
Penulis

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

Avatar
Yenthe Van Ginneken (Mainframe Monkey)
Penulis Jawaban Terbai

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
Buang
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)
Penulis

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.

Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
How to inherit / modify point of sale pages & create restrictions? Diselesaikan
inheritance point_of_sale odoo8.0
Avatar
Avatar
1
Nov 21
8014
how to inherit the timesheet view in my new modul.
modules inheritance odoo8.0
Avatar
1
Jun 16
4154
Why am I getting a mandatory field is not correctly error on this extended contracts code? Diselesaikan
inheritance integrityerror contracts odoo8.0
Avatar
Avatar
Avatar
Avatar
20
Mei 19
19128
How to add field to One2Many with xpath expressions? Diselesaikan
inheritance one2many xpath odoo8.0
Avatar
Avatar
1
Apr 15
14427
How to make pop ups after actions? Diselesaikan
popup
Avatar
Avatar
Avatar
2
Jul 25
9222
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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