İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Custom portal code: Pop up Error

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
development
1 Cevapla
2100 Görünümler
Avatar
Karishma Dookhit

I have created a module for displaying information on a portal. I have restarted the server and upgraded the module. however, when navigating on the portal, i got a pop-up error and when i closed the pop - up, i got the never-ending loading icon. 


Here is the controller code:


error:

UncaughtPromiseError > TypeError


Uncaught Promise > Cannot set properties of null (setting 'textContent')


Occured on localhost:8069 on 2025-04-24 12:48:44 GMT


TypeError: Cannot set properties of null (setting 'textContent')

    at http://localhost:8069/web/assets/c2de72e/web.assets_frontend_lazy.min.js:8417:2095

    at Array.forEach (<anonymous>)

    at http://localhost:8069/web/assets/c2de72e/web.assets_frontend_lazy.min.js:8417:1951

    at async Promise.all (index 0)



Here is the controller code:

from odoo.addons.portal.controllers.portal import CustomerPortal

from odoo import http

from odoo.http import request

 

class WeblearnsPortal(CustomerPortal):

    def _prepare_home_portal_values(self,counters):

        values = super(WeblearnsPortal, self)._prepare_home_portal_values(counters)

        student_counts = http.request.env['track.trace'].search_count([])

        values.update({

            'student_counts': student_counts

        })

        return values

Here is the template code:

<?xml version="1.0" encoding="UTF-8"?>

<odoo>

 

    <template id="portal_my_home" name="Demo Records" inherit_id="portal.portal_my_home">

        <xpath expr="//div[hasclass('o_portal_docs')]" position="inside">

            <t t-if="student_counts" t-call="portal.portal_docs_entry">

                <t t-set="url">/my/students</t>

                <t t-set="title">Trace</t>

                <t t-set="count" t-value="student_counts"/>

                <t t-set="config_card" t-value="True"/>

            </t>

        </xpath>

    </template>

 

</odoo>

I wish to have something like below:

0
Avatar
Vazgeç
Avatar
Cybrosys Techno Solutions Pvt.Ltd
En İyi Yanıt

Hi,

Please update your code like this:-


In .py file


from odoo.addons.portal.controllers.portal import CustomerPortal


from odoo import http


from odoo.http import request



class WeblearnsPortal(CustomerPortal):


  def _prepare_home_portal_values(self, counters):

      values = super()._prepare_home_portal_values(counters)

      if 'student_count' in counters:

          values['student_count'] = http.request.env['track.trace'].search_count([])

      return values



In xml file

<?xml version="1.0" encoding="UTF-8"?>

<odoo>

  <template id="portal_my_home_students" name="Demo Records"

            inherit_id="portal.portal_my_home">

      <xpath expr="//div[hasclass('o_portal_docs')]" position="inside">

          <t t-call="portal.portal_docs_entry">

              <t t-set="title">Students</t>

              <t t-set="url" t-value="'/my/students'"/>

              <t t-set="placeholder_count" t-value="'student_count'"/>

              <t t-set="show_count" t-value="True"/>

              <t t-set="count" t-value="student_count"/>

          </t>

      </xpath>

  </template>

</odoo>


Hope it helps

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Feature Request: Native “Dialog Filters” in Search Panel
development
Avatar
0
Kas 25
9
Solution to the Getting Started tutorial from the official Odoo 16 documentation
development
Avatar
Avatar
Avatar
2
Kas 25
1412
How do I change the name of the module, or rather the name assigned to the module, after I created it in Odoo Studio?
development
Avatar
1
Kas 25
326
Guest House Module - Rental Search Bar
development
Avatar
Avatar
1
Kas 25
199
How to make all branches for user active automatically after login his account?
development
Avatar
Avatar
Avatar
3
Kas 25
391
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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