Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3876 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 22
2547
0
Apr. 22
2563
1
Jan. 21
7176
1
Dez. 20
3537
2
Dez. 20
8298