Skip to Content
Menu
This question has been flagged
1 Reply
1917 Views
  • I have two XML files. one contains models and other contains fields of models.

  • I want to generate file for odoo class for models from XML files.

  • In odoo 14 version.  is it possible to generate odoo class for models from XML file.

Avatar
Discard
Best Answer

Hi,

You can do as follows,

<?xml version='1.0' encoding='UTF-8'?>
<odoo>

<record id="test_model_id" model="ir.model" >
<field name="info"> Main super-class for regular database-persisted Odoo models.

Odoo models are created by inheriting from this class::

class user(Model):
...

The system will later instantiate the class once per database (on
which the class' module is installed).
</field>
<field name="is_mail_thread" eval="True"/>
<field name="is_mail_activity" eval="True"/>
<field name="model">x_test_test</field>
<field name="name">test.test</field>
<field name="state">manual</field>
<field name="transient" eval="False"/>
</record>

</odoo>

Thanks

Avatar
Discard