Hi,
I'm having trouble while saving my field [margin_control]. I don't know where is the error, because it's running as if its going to save the value.
Here my functions
@api.model
def get_default_margin_control(self, fields):
res = super(MarginControlSettings, self).get_values()
ICPSudo = self.env['ir.config_parameter'].sudo()
sale_margin_control = ICPSudo.get_param('sale.margin_control')
res.update(
margin_control=float(sale_margin_control),
)
return res
@api.one
def set_margin_control(self):
super(MarginControlSettings, self).set_values()
self.env['ir.config_parameter'].set_param('sale.margin_control', float(self.margin_control))
This does not give any error but also does not run. The 'margin_control' field placed at Sale->Configuration->Settings page, under Pricing section, next to Margins field. How can I save the value(created by me.)?