Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1207 มุมมอง

Hello,  I've inherited the res.partner model and added 2 selection value in company_type field as like below


class InheritContract(models.Model):
_inherit = "res.partner"

company_type = fields.Selection(selection_add=[('vendor', 'Vendor'),('panel', 'Panel')])


These two selection value is showing but I can not select them. Does anyone have any solution? problem in the video link

https://youtu.be/53ut0d8KrQE

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

It's not for the radio widget. It's for the _compute_company_type,_write_company_type,onchange_company_type functions

I need to overwrite these functions as per my extra two fields

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
Hi Mahfujul Hasan,

It is showing radio buttons because in the view definition the field has the widget="radio"



If you don't want it to be a radio button then just remove the widget by inheriting the view
อวตาร
ละทิ้ง