Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3819 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 22
2485
0
dub 22
2477
1
led 21
7085
1
pro 20
3460
2
pro 20
8239