Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
4546 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
4519
1
říj 24
2258
0
pro 23
1920
0
dub 21
2647
1
čvn 20
4459