跳至内容
菜单
此问题已终结
1 回复
6989 查看

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

相关帖文 回复 查看 活动
0
2月 25
1278
0
1月 25
1103
1
12月 24
1405
2
7月 24
2454
1
6月 24
4971