简体   繁体   中英

How can i add add line and Add section in notebook in odoo13?

I try to add the Add a line and Add a section in the notebook section in odoo13. how can I add these features in odoo13 in XML?

Python code:

class productline(models.Model):  
    _name = 'product.line'

    product_id = fields.Many2one('product.product', string='product')

View definition:

<notebook>
    <page string="Indent details">
        <field name="roni">
            <tree editable="bottom">
                <field name="product_id"/>
            </tree>
       </field>
   </page>
</notebook>

Try this.

 <page string="Indent details"> <field name="roni" widget="section_and_note_one2many"> <tree editable="bottom"> <field name="product_id"/> </tree> </field> </page> </notebook>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM