baschelik
3/27/2019 - 8:18 AM

Calling function with context

self.env['model_name'].with_context(supplier_id=1).name_of_function()

# getting context values in function
def name_of_function(self):
  supplier_id = self.env.context.get('supplier_id')