For example i have
'property_account_position': fields.property(
'account.fiscal.position',
type='many2one',
relation='account.fiscal.position',
string="Fiscal Position",
view_load=True,
help="The fiscal position will determine taxes and accounts used for the partner.",
)
1 way :
inherit model and redefine field
'property_account_position': fields.property(
'account.fiscal.position',
type='many2one',
relation='account.fiscal.position',
string="Fiscal Position",
view_load=True,
help="The fiscal position will determine taxes and accounts used for the partner.",
required=true,
)
but i think it's not good redefine field just to set it required or set new caption
2 way:
set required in xml
<field name="property_account_position" position="replace">
<field name="property_account_position" required="true"/>
</field>
but in this way i need to set it all xml views
---------------
May be here is a good way just set some field option ?
something like field_name['option_name'] = new_value