Forum

Benvenuto!

Questo è il forum ufficiale dell'Associazione Odoo Italia. Dopo esserti registrato potrai partecipare ponendo domande o rispondendo a quelle esistenti. Non scordarti di compilare il tuo profilo e consultare le linee guida prima di iniziare a scrivere.

0

[14 CE] AttributeError: 'bool' object has no attribute 'astimezone'

Avatar
Giancarlo Composto

Buongiorno a tutti, da qualche giorno il POS su Odoo 14 CE mi presenta questo errore:

Errore:

Odoo Server Error


Traceback (most recent call last):

  File "/opt/odoo_dev/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

    result = request.dispatch()

  File "/opt/odoo_dev/odoo/odoo/http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "/opt/odoo_dev/odoo/odoo/http.py", line 359, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/opt/odoo_dev/odoo/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/opt/odoo_dev/odoo/odoo/http.py", line 347, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/odoo_dev/odoo/odoo/http.py", line 912, in __call__

    return self.method(*args, **kw)

  File "/opt/odoo_dev/odoo/odoo/http.py", line 531, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo_dev/odoo/addons/web/controllers/main.py", line 1352, in search_read

    return self.do_search_read(model, fields, offset, limit, domain, sort)

  File "/opt/odoo_dev/odoo/addons/web/controllers/main.py", line 1371, in do_search_read

    return Model.web_search_read(domain, fields, offset=offset, limit=limit, order=sort)

  File "/opt/odoo_dev/odoo/addons/web/models/models.py", line 62, in web_search_read

    records = self.search_read(domain, fields, offset=offset, limit=limit, order=order)

  File "/opt/odoo_dev/odoo/odoo/models.py", line 4862, in search_read

    result = records.read(fields)

  File "/opt/odoo_dev/odoo/odoo/models.py", line 3022, in read

    return self._read_format(fnames=fields, load=load)

  File "/opt/odoo_dev/odoo/odoo/models.py", line 3042, in _read_format

    vals[name] = convert(record[name], record, use_name_get)

  File "/opt/odoo_dev/odoo/odoo/models.py", line 5689, in __getitem__

    return self._fields[key].__get__(self, type(self))

  File "/opt/odoo_dev/odoo/odoo/fields.py", line 1021, in __get__

    self.compute_value(recs)

  File "/opt/odoo_dev/odoo/odoo/fields.py", line 1177, in compute_value

    records._compute_field_value(self)

  File "/opt/odoo_dev/odoo/odoo/models.py", line 4069, in _compute_field_value

    getattr(self, field.compute)()

  File "/opt/odoo_dev/odoo/addons/point_of_sale/models/pos_config.py", line 285, in _compute_last_session

    pos_config.last_session_closing_date = session[0]['stop_at'].astimezone(timezone).date()

Exception


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/opt/odoo_dev/odoo/odoo/http.py", line 639, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/opt/odoo_dev/odoo/odoo/http.py", line 315, in _handle_exception

    raise exception.with_traceback(None) from new_cause

AttributeError: 'bool' object has no attribute 'astimezone'


Qualcun altro ha avuto lo stesso problema?


Grazie in anticipo

Avatar
Abbandona
1 risposta
0
Avatar
Alex Comba
Migliore risposta

Buongiorno,

ti conviene aggiornare Odoo e riprovare se il problema si ripresenta ancora.

Avatar
Abbandona