The modification introduced in 5307f47d975c3b3ebd87c7f7e2248802a1aa5be7
was not properly managing the 'force_create' argument. When it is set to
false, we only look for existing accounts with the current cursor and
end up returning an empty recordset when the account was created during
the same transaction. Ex:
// Do stuff
IapAcc = self.env['iap.account']
IapAcc.get('my_service')
IapAcc.get_credit('my_service')
// Other stuff
closesodoo/odoo#48201
X-original-commit: c78070dc22f99867b4b1f3a52cd11543da571fe4
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>