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
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    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

Hide attachments button in the chatter

Abonare

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

Această întrebare a fost marcată
attachmentschatterstudio
1 Răspunde
5594 Vizualizări
Imagine profil
Emilio San Jose

Hi everyone,


Aiming to create a space for a private image gallery, we'd like to show the Attachment button in the chatter ONLY to a custom group:




Any way to do this in Odoo Online?


Thanks!

0
Imagine profil
Abandonează
Imagine profil
Tommaso
Cel mai bun răspuns

I don't know if this is the proper way but it works for Odoo 12.


Now you can add the attribute hide_to with the name of the group in the oe_chatter div (You also need to replace * with div tag in `appendTo($('*'))` )



// in your xml add this attribute to the oe_chatter div: // hide_to="your_module.your_group"

odoo.define('custom_widgets.chatter', function (require) {   

"use strict";

const Chatter = require('mail.Chatter');   

const FormRenderer = require('web.FormRenderer');   

const Session = require('web.session');

FormRenderer.include({       

    _renderNode: function (node) {

        if (node.tag === 'div' && node.attrs.class === 'oe_chatter') {

        const disable_attachment_box = this._disableAttachmentBox(node.attrs)

        if (!this.chatter) {

            this.chatter = new Chatter(this, this.state, this.mailFields, {                       

            isEditable: this.activeActions.edit,                       

            viewType: 'form',                       

            disable_attachment_box: disable_attachment_box,

        });                   

        this.chatter.appendTo($('*'));

        this._handleAttributes(this.chatter.$el, node);

        } else {  this.chatter.update(this.state); }               

        return this.chatter.$el;           

    }  else {               

        return this._super.apply(this, arguments);           

    }       

},         

_checkGroup: function (group) {           

return Session.user_has_group(group).then((res) => { return res });       

},       

_disableAttachmentBox: function (attrs) {           

    const disable = 'disable_attachment_box' in attrs;

    if ("hide_to" in attrs && attrs.hide_to)                

        return disable || this._checkGroup(attrs.hide_to); 

    else return disable      

}   

});

});





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
Email Statistics in Chatter
email chatter studio
Imagine profil
0
iun. 19
4371
add attachments_ids to message_post Error!
attachments chatter odoo8
Imagine profil
1
mai 16
7381
Helpdesk Ticket website chatter
messages attachments helpdesk chatter
Imagine profil
1
nov. 23
2462
Ir.Attachment merge duplicates / on which Webpage is linked? Rezolvat
attachments studio ir.attachment merging
Imagine profil
1
mar. 23
2726
Odoo Website Chatter attachments Rezolvat
attachments chatter website odoo
Imagine profil
Imagine profil
Imagine profil
2
oct. 19
6039
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