Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
6238 Vizualizări

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?

Imagine profil
Abandonează
Cel mai bun răspuns

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>


Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
2
mar. 25
8836
3
iul. 23
11878
0
apr. 22
3727
0
iul. 20
4242
1
feb. 25
1606