Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Extending kanban: template t-call not working ?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
templateskanbant-callV16
1 Răspunde
2258 Vizualizări
Imagine profil
ALUVAL

Hello,

I'm having a hard time calling an external from a Kanban view, so reaching some help here.

My need: I need to change the logic of presentation of "planned_hours" in Project's Task Kanban card (when hr_timesheet module is installed)

So I've done:

1. Created my new and to-be-called QWeb template "kanban_budget_hours" in a module called "carpentry_timesheet":


<template id="kanban_budget_hours">
    <t t-if="record.planned_hours.raw_value &gt; 0 or record.overtime">
        <t t-set="badge" t-value="'border-success'"/>
        <t t-set="badge" t-value="'border-warning'" t-if="record.progress.raw_value &gt; 0"/>
        <t t-set="badge" t-value="'border-danger'" t-if="record.remaining_hours.raw_value &lt; 0"/>
        <div t-attf-class="oe_kanban_align badge {{ badge }}"
            t-attf-title="Remaining hours. Initialy planned: {{ record.planned_hours.raw_value }}h">
            <field name="remaining_hours" digits="[10,0]" />h
        </div>
        
        <t t-set="badge" t-value="'border-danger'" />
        <t t-set="badge" t-value="'border-success'" t-if="record.performance.raw_value &gt; 0"/>
        <div t-if="record.performance.raw_value" t-attf-class="oe_kanban_align badge {{ badge }}" title="Performance">
            <t t-out="'+'" t-if="record.performance.raw_value &gt; 0"/>
            <field name="performance" digits="[2,0]" />%
        </div>
    </t>
</template>


2. Inherited view hr_timesheet.view_task_kanban_inherited_progress like this:


    <record id="view_task_kanban_inherited_progress" model="ir.ui.view">
        <field name="name">project.task.timesheet.kanban.inherited.progress.carpentry</field>
        <field name="model">project.task</field>
        <field name="inherit_id" ref="hr_timesheet.view_task_kanban_inherited_progress" />

        <field name="arch" type="xml">
            <t name="planned_hours" position="replace">
                <t t-call="carpentry_timesheet.kanban_budget_hours" />
            </t>
        </field>
    </record>



Updating the module (CLI -u carpentry_timesheet) works fine but loading the view in web browser gets me the following error:

OwlError: Missing template: "carpentry_timesheet.kanban_budget_hours"

While i can see in Odoo's settings my template correctly created (sorry I can't submit photo so i'm writing here the View content from View settings):

  • view_name: kanban_budget_hours
  • view_type: QWeb
  • model: none
  • active: true
  • inheritance mode: base
  • model data: kanban_budget_hours
  • external_id:  carpentry_timesheet.kanban_budget_hours

Any thoughs ?

Warm welcome

0
Imagine profil
Abandonează
Imagine profil
ALUVAL
Autor Cel mai bun răspuns

Just found the answer: it seems that any template called inside a Kanban view must be declared within the tag of the same Kanban view.

So there cannot be call to external template in Kanban. This is less convenient than for report.

Example:

<t t-name="kanban_sub_part">
    Some sub-part of Kanban view
</t>

<t t-name="kanban-box">
    ....
         <t t-call="kanban_sub_part" />
</t>

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
templating: t-if for string length
templates kanban t-if
Imagine profil
Imagine profil
2
iun. 16
11031
Odoo Helpdesk Email Template Setup
email templates helpdesk V16
Imagine profil
Imagine profil
1
dec. 25
203
How to pass value from employee to contact on odoo 16 using code Rezolvat
V16
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
4
iul. 25
2715
How to not show incoming emails in crm chatter Rezolvat
V16
Imagine profil
Imagine profil
1
iul. 25
2065
Automatic taxes
V16
Imagine profil
Imagine profil
1
apr. 25
1657
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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