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

[17.0] All in one purchase kit #324

Open
chrisdilbert opened this issue Sep 3, 2024 · 0 comments
Open

[17.0] All in one purchase kit #324

chrisdilbert opened this issue Sep 3, 2024 · 0 comments

Comments

@chrisdilbert
Copy link

chrisdilbert commented Sep 3, 2024

The errors occurs on compute value on account move, there is no _compute method on res.currency model

image

def _compute_amount_total_company_signed(self): """Compute the total amount in company currency for each record.""" for amount in self: amount.amount_total_company_signed = self.env[ 'res.currency']._compute( amount.currency_id, amount.company_id.currency_id, amount.amount_total)

Traceback (most recent call last):
File "/home/odoo/odoo/odoo/http.py", line 1781, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/home/odoo/odoo/odoo/http.py", line 1808, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/odoo/odoo/http.py", line 2012, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/odoo/odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/home/odoo/odoo/odoo/api.py", line 435, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/home/odoo/odoo/addons/web/models/models.py", line 47, in web_search_read
values_records = records.web_read(specification)
File "/home/odoo/odoo/addons/web/models/models.py", line 86, in web_read
values_list: List[Dict] = self.read(fields_to_read, load=None)
File "/home/odoo/odoo/odoo/models.py", line 3556, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/odoo/odoo/models.py", line 3769, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "/home/odoo/odoo/odoo/models.py", line 6649, in getitem
return self._fields[key].get(self, self.env.registry[self._name])
File "/home/odoo/odoo/odoo/fields.py", line 1207, in get
self.compute_value(recs)
File "/home/odoo/odoo/odoo/fields.py", line 1389, in compute_value
records._compute_field_value(self)
File "/home/odoo/odoo/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/odoo/odoo/models.py", line 4893, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/odoo/odoo/fields.py", line 102, in determine
return needle(*args)
File "/home/odoo/addons/cybro/all_in_one_purchase_kit/models/account_move.py", line 41, in _compute_amount_total_company_signed
'res.currency']._compute(
AttributeError: 'res.currency' object has no attribute '_compute'

The above server error caused the following client error:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
Error: An error occured in the owl lifecycle (see this Error's "cause" property)
at handleError (https://x/web/assets/6721275/web.assets_web.min.js:916:101)
at App.handleError (https://x/web/assets/6721275/web.assets_web.min.js:1545:29)
at ComponentNode.initiateRender (https://x/web/assets/6721275/web.assets_web.min.js:1006:19)

Caused by: RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (https://x/web/assets/6721275/web.assets_web.min.js:2888:163)
at XMLHttpRequest. (https://x/web/assets/6721275/web.assets_web.min.js:2892:13)

chrisdilbert added a commit to chrisdilbert/CybroAddons that referenced this issue Sep 18, 2024
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