İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
4558 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 25
4520
1
Eki 24
2260
0
Ara 23
1920
0
Nis 21
2647
1
Haz 20
4459