# Cannot attach files to a singleton model until update the record

**URL:** https://discuss.tryton.org/t/cannot-attach-files-to-a-singleton-model-until-update-the-record/9070
**Category:** Developer
**Created:** [January 26, 2026, 11:42am UTC](https://discuss.tryton.org/t/cannot-attach-files-to-a-singleton-model-until-update-the-record/9070 "2026-01-26T11:42:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fransuar](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/f/59ef9b/32.png) [@fransuar](https://discuss.tryton.org/u/fransuar)
#### Post date: [January 26, 2026, 11:42am UTC](https://discuss.tryton.org/t/cannot-attach-files-to-a-singleton-model-until-update-the-record/9070/1 "2026-01-26T11:42:51Z")

</div>

Hi,  
I am working on a singleton model to make a configuration record, as it is usual on tryton (tryton 6.0). At the time when I install the module where it is defined and try to attach a file to it, it gaves me an error saying:

**A value is required for field “Resource” in “image.jpg” of “Attachment”**

I could “avoid” the error doing a minimal modification on the record, saving it, and after that attach the file without an error

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 27, 2026, 9:54am UTC](https://discuss.tryton.org/t/cannot-attach-files-to-a-singleton-model-until-update-the-record/9070/2 "2026-01-27T09:54:51Z")

</div>

Please fill an [issue](https://bugs.tryton.org/).  
As the client can not distinct between an actually saved singleton and a pseudo-record with default value, I guess we need to tune the `Reference` field to accept any record pointing to a singleton.
