Closed jsebasmuller closed 1 year ago
Hello @jsebasmuller , it looks like it's related to some custom model, as I see /home/odoo/src/custom/trial/saas_trial
in the stack trace.
It looks like a date is defined as boolean for some reason.. Maybe check in your model for this ·date_done
field ?
Hello @ahuret I just saw my stock.picking model and the date_done field is an odoo.Time
I don't think this is related to go-odoo. Maybe you have stock.picking corrupted rows in your database, or some logical error in the module itself ?
closing it. please reopen if you think the issue is related with the library.
Hello again, I'm a bit insistent with this library lol.
I have this error that appears when I am consulting the model stock.picking by ids and I really don't know what the problem could be, I hope you can help me too: D, I leave the error here
Fault(1): Traceback (most recent call last):\n File \"/home/odoo/src/odoo/15.0/odoo/api.py\", line 886, in get\n return field_cache[record._ids[0]]\nKeyError: 8279\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/odoo/src/odoo/15.0/odoo/fields.py\", line 1082, in __get__\n value = env.cache.get(record, self)\n File \"/home/odoo/src/odoo/15.0/odoo/api.py\", line 889, in get\n raise CacheMiss(record, field)\nodoo.exceptions.CacheMiss: 'stock.picking(8279,).l10n_mx_edi_content'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/odoo/src/odoo/15.0/odoo/addons/base/controllers/rpc.py\", line 93, in xmlrpc_2\n response = self._xmlrpc(service)\n File \"/home/odoo/src/custom/trial/saas_trial/controllers/main.py\", line 266, in _xmlrpc\n res = super(OdooRPC, self)._xmlrpc(service)\n File \"/home/odoo/src/odoo/15.0/odoo/addons/base/controllers/rpc.py\", line 73, in _xmlrpc\n result = dispatch_rpc(service, method, params)\n File \"/home/odoo/src/odoo/15.0/odoo/http.py\", line 141, in dispatch_rpc\n result = dispatch(method, params)\n File \"/home/odoo/src/odoo/15.0/odoo/service/model.py\", line 41, in dispatch\n res = fn(db, uid, *params)\n File \"/home/odoo/src/odoo/15.0/odoo/service/model.py\", line 169, in execute_kw\n return execute(db, uid, obj, method, *args, **kw or {})\n File \"/home/odoo/src/odoo/15.0/odoo/service/model.py\", line 94, in wrapper\n return f(dbname, *args, **kwargs)\n File \"/home/odoo/src/odoo/15.0/odoo/service/model.py\", line 176, in execute\n res = execute_cr(cr, uid, obj, method, *args, **kw)\n File \"/home/odoo/src/odoo/15.0/odoo/service/model.py\", line 160, in execute_cr\n result = odoo.api.call_kw(recs, method, args, kw)\n File \"/home/odoo/src/odoo/15.0/odoo/api.py\", line 464, in call_kw\n result = _call_kw_multi(method, model, args, kwargs)\n File \"/home/odoo/src/odoo/15.0/odoo/api.py\", line 451, in _call_kw_multi\n result = method(recs, *args, **kwargs)\n File \"/home/odoo/src/odoo/15.0/odoo/models.py\", line 3229, in read\n return self._read_format(fnames=fields, load=load)\n File \"/home/odoo/src/odoo/15.0/odoo/models.py\", line 3249, in _read_format\n vals[name] = convert(record[name], record, use_name_get)\n File \"/home/odoo/src/odoo/15.0/odoo/models.py\", line 5899, in __getitem__\n return self._fields[key].__get__(self, type(self))\n File \"/home/odoo/src/odoo/15.0/odoo/fields.py\", line 1131, in __get__\n self.compute_value(recs)\n File \"/home/odoo/src/odoo/15.0/odoo/fields.py\", line 2177, in compute_value\n super().compute_value(records)\n File \"/home/odoo/src/odoo/15.0/odoo/fields.py\", line 1290, in compute_value\n records._compute_field_value(self)\n File \"/home/odoo/src/odoo/15.0/addons/mail/models/mail_thread.py\", line 411, in _compute_field_value\n return super()._compute_field_value(field)\n File \"/home/odoo/src/odoo/15.0/odoo/models.py\", line 4263, in _compute_field_value\n fields.determine(field.compute, self)\n File \"/home/odoo/src/odoo/15.0/odoo/fields.py\", line 87, in determine\n return needle(*args)\n File \"/home/odoo/src/enterprise/15.0/l10n_mx_edi_stock/models/stock_picking.py\", line 94, in _l10n_mx_edi_compute_edi_content\n picking.l10n_mx_edi_content = base64.b64encode(picking._l10n_mx_edi_create_delivery_guide())\n File \"/home/odoo/src/enterprise/15.0/l10n_mx_edi_stock/models/stock_picking.py\", line 162, in _l10n_mx_edi_create_delivery_guide\n 'cfdi_date': record.date_done.astimezone(mx_tz).strftime(date_fmt),\nAttributeError: 'bool' object has no attribute 'astimezone'\n