Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Sociale media-marketing
    • E-mailmarketing
    • Sms-marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

adding a button to the chatter topbar

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
6 Antwoorden
3736 Weergaven
Avatar
Reda

Hi I am experiencing difficulty in extending the JavaScript model responsible for handling click events(that contains the different functions of buttons in the chatter topbar like the send message button)of the Chatter topbar buttons.i did add a button to the chatter topbar and i want to make it able to open a wizard that i have created, but i couldn't do that and i don't know even why? 

odoo.define('attach_photo_mobile.WizRequest', function (require) {  
'use strict';
const Chatter = require('mail.chatter'); 
const Registries = require('mail.registerNewModel'); 
Chatter.include({ init() { 
 this._super(...arguments); 
 // Bind your custom function 
this.onClickSendRequest = this.onClickSendRequest.bind(this); },
// Add your custom function to handle the button click 
onClickSendRequest(ev) { 
 ev.preventDefault();
// Define your wizard model name 
const wizardModel = 'attach_photo_mobile.attach_request_wiz';
this.do_action({ 
name: 'Send a request', 
type: 'ir.actions.act_window', 
res_model: wizardModel, 
view_mode: 'form', 
views: [[false, 'form']], 
target: 'new', }); }, });
Registries.Component.add(Chatter);
return Chatter;});

0
Avatar
Annuleer
Reda
Auteur

I have successfully added a new button to the Chatter top bar using XML. This button should be able to open a popup window.However, I am encountering challenges when attempting to extend the JavaScript model and also i am unsure if I am extending the correct one.

Cybrosys Techno Solutions Pvt.Ltd

Hi,

Please refer to the below forum to get a solution about your query

https://www.odoo.com/fr_FR/forum/aide-1/how-can-i-add-a-button-in-chatter-in-odoo-13-166874

Avatar
Synodica Solutions Pvt. Ltd.
Beste antwoord

  you need your xml file like this :

js file like this :

/** @odoo-module **/

import { registerPatch } from '@mail/model/model_core';
import core from 'web.core';
import utils from 'web.utils';
registerPatch({
    name: 'Chatter',
    recordMethods: {
        async onClickbutton(event) {
            
            this.env.services['action'].doAction('modual.action_xml_id')
        },
    },
});



1
Avatar
Annuleer
Avatar
Jainesh Shah(Aktiv Software)
Beste antwoord

Hey Reda,


I hope you are doing well.


I'd like to provide you with some reference screenshots:

Feel free to contact us for further assistance

Hope this answer helps you.

Thanks & Regards,
Email: odoo@aktivsoftware.com     

Skype: kalpeshmaheshwari

0
Avatar
Annuleer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste antwoord

Hi,

In this case, we can inherit the ChatterTopbar ie 

<templates xml:space="preserve">
    <t t-name="chatter_camera.camera" t-inherit="mail.ChatterTopbar" t-inherit-mode="extension" owl="1">
        <xpath expr="//div[hasclass('o_ChatterTopbar_controllers')]" position="inside">
             <button id="camera_button" type="button" t-on-click="chatterTopbar.chatter.onClickButton"  style="color:white;background-color:white;border:none;">
                 <i class="fa fa-camera-retro"/>
             </button>
            // you can add your own id and details
        </xpath>
    </t>
</templates>


Based on this method you can add the button in the Chatter sider under the js function you need to create on the click function -  the name denoted as onClickButton.

onClickButton: function(){
     
        //  Try to add your wizard action
    },


For more reference, you can use the reference app used for the Chatter Camera in the ChatterTop

https://apps.odoo.com/apps/modules/16.0/chatter_camera/


Hope it helps



0
Avatar
Annuleer
Avatar
Osama Hassan
Beste antwoord

I didn't quite get your question.

You want add new functionality in the chatter where it specify but did you try to locate & understanding of "Send Message".
Ref->  https://www.odoo.com/forum/help-1/how-can-i-add-a-button-in-chatter-in-odoo-13-166874
for js you extend the class "Chatter" from mail module & by following send message procedure can create your own event onclick function and use rpc for triggering python function
Ref-> https://stackoverflow.com/questions/65195438/trying-to-send-data-from-javascript-to-python-pos-odoo-using-rpc-query

0
Avatar
Annuleer
Avatar
Ikka Singhe
Beste antwoord

I am also looking for the similar solution.

0
Avatar
Annuleer
Avatar
Reda
Auteur Beste antwoord

i hope someone can help with this bec i really need it


0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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