跳至內容
選單
此問題已被標幟
1 回覆
3850 瀏覽次數

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

頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 22
2517
0
4月 22
2520
1
1月 21
7156
1
12月 20
3499
2
12月 20
8282