# No attribute '\_multivalue\_getter'

**URL:** https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844
**Category:** Developer
**Created:** [February 22, 2021, 9:04pm UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844 "2021-02-22T21:04:43Z")
**Posts on this page:** 6
**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: [February 22, 2021, 9:04pm UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844/1 "2021-02-22T21:04:43Z")

</div>

Hi.  
I am using gnuhealth 3.6 (tryton 5.0) and I am having some issues at the time of create a new record.  
It seems to be something about sequences.  
The error trace at the time of pushing the save button is the next:

```auto
Traceback (most recent call last):
  File "/trytond/wsgi.py", line 73, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 46, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 44, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 176, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/modules/health_ntd_dengue_fiuner/health_ntd_dengue_fiuner.py", line 172, in create
    return super(DengueDUSurvey, cls).create(vlist)
  File "/trytond/modules/health_ntd_dengue/health_ntd_dengue.py", line 177, in create
    config.dengue_du_survey_sequence.id)
  File "/trytond/model/modelstorage.py", line 1441, in __getattr__
    read_data = self.read(list(ids), list(ffields.keys()))
  File "/trytond/model/modelsingleton.py", line 48, in read
    fields_names=fields_names)
  File "/trytond/model/modelsql.py", line 830, in read
    getter_results = field.get(ids, cls, field_list, values=result)
  File "/trytond/model/fields/function.py", line 88, in get
    method = getattr(Model, self.getter)
AttributeError: type object 'gnuhealth.sequences' has no attribute '_multivalue_getter'

Fault: type object 'gnuhealth.sequences' has no attribute '_multivalue_getter'

```

And the function source code on the line 177 on the health\_ntd\_dengue.py is the next:

```
@classmethod
def create(cls, vlist):
    Sequence = Pool().get('ir.sequence')
    Config = Pool().get('gnuhealth.sequences')
    vlist = [x.copy() for x in vlist]
    for values in vlist:
        if not values.get('name'):
            config = Config(1)
            values['name'] = Sequence.get_id(
                config.dengue_du_survey_sequence.id)
    return super(DengueDUSurvey, cls).create(vlist)

```

Any help would be really appreciated. Thanks

---

<div class="post-metadata">

### Author: ![rvong](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/3bc359/32.png) [@rvong](https://discuss.tryton.org/u/rvong)
#### Post date: [February 22, 2021, 9:28pm UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844/2 "2021-02-22T21:28:56Z")

</div>

Without access to the gnuhealth code, my guess is that this issue could be due to 2 possibilities:

1- That the class gnuhealth.sequences has the field “dengue\_du\_survey\_sequence” as a MultiValue field, but forgot to implement or extend the MultiValueMixin class.  
2- The gnuhealth.sequence may have already implements the MultiValueMixin, but the function “multivalue\_model(cls, field)” when called with “dengue\_du\_survey\_sequence” as value for field parameter is not returning the correct MultiValueMixin class.

I hope this can help.

---

<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: [February 22, 2021, 9:57pm UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844/3 "2021-02-22T21:57:38Z")

</div>

Ok. This is were all become new to me.

> [@rvong](#):
>
> 1- That the class gnuhealth.sequences has the field “dengue\_du\_survey\_sequence” as a MultiValue field, but forgot to implement or extend the MultiValueMixin class.

I think you are refering to this

```
class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView):
    __name__ = 'gnuhealth.sequences'
   dengue_du_survey_sequence = fields.MultiValue(fields.Many2One(
                        'ir.sequence',
                         'Dengue Survey Sequence', required=True,
                         domain=[('code', '=', 'gnuhealth.dengue_du_survey')]))

```

> [@rvong](#):
>
> 2- The gnuhealth.sequence may have already implements the MultiValueMixin, but the function “multivalue\_model(cls, field)” when called with “dengue\_du\_survey\_sequence” as value for field parameter is not returning the correct MultiValueMixin class.

No idea. How can I check it?

Thanks

---

<div class="post-metadata">

### Author: ![rvong](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/3bc359/32.png) [@rvong](https://discuss.tryton.org/u/rvong)
#### Post date: [February 22, 2021, 10:24pm UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844/4 "2021-02-22T22:24:55Z")

</div>

> [@fransuar](#):
>
> I think you are refering to this

Yes that’s the definition for the mentioned field as a MultiValue field. Did you add this field yourself?  
If so, I think the class GnuHealthSequences must extend the MultiValueMixin class. If not the error you are getting is the result of that. So the class definition should say:

`class GnuHealthSequences(ModelSingleton, ModelSQL, ModelView, MultiValueMixin): `

And also somewhere in this class’ file should have the definition for another class that implements the “ValueMixin” class which stores the actual value for the dengue\_du\_survey\_sequence field in the DB.

But this is only my guess, I don’t know how the dengue\_du\_survey\_sequence field is related to the GnuHealthSequences class.

> [@fransuar](#):
>
> No idea. How can I check it?
> 
> Thanks

Is this gnuhealth code you using open and available in a public repository so that I can take a look at the implementation of the class GnuHealthSequences?

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [February 23, 2021, 12:04am UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844/5 "2021-02-23T00:04:03Z")

</div>

It sounds like a bug on GNUHealth code.  
You should report it on [it’s bug tracker](https://savannah.gnu.org/bugs/?group=health)

---

<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: [February 23, 2021, 1:43pm UTC](https://discuss.tryton.org/t/no-attribute-multivalue-getter/3844/6 "2021-02-23T13:43:31Z")

</div>

Ok. Thank you very much for the quick answer

> [@rvong](#):
>
> Is this gnuhealth code you using open and available in a public repository so that I can take a look at the implementation of the class GnuHealthSequences?

Yes, it is part of gnuhealth project of gnusolidario.

> [@pokoli](#):
>
> It sounds like a bug on GNUHealth code.  
> You should report it on [it’s bug tracker](https://savannah.gnu.org/bugs/?group=health)

First of all I would try what Richard says. And then, yes I will report it to the bug trackers as soon as possible.

There is a detail I didn’t mention before. This only happens on a production server. On my dev implementation works fine.
