تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2590 أدوات العرض

How can I create a sequence in tree view automatically in the sequence field as attached picture link? A sequence can be an integer field like 1,2,3 and so on...


https://drive.google.com/file/d/1Fv--oCEiQFyZTO5CMHc9RjQrap_bK_ay/view?usp=sharing



الصورة الرمزية
إهمال
أفضل إجابة

Hello Ishfaq,

        Try this,

        In py : sequence = fields.Integer(string='Sequence', default=0)

        In your xml tree view :   <field name = "sequence" widget="handle"/>

        and in your class :

        _order = "sequence"    

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
ديسمبر 22
4161
2
مايو 24
7390
1
مارس 24
1992
0
مارس 24
484
0
مارس 24
2402