Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • 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
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Integrate OpenChatter (mail.thread) in existing Model

Odoberať

Get notified when there's activity on this post

This question has been flagged
inherit7.0openchatter
3 Replies
27318 Zobrazenia
Avatar
Marvin Haß

Hello,

is it possible to integrate the OpenChatter (mail.thread) in an existing Model like stock.move?

 

Regards

3
Avatar
Zrušiť
Avatar
Dhinesh
Best Answer

Hi, This is a simple example. Add this _inherit = ['mail.thread', 'ir.needaction_mixin'] to stock.move in py:

class stock_move(models.Model):
    _name = "stock.move"
    _inherit = ['stock.move','mail.thread', 'ir.needaction_mixin']

In xml:

Add this before to your end of form tag:
<div class="oe_chatter">
    <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
    <field name="message_ids" widget="mail_thread"/>
</div>

To track changes in your field, you may want to use track visiblity. You can find detail here....

4
Avatar
Zrušiť
Avatar
Marvin Haß
Autor Best Answer

I'm working in Version 7.

class stock_move(osv.osv):
    _name = "stock.move"
    _inherit = ['mail.thread', 'ir.needaction_mixin']

Raises:

Traceback (most recent call last):
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/cli/server.py", line 97, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/registry.py", line 203, in get
    update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/registry.py", line 233, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/loading.py", line 351, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/loading.py", line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/loading.py", line 165, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/module.py", line 374, in init_module_models
    result = obj._auto_init(cr, {'module': module_name})
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/osv/orm.py", line 3114, in _auto_init
    self._o2m_raise_on_missing_reference(cr, f)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/osv/orm.py", line 3419, in _o2m_raise_on_missing_reference
    raise except_orm('Programming Error', "There is no reference field '%s' found for '%s'" % (f._fields_id, f._obj,))
except_orm: ('Programming Error', "There is no reference field 'sale_line_id' found for 'stock.move'")

######################

class my_stock_move(osv.osv):
    _inherit = ['stock.move', 'mail.thread', 'ir.needaction_mixin']

Raises:

Traceback (most recent call last):
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/cli/server.py", line 97, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname,update_module=update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/registry.py", line 203, in get
    update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/registry.py", line 233, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/loading.py", line 351, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/loading.py", line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/loading.py", line 161, in load_module_graph
    models = pool.load(cr, package)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/modules/registry.py", line 118, in load
    model = cls.create_instance(self, cr)
  File "/home/marvin/dev/erp-dev/7.0/parts/odoo/openerp/osv/orm.py", line 898, in create_instance
    raise TypeError('_name is mandatory in case of multiple inheritance')
TypeError: _name is mandatory in case of multiple inheritance

 

1
Avatar
Zrušiť
Dhinesh

I have updated my answer. Put _name = "stock.move" and try again.

Marvin Haß
Autor

Thanks! It works! I have not enough karma to vote or to mark my question as answerd... Stupid!

Dhinesh

Karma restrictions have been changed now due to spammers. I have upvoted your question so that you can get minimum points.

Avatar
Ivan
Best Answer

@Dhinesh forgets to put 'stock.move' in the _inherit.  It should be _inherit = ['stock.move', 'mail.thread', 'ir.needaction_mixin'].  Well, to get the discussion thread _inherit = ['stock.move', 'mail.thread'] would suffice.  The 'ir.needaction_mixin' is used more for validation feature (if an action is needed for this record).

0
Avatar
Zrušiť
Dhinesh

Thanks. I forget to add 'stock.move' in _inherit.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
how can I add my google analytic tracking code to an inherit module (depend on web)
web analytic inherit 7.0
Avatar
0
mar 15
5887
Is Webkit inheritance possible?
inheritance webkit inherit 7.0
Avatar
0
mar 15
4192
How to do Prototpye inherit in odoo
inherit
Avatar
Avatar
Avatar
Avatar
Avatar
4
mar 24
4674
Inheritance for account.financial.report model?
inherit
Avatar
Avatar
1
okt 23
6629
Difference between_inherit (no _name property) and _inherit (_name property value same as _inherit) ?
inherit
Avatar
Avatar
1
jún 22
8004
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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