跳至内容
菜单
此问题已终结
4197 查看

I have created a custom module. In that, I want to use the functionality which is already exist in Odoo;

Settings-->Database structure-->Fields-->Create.

But this existing feature restricts me to add x_ at the beginning of my custom field name by prompting the validation message.

Then, I tried to override the  def _check_name(self):  method of ir.model.fields model (which is in ir.models.py file) by inheriting the model, but it didn't work.

All I want is, when I import the fields by importing CSV file, the fields present in CSV file should be created if it does not exist in the particular model.

How can I achieve this? Or How to create fields dynamically?

形象
丢弃
相关帖文 回复 查看 活动
1
11月 24
19809
1
9月 23
2657
3
5月 23
5348
7
4月 23
48614
1
12月 22
7512