Skip to Content
Menu
This question has been flagged
2 Replies
3933 Views

Hello everyone. 

I have this app working in Odoo version 12, but when I'm trying to run it in version 14, it gives me the following error (only the last part of the error is posted):

 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /odoo/odoo-server/custom_addons/EHR/views/vital.xml:43, near
<record id="action_vitals_weight" model="ir.actions.act_window">
        <field name="name">Weight</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">ehr.vitals.weight</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,graph</field>
        <field name="context">{}</field>
        <field name="domain">[('resident_id', '=', active_id)]</field>
        <field name="target">current</field>
        <field name="help" type="html">
          <p class="o_view_nocontent_smiling_face">
            Record your First Weight Entry !
          </p>
        </field>
    </record>

 

Any idea why it gives me this error? (The line 43 is the line the record tag is open). 

Thanks. 

Avatar
Discard
Best Answer

Hello Mohammed

Attribute view_type is not supported in in V14 so remove <field name="view_type">form</field>  from your action and then try.

Thanks

Avatar
Discard
Author Best Answer

Yep, it did the trick! Thanks a bunch Husain :)

An informative link for the changes from odoo12 to odoo13:

"8. Remove the view_type from XML definition. Now by default, it’s form view.

Remove ‘multi’ from ‘ir.actions.act_window’ instead use ‘binding_view_types’ to indicate the view type(list,form).
    Example: <field name="binding_view_types">list</field>

    If using <act_window> tag use ‘binding_views’. Example binding_views="form"."

 https://www.cybrosys.com/blog/odoo-13-migration


Avatar
Discard
Related Posts Replies Views Activity
1
Oct 24
189
0
Dec 23
651
2
May 23
2095
0
Apr 21
1360
1
Jun 20
3180