public function read($model, $ids, array $fields = []) { if (true === is_numeric($ids)) { $ids = [$ids]; } $criteria = new Criteria(); $criteria->in('id', $ids); return $this->search($model, $criteria, $fields); }
public function testMultipleCriteria() { $criteria = \OpenErpByJsonRpc\Criteria::create(); $criteria->equal('a', 1)->equal('b', 2); $this->assertEquals([['a', '=', 1], ['b', '=', 2]], $criteria->get()); }