Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6967 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

how to change default properties of selection field

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 25
1256
0
thg 1 25
1096
1
thg 12 24
1385
2
thg 7 24
2447
1
thg 6 24
4961