[FIX] developer/mixins: chatter integration instructions in form view
Previously, the chatter integration instructions described an outdated method using fields and widgets. However, the integration approach has changed, requiring only the `<chatter/ >` element in the form view with configurable options. This commit updates the instructions accordingly. See odoo/odoo@351b047c37 closes odoo/documentation#12057 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
parent
84051ad9de
commit
a00a6f5583
@ -23,8 +23,14 @@ Basic messaging system
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Integrating messaging features to your model is extremely easy. Simply inheriting
|
Integrating messaging features to your model is extremely easy. Simply inheriting
|
||||||
the ``mail.thread`` model and adding the messaging fields (and their appropriate
|
the ``mail.thread`` mixin and adding the chatter ``<chatter/>`` element to your form
|
||||||
widgets) to your form view will get you up and running in no time.
|
view will get you up and running in no time. The chatter element supports some
|
||||||
|
options to control form behavior:
|
||||||
|
|
||||||
|
* ``open_attachments``: Shows attachment section expanded by default
|
||||||
|
* ``reload_on_attachment``: Reloads form view when attachments are added/removed
|
||||||
|
* ``reload_on_follower``: Reloads form view when followers are updated
|
||||||
|
* ``reload_on_post``: Reloads form view when new messages are posted
|
||||||
|
|
||||||
.. example::
|
.. example::
|
||||||
|
|
||||||
@ -54,11 +60,8 @@ widgets) to your form view will get you up and running in no time.
|
|||||||
<form string="Business Trip">
|
<form string="Business Trip">
|
||||||
<!-- Your usual form view goes here
|
<!-- Your usual form view goes here
|
||||||
...
|
...
|
||||||
Then comes chatter integration -->
|
Then comes chatter integration with options you might want to set -->
|
||||||
<div class="oe_chatter">
|
<chatter open_attachments="True"/>
|
||||||
<field name="message_follower_ids" widget="mail_followers"/>
|
|
||||||
<field name="message_ids" widget="mail_thread"/>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
Reference in New Issue
Block a user