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

What is the correct approach to reposition the “Create” button in Odoo 17 (OWL-based UI)?

Abonare

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

Această întrebare a fost marcată
1 Răspunde
139 Vizualizări
Imagine profil
Gowtham S

Hello Community,

I am developing a custom module in Odoo 17, and I need to change the default position of the “Create” button in list or form views.

Since Odoo 17 UI is fully OWL-based and the Control Panel layout has changed compared to older versions, I want to confirm the correct and recommended way to customize the placement of the Create button.

My questions:

  1. What is the proper method in Odoo 17 to reposition the Create button?

    • Should this be done by extending the ControlPanel component using JavaScript (OWL patching)?

    • Should I override the XML template?

    • Or is there an official extension point provided by Odoo?

  2. Is overriding the ControlPanel template discouraged in Odoo 17?

    (In Odoo 14–16 it was common, but in 17 many templates are now JS components.)

  3. If the recommended approach is to patch the component, what is the correct pattern to follow for Odoo 17?

Goal

I only want to change where the Create button appears — not its functionality.

Any guidance or official best practice for Odoo 17 would be very helpful.

Thank you.

0
Imagine profil
Abandonează
Imagine profil
Kunjan Patel
Cel mai bun răspuns
Hello Gowtham,
I hope you are doing well

Reposition Create Button in Odoo 17

1. JS - static/src/js/control_panel.js
  /** @odoo-module **/
  import { patch } from "@web/core/utils/patch";
  import { ControlPanel } from "@web/search/control_panel/control_panel";

  patch(ControlPanel.prototype, {
       setup() {
          super.setup();
          this.createButtonPosition = "left";
          this.showCreateButton = true;
      }
  });

2. XML - static/src/xml/control_panel.xml
  <templates>
      <t t-name="web.ControlPanel" t-inherit="web.ControlPanel" t-inherit-mode="extension">
          <xpath expr="//div[hasclass('o_control_panel_actions')]" position="replace">
              <div class="o_control_panel_actions d-flex">
                  <t t-slot="control-panel-create-button"/>
                  <t t-slot="control-panel-additional-actions"/>
              </div>
          </xpath>
      </t>
  </templates>

3. Manifest

  'assets': {
      'web.assets_backend': [
          'your_module/static/src/js/control_panel.js',
          'your_module/static/src/xml/control_panel.xml',
      ],
  },

Key: Use patch() + XML t-inherit for OWL components in Odoo 17.

I hope this information helps you

Thanks & Regards,
Kunjan Patel

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
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