# Test 'search\_rec\_name' method

**URL:** https://discuss.tryton.org/t/test-search-rec-name-method/8008
**Category:** Developer
**Created:** [November 4, 2024, 11:52am UTC](https://discuss.tryton.org/t/test-search-rec-name-method/8008 "2024-11-04T11:52:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)
#### Post date: [November 4, 2024, 11:52am UTC](https://discuss.tryton.org/t/test-search-rec-name-method/8008/1 "2024-11-04T11:52:18Z")

</div>

Hello everyone

Is there a way to test the ‘search\_rec\_name’ method in a scenario or something?

Sincerely

---

<div class="post-metadata">

### Author: ![acaubet](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/acaubet/32/1493_2.png) [@acaubet](https://discuss.tryton.org/u/acaubet)
#### Post date: [November 4, 2024, 11:56am UTC](https://discuss.tryton.org/t/test-search-rec-name-method/8008/2 "2024-11-04T11:56:00Z")

</div>

`search_rec_name` is an internal method, you can use `find()` with a domain for rec\_name, like:  
`>>> number, = Number.find([('rec_name', '=', 'CODE10')])`

this will trigger `search_rec_name`

---

<div class="post-metadata">

### Author: ![nicoe](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/nicoe/32/2880_2.png) [@nicoe](https://discuss.tryton.org/u/nicoe)
#### Post date: [November 4, 2024, 11:56am UTC](https://discuss.tryton.org/t/test-search-rec-name-method/8008/3 "2024-11-04T11:56:22Z")

</div>

By searching on `rec_name`?

I must say I don’t understand your issue 🙂.

---

<div class="post-metadata">

### Author: ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)
#### Post date: [November 4, 2024, 3:24pm UTC](https://discuss.tryton.org/t/test-search-rec-name-method/8008/4 "2024-11-04T15:24:57Z")

</div>

The obvious …

Thanks a lot

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [November 5, 2024, 3:25pm UTC](https://discuss.tryton.org/t/test-search-rec-name-method/8008/5 "2024-11-05T15:25:55Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
