Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Odoo 17 – InnerGroup Error “Cannot read properties of undefined (reading 'name')” when using custom widget

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
customwidget
2 Replies
411 Rodiniai
Portretas
Gowtham S

Hi everyone,

I’m on Odoo 17 and I created a very simple custom widget that extends CharField and renders a plain <input>.

The widget works in isolation, but when I use it like this:

<field name="father_name" widget="reusable_input"/>

the form crashes with:

OwlError: Cannot read properties of undefined (reading 'name') at InnerGroup.template

If I remove the widget attribute (or remove the field entirely), the form loads normally.

Here is the widget:

import { registry } from "@web/core/registry"; import { CharField } from "@web/views/fields/char/char_field"; export class ReusableInput extends CharField { onInput(ev) { this.props.update(ev.target.value); } } ReusableInput.template = "school_fee_management.reusable_input"; registry.category("fields").add("reusable_input", ReusableInput);

And the template:

<t t-name="school_fee_management.reusable_input"> <input type="text" t-att-value="props.value" t-on-input="onInput"/> </t>

XML:

<group string="Parent Contact"> <field name="father_name" widget="reusable_input"/> <field name="phone"/> </group>

Has anyone seen this InnerGroup error when using custom widgets in Odoo 17?

What extra metadata or props does the widget need so InnerGroup doesn’t break?

Thanks in advance.

0
Portretas
Atmesti
Codesphere Tech
Hello,
Please try to inherit the template like this:
<t t-name="current name of your template" t-inherit="web.CharField" t-inherit-mode="extension">
    <xpath expr="//input" position="replace">
        <input type="text"
               t-att-value="props.value"
               t-on-input="onInput"/>
    </xpath>
</t>

Hope it helps.

Portretas
Kunjan Patel
Best Answer
Hello Gowtham S,
I hope you are doing well

Cause: Custom template doesn't inherit the base CharField template structure properly.
Solution: Inherit the CharField template using XPath instead of replacing it:
<t t-name="school_fee_management.reusable_input" t-inherit="web.CharField" t-inherit-mode="extension">
      <xpath expr="//input" position="replace">
          <input type="text" t-att-value="props.value" t-on-input="onInput"/>
      </xpath>
</t>

This preserves the required props/metadata from the parent widget template.

I hope this information helps you

Thanks & Regards,
Kunjan Patel
0
Portretas
Atmesti
Portretas
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

The issue is that your custom widget template is too minimal and doesn't provide the structure that Odoo's form view expects when rendering fields inside groups. The InnerGroup component is trying to read properties (like name) that aren't available because your template bypasses the standard field wrapper.

Instead of replacing the entire template, extend CharField and just override the input rendering:

import { registry } from "@web/core/registry";

import { CharField } from "@web/views/fields/char/char_field";

export class ReusableInput extends CharField {

    onInput(ev) {

        this.props.update(ev.target.value);

    }

}

// Use CharField's template, or extend it

ReusableInput.template = "web.CharField";

registry.category("fields").add("reusable_input", ReusableInput);


Hope it helps.

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

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

Registracija
Related Posts Replies Rodiniai Veikla
Creating new widget in openerp 7.0
customwidget
Portretas
Portretas
Portretas
Portretas
3
rugs. 15
11101
Odoo 11: Passing parameters to custom widget? Solved
javascript customwidget
Portretas
Portretas
1
kov. 18
7466
[12.0] How to get changes from the parent view to a custom widget
customwidget 12.0 JS
Portretas
0
bal. 20
4021
Custom Widget : Field invisible if empty Solved
customwidget invisibility odoo9
Portretas
3
gruod. 16
8768
Error in Qweb in custom module widget Solved
js customwidget qweb2
Portretas
1
liep. 16
4415
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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