No attribute '_multivalue_getter'

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:

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

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.

Ok. This is were all become new to me.

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')]))

No idea. How can I check it?

Thanks

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.

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?

It sounds like a bug on GNUHealth code.
You should report it on it’s bug tracker

Ok. Thank you very much for the quick answer

Yes, it is part of gnuhealth project of gnusolidario.

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.