Hello,
I am trying to inherit a view to change the attributes of a button on that view, and it works exactly how I would like it to.
However, when I restart the server, update the apps list and upgrade the module an error is raised. I can reinstall the app just fine without issue and works as expected. But isn't a suitable way to upgrade the app.
Here is the error raised:
odoo.tools.convert.ParseError: "Error while validating view
Field `quotation_count` does not exist
Here is the new view I have created:
<record model="ir.ui.view" id="crm_create_proposal_button">
<field name="name">crm_create_proposal_button</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="sale_crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<data>
<xpath expr="//button[@name='action_sale_quotations_new']" position="attributes">
<attribute name="attrs">
{'invisible': ['|', ('correct_programme_checkbox', '=', False), '|', ('correct_seller_checkbox', '=', False), '|', ('correct_introducer_checkbox', '=', False), '|', ('correct_introducer_checkbox', '=', False), '|', ('correct_customer_company_checkbox', '=', False), '|', ('correct_trustee_checkbox', '=', False), ('correct_final_salary_checkbox', '=', False)]}
</attribute>
</xpath>
</data>
</field>
</record>
There is no field `quotation_count` on the new view but there is on the view which I am inheriting from.
Here are my dependencies for the module:
'depends': ['base', 'crm', 'sale_management', 'sale']
Any help would be greatly appreciated, I am probably overlooking something simple.
Thanks,