Skip to content

Instantly share code, notes, and snippets.

@kururu-abdo
Created June 8, 2025 15:05
Show Gist options
  • Save kururu-abdo/ebd014db4f81248dcfedd41931f63725 to your computer and use it in GitHub Desktop.
Save kururu-abdo/ebd014db4f81248dcfedd41931f63725 to your computer and use it in GitHub Desktop.
final productResults = await _odooClient.callKw({
'model': 'product.template', // Selecting from 'product.template' model
'method': 'search_read',
'args': [],
'kwargs': {
'domain': [
['sale_ok', '=', true], // WHERE sale_ok = true
['list_price', '>', 100.0], // AND list_price > 100.0
'|', // OR (applies to the next two conditions)
['type', '=', 'product'], // type = 'product'
['type', '=', 'consu'], // OR type = 'consu'
['!', ['active', '=', false]], // NOT active = false (i.e., active = true)
],
'fields':[
//fields here
],
OFFSET 0 (first page)
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment