This question has been flagged
1 Reply
4907 Views

Hi,

i have two models A and B, where A has a 1:n (one2many) relation to B.

I've defined form and tree views for both models. And, ofcourse, model B is defined as tree inside the form view of model A.

Both models have the mail.thread mixin implemented.

Now the problem: Opening the form popup/dialog of model B within a model A record form view isn't showing the chatter. Opening a model B record in its own (the same as in problematic case) form view, for example on another menu, is showing the chatter as expected.

Has Odoo changed here something or am I doing something wrong?

Avatar
Discard
Best Answer

Just use regular chatter code but don't use class "oe_chatter" if you want to show chatter on popup. This is the code

<record id="your_id" model="ir.ui.view">

    <field name="name">Your Model Name</field>

    <field name="model">your.model</field>

    <field name="arch" type="xml">

        <form>

            <sheet>

                <group>

                    <field name="name" required="1"/>

                </group>                

            </sheet>

            <!-- don't use class="oe_chatter" -->

            <div>

                <field name="message_follower_ids" widget="mail_followers"/>

                <field name="activity_ids" widget="mail_activity"/>

                <field name="message_ids" widget="mail_thread"/>

            </div>

        </form>

    </field>

</record>


Avatar
Discard
Author

Thank you for the answer, even after so long :-) What will happen to a non PopUp form view. The chatter won't look normal i guess?

it is not working on odoo 12