Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3844 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
lug 22
2510
0
apr 22
2514
1
gen 21
7142
1
dic 20
3496
2
dic 20
8279