33.Default Get Function in Odoo || Set Default Values Using Default Get Function

preview_player
Показать описание
How to set default values using the default get function in odoo. How to override the default get function and set default values for fields in odoo 14 development. Working of odoo default get method. Set default values for field from function in Odoo. Odoo 14 development tutorials.

NOTES:
the default value that we get inside the res variable shown in the video is coming from the default value set for the field along with field definition in the python and from the default values set inside the context.

Рекомендации по теме
Комментарии
Автор

Hi thank you for the video. Can you explain the difference between the default_get fuction and the create fuction (above the def default_get in the patient.py)? Because as I see, the create function also sets the default value of 'note' field to 'New Patient' and sequential value for 'reference' field. Are these fuctions similar?

hoangvunhat
Автор

can you explain how to disable ACTION button for a group of users?

williamshuyinqiu
Автор

What is the different with using default attribute in field model ?

indeveloperid
Автор

Thank you for the good tutorial brother 🙂

NMNaufaldo
Автор

I cant change the default_get value in form

DEENALAURA
Автор

thank you for your videos it is amazing, i face a problem when i use default_get method
@api.model

def default_get(self, fields):
print("override default get")
error (AttributeError: 'NoneType' object has no attribute 'get')
can you explain why this error please.

abdulazimatapy
visit shbcf.ru