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

How to add new button near the create button in odoo 16

Abonare

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

Această întrebare a fost marcată
4 Răspunsuri
12570 Vizualizări
Imagine profil
keyaan janis

Hi all, 

I'm new to odoo. Somebody, please tell me. How to add a button near create button in odoo 16. 

0
Imagine profil
Abandonează
Imagine profil
Malik Imad Khan
Cel mai bun răspuns

Hello Keyaan,

a button cannot be created with the Studio and has to be created with writing a new view or editing an existing one and then adding the code for a button.


Here below are the steps for creating a button:

1) First create a server action by going to the Settings=> Technicals => Server actions.


 Code in the above screenshot: records.action_confirm()   

Once the server action is saved, look at the url and note the number that is after id. In my case, it was 540.


2) Then go to the Technical => views => create new view. 


By Following the above steps, you will be able to create a button before the confirm button in the Sales module. 


1
Imagine profil
Abandonează
Imagine profil
Adil Akbar
Cel mai bun răspuns

Hi, you can follow this: https://youtu.be/MCEKCBA7zGk

Hope it helps,

Thanks

0
Imagine profil
Abandonează
Imagine profil
Dương Nguyễn
Cel mai bun răspuns

Hi I have this tutorial module which will help you
https://apps.odoo.com/apps/modules/16.0/d_button_near_create_button/

0
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hello,

In Odoo we can add buttons near the 'Create' button by extending the view.

For example, if we need to add an 'Upload' button near the 'Create' Button in the Kanban view then extend 'KanbanView.buttons'.

Example

<templates>


    <t t-extend="KanbanView.buttons" t-name="BillsKanbanView.buttons">


        <t t-jquery="button" t-operation="after">


            <button type="button" class="btn btn-secondary  on_upload"  


         name="upload_button">


                Upload


            </button>


        </t>


    </t>


</templates>


if you want to replace the Create button then set the 't-operation' value to 'replace'

<t t-jquery="button" t-operation="replace">

we can also specify the model by adding conditions like

<button t-if="widget.modelName == '<model_name>'">Upload</button>

After adding the button we can create a function in js,
by extending 'web.KanbanController' you can add an action for the newly created button

Example

odoo.define('example.uploadButton', function(require) {
var KanbanController = require('web.KanbanController');
var KanbanButton = KanbanController.extend({
buttons_template: '',
events: _.extend({}, KanbanController.prototype.events, {
'click .on_upload': '_onUpload',
},
_onUpload: function(){
// this function will execute the Button click
}
}

Regards

0
Imagine profil
Abandonează
Cybrosys Techno Solutions Pvt.Ltd

In order to add button in tree view, try the following:
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="web.ListView.Buttons" t-inherit-mode="extension">
<xpath expr="//*[@class='btn btn-secondary fa fa-download o_list_export_xlsx']"
position="after">
<button type="button" class="btn btn-secondary o_list_new_button"
t-on-click="actionDef">New Button</button>
</xpath>
</t>
</templates>

Gautam

hello,
I am stuck in opening a record from list view when target is new in js action. Can you explain this using example?

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