Hi guys,
I was trying to figure out how to automatically configure app settings with erppeek but I don't seem to find a working way for it. I woud like to automatically check on the option "Discounts" on the sales settings for example:
import erppeek database = 'Mydb' server = 'http://localhost:8069' admin_password = 'password' client = erppeek.Client(server=server)
def configure_app():
config_params = client.model('res.config.settings').browse([]) if config_params:
config_params[0].write({'group_discount_per_so_line': True})
else:
config_params = client_model('res.config.settings').create({}) config_params[0].write({'group_discount_per_so_line': True})
While the record is found and is updated (the boolean is set to True in the database) I don't see it in the front-end and neither is the function activated. I would expect that by setting the boolean it would trigger all the needed behaviour to active the feature but this doesn't seem to be the case.
So, what am I missing here and how should I trigger the settings in order to apply them?
Regards,
Yenthe