17
OpenChatter Integration Thibault Delavallée, R&D Engineer

Odoo - Open chatter integration

  • Upload
    odoo

  • View
    3.269

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Odoo - Open chatter integration

OpenChatter IntegrationThibault Delavallée, R&D Engineer

Page 2: Odoo - Open chatter integration

Messaging, OpenChatter

Transversal app

Discuss with customers on

quotations

Feedback on issues

Mailing groups

Discussions on tasks

Subscribe to Newsletters

·

·

·

·

·

Thibault Delavallée ([email protected])

Page 3: Odoo - Open chatter integration

Messaging, OpenChatter

Transversal features

OpenChatter

Communication history

Subscribe, Followers

Action counters

Mail gateway

Aliases

·

·

·

·

·

·

Thibault Delavallée ([email protected])

Page 4: Odoo - Open chatter integration

Demo

Page 5: Odoo - Open chatter integration

OpenChatter / mail.thread

OpenChatter in your model:

classclass MyClass((Model):): _inherit == 'mail.thread'

OpenChatter in your view

<div<div class="oe_chatter">> <field<field name="message_follower_ids" widget="mail_followers"/>/> <field<field name="message_ids" widget="mail_thread"/>/></div></div>

And you are done !

Thibault Delavallée ([email protected])

Page 6: Odoo - Open chatter integration

OpenChatter / mail.thread

Thibault Delavallée ([email protected])

Page 7: Odoo - Open chatter integration

OpenChatter / mail.thread

What did it do ? new fields, linking messaging models

_columns == {{ 'message_ids':: ...... # communication history 'message_follower_ids':: ...... # followers 'message_unread':: ...... # unread messages}}

MyClasss MailMessage((Model):): ......

classclass MailMail((Model):): ......

classclass MailFollowers((Model):): ......

Thibault Delavallée ([email protected])

Page 8: Odoo - Open chatter integration

OpenChatter / mail.thread

What did it do ? new features

defdef message_post((......):):

defdef message_track((......):):

defdef message_subscribe((......):):

defdef message_process((......):):

Thibault Delavallée ([email protected])

Page 9: Odoo - Open chatter integration

Subtypes

Subscription customization

Automatic logging

Thibault Delavallée ([email protected])

Page 10: Odoo - Open chatter integration

Subtypes

Define subtypes in XML

<record<record id="mt_task_assigned" model="mail.message.subtype">> <field<field name="name">>Task Assigned</field></field> <field<field name="res_model">>project.task</field></field> <field<field name="default" eval="False"/>/></record></record>

Thibault Delavallée ([email protected])

Page 11: Odoo - Open chatter integration

Subtypes

Bind them to the model

_columns == {{ 'user_id':: fields..many2one(('res.users',, track_visibility=='onchange'),),}}

_track == {{ 'user_id':: {{ 'project.mt_task_assigned':: lambdalambda self,, cr,, uid,, obj,, c==None:: obj..user_id andand obj..user_id..id,, }}}}

Thibault Delavallée ([email protected])

Page 12: Odoo - Open chatter integration

NeedAction

NeedAction in your model:

classclass MyClass((Model):): _inherit == 'ir.needaction_mixin'

Define a standard message_unread search filter

<filter<filter string="Unread Messagingges" name="message_unread" domain="[('message_unread','=',True)]" help="Unread messages"/>/>

Thibault Delavallée ([email protected])

Page 13: Odoo - Open chatter integration

NeedAction

Action counters

Kanban

Thibault Delavallée ([email protected])

Page 14: Odoo - Open chatter integration

Email aliases

Add alias management in your model:

classclass MyClass((Model):): _inherits == {{'mail.alias':: 'alias_id'}}

_columns == {{ 'alias_id':: fields..many2one(('mail.alias',, 'Alias'),), }}

New record -> new alias

Thibault Delavallée ([email protected])

Page 15: Odoo - Open chatter integration

Aliases and Mail Gateway

alias_contact -> privacy settings

alias_force_thread_id -> redirect emails to a document's

thread or create a new document

·

·

Thibault Delavallée ([email protected])

Page 16: Odoo - Open chatter integration

Summary

Modular approach: inheritance -> features

OpenChatter and Followers -> mail.thread

Needaction -> ir.needaction_mixin

Mail gateway and mail aliases -> mail.alias

Customization through subtypes, tracking

-> inheritance (python)

-> light model decoration

-> a bit of subtypes / aliases (XML)

Play with it !

·

·

·

·

·

·

·

·

·

Thibault Delavallée ([email protected])

Page 17: Odoo - Open chatter integration

Thanks for your attentionQuestions ? [email protected]