Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odoo Server Error while add a '磅單' into '對帳單' #41

Open
ChungChiuHung opened this issue Jun 14, 2024 · 0 comments
Open

Odoo Server Error while add a '磅單' into '對帳單' #41

ChungChiuHung opened this issue Jun 14, 2024 · 0 comments

Comments

@ChungChiuHung
Copy link
Collaborator

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 891, in get
return field_cache[record._ids[0]]
KeyError:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1082, in get
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 894, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'agriculture.crop(,).TotalDryingFee'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 891, in get
return field_cache[record._ids[0]]
KeyError:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1082, in get
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 894, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'agriculture.crop(,).DryingFee'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5231, in ensure_one
_id, = self._ids
ValueError: too many values to unpack (expected 1)

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

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 368, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 357, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 921, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 546, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1324, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1316, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 469, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 456, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6477, in onchange
snapshot0.fetch(name)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6311, in fetch
self[name] = [Snapshot(line, tree[name]) for line in record[name]]
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6311, in
self[name] = [Snapshot(line, tree[name]) for line in record[name]]
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6303, in init
self.fetch(name)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6313, in fetch
self[name] = record[name]
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5920, in getitem
return self._fields[key].get(self, type(self))
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1131, in get
self.compute_value(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1294, in compute_value
records._compute_field_value(self)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 411, in _compute_field_value
return super()._compute_field_value(field)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4270, in _compute_field_value
fields.determine(field.compute, self)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 87, in determine
return needle(*args)
File "/mnt/extra-addons/agriculture_app/models/agriculture_crop.py", line 233, in _compute_total_drying_fee
record.TotalDryingFee = record.CropWeight * record.DryingFee
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1131, in get
self.compute_value(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1294, in compute_value
records._compute_field_value(self)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 411, in _compute_field_value
return super()._compute_field_value(field)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4270, in _compute_field_value
fields.determine(field.compute, self)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 87, in determine
return needle(*args)
File "/mnt/extra-addons/agriculture_app/models/agriculture_crop.py", line 550, in _compute_drying_fee
if(self.CropStatus == 'WET'):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1075, in get
record.ensure_one()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5234, in ensure_one
raise ValueError("Expected singleton: %s" % self)
Exception

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

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 654, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Expected singleton: agriculture.crop(, )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant