This question has been flagged
1 Reply
2469 Views

hi all,

I want to create a Model which contains self relations (Parent-Child like in product.category)  Many2one and One2many fields, i want One2many field should be auto-incremented like id column OR can i modify id column as One2many OR if possible, how i can copy id value in this One2many field? 

please help to resolve my query.

regards

Avatar
Discard
Best Answer

Hi,

For the lines, if you just need line number like 1,2,3 etc, you can use this free module available in the app store as it is or refer the coding done inside the module.

See:- Row Number in tree/list view

if you need to set using the sequence, just override the create method of one2many model and call sequence, see this explaining the same concept: Create Sequential Value in Odoo


Thanks

Avatar
Discard