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

In the my model, this was declared

address_to = fields.Selection([( 'sc_address' , 'Contact Address' ),

                                   ( 'location_address' , 'Location Address' )],

                                  string = "Address" ,

                                  default = 'sc_address' )

And this was in the view

<group string = "Address" >

<group>​​

    < field name = "address_to" widget = "radio" options = "{'horizontal': true}" />

    < field name = "frequent_location_id" invisible = "address_to != 'location_address'" />

  </ group >

</ group >

However, when viewing the form, nothing was selected.


It is weird because another identifier was also declared in the model

freight_collect_prepaid = fields.Selection([( 'Collect' , 'Collect' ),

                                                ( 'Prepaid' , 'Prepaid' )],

                                               string = "Freight Billing" ,

                                               default = "Collect" )

And in the view, when viewing the form, it was selected.

< group string = "General Details" >

       < field name = "bl_number" invisible = "transport == 'air'" />

       < field name = "freight_collect_prepaid" required = "1" widget = "radio"

                                               options = "{'horizontal':True}" />

</ group >


Where else will I look to correct this, I need the default value to be selected. Should I make it required so it will have a default?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
فبراير 24
1239
2
يناير 23
1862
1
أغسطس 22
4484
1
فبراير 22
1651
1
يناير 19
3519