Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2452 Переглядів

I work on Odoo 12, I want to create a module, installation is ok but when I wan to upgrade with a xml file, I have some errors.I'm on odoo 12 Here xml code:

<record model="ir.ui.view" id="student_form_view">
      <field name="name">Student From</field>
      <field name="model">university.student</field>
      <field name="arch" type="xml">
        <from>
          <field name="f_name"/>
          <field name="l_name"/>
          <field name="identity_card"/>
          <field name="adress"/>
          <field name="birthdays"/>
          <field name="sexe"/>
          <field name="registration_date"/>
          <field name="email"/>
          <field name="phone"/>
        </from>
      </field>
    </record>

And here error:

odoo.tools.convert.ParseError: "Wrong value for ir.ui.view.type: 'from'" while parsing /home/odoo/Documents/custom_addons/student_module/views/student_views.xml:23, near
<record model="ir.ui.view" id="student_form_view">
      <field name="name">Student From</field>
      <field name="model">university.student</field>
      <field name="arch" type="xml">
        <from>
          <field name="f_name"/>
          <field name="l_name"/>
          <field name="identity_card"/>
          <field name="adress"/>
          <field name="birthdays"/>
          <field name="sexe"/>
          <field name="registration_date"/>
          <field name="email"/>
          <field name="phone"/>
        </from>
      </field>
    </record>

If you have any ideas, I will be very grateful ! Thank you !

Аватар
Відмінити
Найкраща відповідь

The tag "from" is wrong. There is no such tag in Odoo. It must be "form"

<form>
.... # Your fields
</form>

Just change tag "from" to "form" and update/install your module and it will work.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
Odoo Mail Sending Limit Вирішено
2
груд. 23
14828
0
жовт. 23
33
3
жовт. 23
788
1
жовт. 23
569
1
серп. 23
2528