Skip to content

Dependency with rma_put_away is missing in rma_repair #527

@millmakerjm

Description

@millmakerjm

When the module rma_repair is installed but rma_put_away not, an exception occurs when viewing an existing customer RMA group.

AttributeError: 'stock.move' object has no attribute 'is_rma_put_away'

Looking at the code this attribute is referenced in rma_repair but defined in rma_put_away. When I manually install rma_put_away the problem is solved.

.filtered(lambda m: m.is_rma_put_away)

Traceback (most recent call last):
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1638, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1665, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1869, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/custom/src/odoo/odoo/http.py", line 700, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/auto/addons/web/controllers/dataset.py", line 42, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/auto/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2996, in read
    return self._read_format(fnames=fields, load=load)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 3175, in _read_format
    vals[name] = convert(record[name], record, use_name_get)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5948, in __getitem__
    return self._fields[key].__get__(self, self.env.registry[self._name])
  File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1210, in __get__
    self.compute_value(recs)
  File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 1392, in compute_value
    records._compute_field_value(self)
  File "/opt/odoo/auto/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
    return super()._compute_field_value(field)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4232, in _compute_field_value
    fields.determine(field.compute, self)
  File "/opt/odoo/custom/src/odoo/odoo/fields.py", line 98, in determine
    return needle(*args)
  File "/opt/odoo/auto/addons/rma_repair/models/rma_order.py", line 19, in _compute_repair_transfer_count
    .filtered(lambda m: m.is_rma_put_away)
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5444, in filtered
    return self.browse([rec.id for rec in self if func(rec)])
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5444, in <listcomp>
    return self.browse([rec.id for rec in self if func(rec)])
  File "/opt/odoo/auto/addons/rma_repair/models/rma_order.py", line 19, in <lambda>
    .filtered(lambda m: m.is_rma_put_away)
AttributeError: 'stock.move' object has no attribute 'is_rma_put_away'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions