This question has been flagged
2 Replies
3032 Views

For some unkown reason, the "speaker" field that the Event module puts into the partner form does not show in a couple of databases I have. Strangely (or not), it shows in yet another database.

I'm building a module that relies on this feature so, as you can imagine, I'm stuck right now.

Has anyone come across with such a problem before?

This is the view responsible for the "speaker" field (all the other changes are ok)

<record id="view_event_partner_info_form" model="ir.ui.view">
            <field name="name">res.partner.event.info.inherit</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <field name="supplier" position="after">
                    <field name="speaker"/>
                </field>
                <xpath expr="//page[@name='page_history']" position="attributes">
                    <attribute name="invisible">False</attribute>
                </xpath>
                <xpath expr="//page[@name='page_history']" position="inside">

                    <group name="grp_event" string="Events">
                        <field name="event_ids" colspan="4" nolabel="1">
                            <tree string="Events">
                                <field name="name" string="Event"/>
                                <field name="main_speaker_id"/>
                            </tree>
                        </field>
                    </group>

                    <group name="grp_registration" string="Registrations">
                        <field name="event_registration_ids" colspan="4" nolabel="1">
                            <tree string="Events Registration">
                                <field name="event_begin_date" string="Date"/>
                                <field name="event_id" />
                                <field name="nb_register"/>
                                <field name="state"/>
                                <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
                                <button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
                                <button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
                            </tree>
                        </field>
                    </group>
                </xpath>
            </field>
       </record>
Avatar
Discard
Best Answer

Are any of your other modules removing/modifying the supplier in the view, so the position=after is unable to put the speaker field in the right place?

Also, it might be possible that if the module dependencies are in the wrong order, the supplier field is not there yet when you're trying to append after it.

Since it works in some databases and not in others, it sure sounds like some kind of a module conflict.

Avatar
Discard
Author

I don't think so. I've run a search through the modules and it only exists in the "Event"one (meaning, no where else is the field declared or manipulated in a view).

I've tried to use the "sequence" (or whatever it is called) parametre but it did no good, either.

The really strange thing is that the databases where the thing does not work should be replicas of the one I'm developing in (which is the one where the field appears).

But I'll try to go deeper into the module conflict thing...

Alex Malone's answer here might be helpful (unless the priority attribute is the one you already tried). http://help.openerp.com/question/12293/how-to-add-a-new-state-to-sales-order/?answer=12443#post-id-12443 Hopefully you'll get the issue sorted out.

Author Best Answer

Here's what I did:

after a few experiments, I found out that by moving the field to another position within the form, it would show up. So, in my own module, I inherited the view that created the "speaker" field, removed it and then put it in another place. And it worked.

Go figure :)

Avatar
Discard