This question has been flagged

is this code sufficient in Odoo9 ?

- Or some properties are missing in Odoo 9 ?

model:

class library(models.Model):
    _name = 'damjan.library'
    name = fields.Char()
    book = fields.Text()
    author = fields.Text()
    description = fields.Text()
    book_id = fields.Many2one('product.product', 'Parent Product')
    book_ids = fields.One2many('product.product', 'parent_id', 'Products')

The view:

    <record model="ir.ui.view" id="damjan.lib_list">
      <field name="name">damjan lib_list</field>
      <field name="model">damjan.library</field>
      <field name="arch" type="xml">
        <tree>
          <field name="name"/>
          <field name="book"/>
          <field name="author"/>
          <field name="books" widget="one2many_list" />
        </tree>
      </field>
    </record>
Avatar
Discard
Author

But my code doesn't work, due to project_id id is not found in Odoo9.

Best Answer

Yes this code sufficient in Odoo9

Avatar
Discard