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

I want to add a custom dropdown list on my `account.invoice.line` which can have entries added (I don't need edits, but having it doesn't matter). I tried with a selection and reference field, but it doesn't let me add any new entries.

Do I need to create a custom model and a many2one relationship to it for the create and edit ability?

Also, I think I figured out where to change for printing the custom fields, but I am asking here to make sure.

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

Hi,

You can add a new field to the model account. invoice. line . define a new many2one field in same model.

You can use existing model as comodel or you can use a new model you have created.

test_field = fields.Many2one('model_name')

By default for many2one field create and edit option will be available.

Thanks

อวตาร
ละทิ้ง

how to change default properties of selection field

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.พ. 25
852
0
ม.ค. 25
710
Field service upgrade แก้ไขแล้ว
1
ธ.ค. 24
1002
2
ก.ค. 24
1994
1
มิ.ย. 24
4530