I'm working on odoo module development, left to me by previous programmer. I figured out how most of the code works, but there are some weird parts, that too hard to understand. One example down below: two records (form and action of this form), that referring to each other
<!-- temp validation action--> <record id="model_action_id" model="ir.actions.act_window"> <field name="name">Password validation</field> <field name="type">ir.actions.act_window</field> <field name="res_model">scores.temp</field> <field name="view_type">form</field> <field name="target">new</field> <field name="view_mode">form</field> <field name="view_id" ref="Scores.my_specific_view"/> </record> <!-- temp validation form--> <record id="my_specific_view" model="ir.ui.view"> <field name="name">password.form2</field> <field name="model">scores.temp</field> <field name="act_window_id" ref="Scores.model_action_id"/> <field name="arch" type="xml"> <form string="Password Form Validation"> <sheet> <group> <field name="user_id" /> <field name="password" password="True" default_focus="1"/> <button name="validation" type="object" string="Sign" context="{'password':password,'user_id':user_id,}" class="oe_inline oe_stat_button". icon="fa-check-circle-o" /> <button name="cancel" string="Cancel" special="cancel" class="oe_inline oe_stat_button" icon="fa-stop" /> </group> </sheet> </form> </field> </record>
When I'm trying to install this module on a new server, it gives error:
ParseError: "External ID not found in the system: Scores.my_specific_view"
It's searching for my_specific_view, but it's obviously not defined yet at this point. Fun part is, it somehow works on the old server, but I don't exactly understand how. It may be caused by first record, that somehow loaded in memory before reference was made, but that's my only theory. I'll try to find a way to contact programmer, who made it, but it may take a while. Any advices of how to avoid this conflict during installation will be highly appreciated.
No comments:
Post a Comment