Skip to Content
Menu
This question has been flagged
1 Reply
963 Views

Hi, I have an error 

Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo13/source/odoo/http.py", line 619, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo13/source/odoo/http.py", line 309, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo13/source/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/opt/odoo13/source/odoo/http.py", line 664, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo13/source/odoo/http.py", line 345, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo13/source/odoo/service/model.py", line 93, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo13/source/odoo/http.py", line 338, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo13/source/odoo/http.py", line 909, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo13/source/odoo/http.py", line 510, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo13/source/addons_custom/izi_mrp_delivery_packing_barcode/controllers/main.py", line 88, in get_set_barcode_view_state
    return request.env[model_name].browse(record_id).get_barcode_view_state()
  File "/opt/odoo13/source/addons_custom/izi_mrp_delivery_packing_barcode/models/mrp_packing_barcode_model.py", line 170, in get_barcode_view_state
    package_id = self.env['stock.quant.package'].browse(move_line_id.pop('package_id')[0]).read(['id','name'])
TypeError: 'bool' object is not subscriptable.

Anyone can help me, please!

Thank you very much in advance




Avatar
Discard
Best Answer

Hello. You might get this error as the logger message says in line 170. I think that on the piece of code: 

move_line_id.pop('package_id')[0]).read(['id','name']

It might be because move_line_id.pop('package_id') in your case returns a boolean probably False.

False[0] does not work.

Have a nice day.

Avatar
Discard