In odoo context dictionary is frozen so no one can update it,
for that one solution is also available is calling method using with_context
.
ctx = self.env.context.copy()
ctx.update({'additional_parameter' : value})
self.with_context(ctx).methodname()
but when we use the same pattern to call super method then result turns into the infinite call.
ctx = self.env.context.copy()
ctx.update({'additional_parameter' : value})
super(product_product, self).with_context(ctx).create(vals)
Any help will be highly appreciated.
I think you should try something like this at respective line:
super(product_product, self.with_context(ctx)).create(vals)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With