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

Reset views v8

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
templatesrestorebase
1 Balas
5283 Tampilan
Avatar
Fatih Piristine

been using odoo for over 3 years. i have modified some base code and template  in core, base, account, website, website_sale so on.

moved most of these modifications to custom modules, i mean each modified module nowadays have *_ext  where modified code lives its own life.

there are some templates I forgot to restore to original version while moving them to *_ext 

it causes me some problems lately because of updates. V8 started with version 20150201 now 20170501 running on server. 

question is: how to restore these forgotten templates to original ones. i tried full upgrade "-i base -u base_ext" etc...

0
Avatar
Buang
Avatar
Fatih Piristine
Penulis Jawaban Terbai

i guess i figured that out. here is the working code. take backup and use it at own risk.


get the list of whole views registered in system.

--- SELECT

 irmm.id, irmm.name, irmd.model, irmd.res_id FROM

 ir_module_module AS irmm

 LEFT JOIN ir_model_data AS irmd ON irmm.name = irmd.module WHERE

 irmm.state = 'installed' AND

 irmd.model = 'ir.ui.view'

ORDER BY

 irmm.name ASC ---



fetch inherited views from modules where *_ext --- SELECT

 array_to_string(array_agg(distinct "inherit_id"), ', ') AS modified_views FROM

 ir_ui_view WHERE

 name LIKE '%_ext%' AND 

 inherit_id IS NOT NULL ---


should give you output like this one: (inherited views)

"163, 167, 181, 182, 978, 981, 1320, 1399, 1801, 1804, 1809, 1822, 1824, 1973"





copy the function from website/controllers/main.py ----

    @http.route('/website/reset_templates', type='http', auth='user', methods=['POST'], website=True)

    def reset_template(self, templates, redirect='/'):

        templates = request.httprequest.form.getlist('templates')

        modules_to_update = []

        for temp_id in templates:

            view = request.registry['ir.ui.view'].browse(request.cr, request.uid, int(temp_id), context=request.context)

            if view.page:

                continue

            view.model_data_id.write({

                'noupdate': False

            })

            if view.model_data_id.module not in modules_to_update:

                modules_to_update.append(view.model_data_id.module)


        if modules_to_update:

            module_obj = request.registry['ir.module.module']

            module_ids = module_obj.search(request.cr, request.uid, [('name', 'in', modules_to_update)], context=request.context)

            if module_ids:

                module_obj.button_immediate_upgrade(request.cr, request.uid, module_ids, context=request.context)

        return request.redirect(redirect)



good to go :)

0
Avatar
Buang
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
The following modules are needed by other modules but have not been defined,
restore
Avatar
1
Feb 25
88
Accident how to restore remove from view
restore
Avatar
Avatar
1
Nov 24
2293
"harmonised" template for various use cases
templates
Avatar
0
Jul 24
2187
Restore database from flat files only
restore
Avatar
Avatar
1
Apr 24
2347
How can i inherit this template? Diselesaikan
templates
Avatar
Avatar
1
Sep 23
2715
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