Heat oil in a cooker at medium heat. Once heated, add onions and garlic and fry them. When the onions turn translucent, add cut tomatoes and fry them till they are mushy.
Add the remaining ingredients and mix well. Add water if needed to adjust it to the desired consistency. Cover the cooker and put the vent on. Let the vent go off once and wait for the cooker to cool down before opening the lid.
An alternate method using the slow cooker - After Step 1.
Transfer the fried tomato - onion paste to the slow cooker. Add the remaining ingredients and mix well. Add water if needed to adjust it to the desired consistency. Cover the cooker and cook on high heat for 3 hours.