Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4348 Näkymät

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?

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
marrask. 24
20215
1
syysk. 23
3027
3
toukok. 23
5631
7
huhtik. 23
49005
1
jouluk. 22
7869