Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Odoo 9 oe_chatter in custom module

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
mailcustom moduleodoo9
5 Odpowiedzi
7815 Widoki
Awatar
David Todd

Right, so this was probably asked a bunch of times (\like here) , but I'm trying to get the chatter in my custom module.

in my models.py, I have _inherit like below

_inherit = ['mail.thread', 'ir.needaction_mixin']

 At the bottom of my form inside views.xml, I have this

</sheet>
</form>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread">
</div>

Finally inside __openerp__.py, I have this

'depends': ['base', 'mail'],

The chatter still does not appear, I have even tried putting it inside the sheet and even using sheet position="after" to no avail. That just creates a white box with nothing in it.


Any help would be greatly appreciated.

0
Awatar
Odrzuć
David Todd
Autor

(Can't edit my question, just says 403 forbidden...)

EDIT:

If I open my custom module inside Chrome's inspector, I can see the oe_chatter div. In the same div however, I also see the class o_form_invisible.

In the web.assest_backend.0.css file, ".o_form_invisible" simply sets "display: none !important;"

If I remove the class from the div element (and also from the div containing o_followers), the chatter appears and functions correctly. Refreshing the page will make Odoo apply that class again to these elements.

How can I prevent odoo from applying the o_form_invisible class to the chatter elements?

Awatar
Deepa Venkatesh
Najlepsza odpowiedź

Everything you have done is correct, except for view definition

Place the oe_chatter div inside form, but after the sheet, hence your code should like this

    </sheet>
    <div class="oe_chatter">
        <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
        <field name="message_ids" widget="mail_thread">
    </div>
</form>


Further if you just need the Chatter box, then ''mail.thread' alone is enough, 

However if you need notification on unread messages on the List/Tree view then use ''ir.needaction_mixin', along with the associated field 'message_unread' in the Tree View, something like below

<tree fonts="bold:message_unread==True" string="TREE VIEW">                    
    <field name="message_unread" invisible="1"/>


Hope this helps you.

2
Awatar
Odrzuć
David Todd
Autor

Hello Deep,

I've tried as you suggested and my view now looks like yours and I get the same result. I should have mentioned this in my OP, but I was pressed for time and only had a few minutes to write it.

I have already tried having it inside the form element and outside. I've even put it inside the main sheet, but after the closing notebook tag.

However, I just used the inspector and saw that the o_chatter div also had a class of o_form_invisible.

If I remove that, the chatter appears (and if I remove o_form_invisible from o_followers, the follower buttons also appear) and I can log messages.

When the page is refreshed, it will again have that class. Would you know how to prevent odoo from applying the class?

Deepa Venkatesh

Hmmmm, not sure what could have gone wrong in the first place... but good to see that you have found a fix.. :)

Awatar
David Todd
Autor Najlepsza odpowiedź

I found a solution, but it's incredibly ungraceful and may impact more than just this module.

Inside your view (or if you are already loading CSS files), do something similar to below

<form string="Test">
<style>
.openerp .o_form_invisible { display: block !important; }
</style>
// The rest of your form
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>

This is not optimal because it may override other things that should be marked invisible and it forces use of !important for every future override that needs to be done with this class.

Manually adding a different class to show the element will not work as CSS rules are evaluated on a "What was added last" basis, and o_form_invisible gets added after any manually added classes.

0
Awatar
Odrzuć
David Todd
Autor

Yes this solution does not fully work. It will show other fields that must be in the form, but are designed to be hidden from the user.

Applying the hidden class will not work because of the previous override

Awatar
Qutechs, Ahmed M.Elmubarak
Najlepsza odpowiedź

Hi, try to put it after the sheet closing and before the form closing :

                    </sheet> 
    <div class="oe_chatter">
        <field name="message_follower_ids" widget="mail_followers"/>
        <field name="message_ids" widget="mail_thread"/>
    </div>
</form>
0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
remove followers from recipient ids mail compose wizard
mail compose odoo9
Awatar
0
lut 18
5002
How to code an email message in Odoo 9 with python? Rozwiązane
mail mailbox odoo9
Awatar
1
kwi 16
5036
Improve massmail Speed.
performance mail mass_mailing odoo9
Awatar
Awatar
3
sie 17
4141
<( Servicio al pasajero)||¿Cómo hablar directamente en Volaris?
mail
Awatar
0
paź 25
567
Emails to Microsoft Outlook/Hotmail are rejected
mail
Awatar
1
paź 25
827
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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