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

Hello,


I'm on Odoo v9 and I'm trying to optimize my hr_expense module, and adding new custom fields.

But to run it well I need to delete the "required=true" of some base fields of the module.

I tried via the graphic interface, and this error displayed :

Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!

So I modified the Python code of the model hr_expense.py, deleting the "required=true" I didn't need. I restarted Odoo, but nothing happened.

I'm not an expert with Odoo so can anybody explain me why it doesn't work and how should I proceed ?

Thanks a lot !

Regards

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

Did you update the module? If this does not help, you should change the field in the database directly (table ir_model_fields)

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks a lot for your quick feedback, it works ! That was the step I was missing. Regards