OCA / field-service

Field Service Management
https://odoo-community.org/psc-teams/field-service-126
GNU Affero General Public License v3.0
147 stars 238 forks source link

Can't create/open SO with more than one line - Odoo.sh build 15.0.20231120 #1144

Closed sven-ct closed 2 months ago

sven-ct commented 10 months ago

fieldservice_sale 15.0.2.0.2 ## Module

On Odoo.sh from v.15.0.20231120 to v.latest causes an error when trying to create a sales order that contains more than one product (sales line). This error also occurs when you attempt to open an existing sales order. (was working on previous build v15.0.20231113)

Error is:

RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/api.py", line 891, in get return field_cache[record._ids[0]] KeyError: 71

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/fields.py", line 1082, in get value = env.cache.get(record, self) File "/home/odoo/src/odoo/odoo/api.py", line 894, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: 'sale.order.line(71,).product_updatable'

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

Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/home/odoo/src/odoo/odoo/http.py", line 698, in dispatch result = self._call_function(self.params) File "/home/odoo/src/odoo/odoo/http.py", line 368, in _call_function return checked_call(self.db, *args, *kwargs) File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/home/odoo/src/odoo/odoo/http.py", line 357, in checked_call result = self.endpoint(*a, kw) File "/home/odoo/src/odoo/odoo/http.py", line 921, in call return self.method(*args, *kw) File "/home/odoo/src/odoo/odoo/http.py", line 546, in response_wrap response = f(args, kw) File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1324, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1316, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/odoo/src/odoo/odoo/api.py", line 469, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/home/odoo/src/odoo/odoo/api.py", line 456, in _call_kw_multi result = method(recs, *args, **kwargs) File "/home/odoo/src/odoo/odoo/models.py", line 3235, in read return self._read_format(fnames=fields, load=load) File "/home/odoo/src/odoo/odoo/models.py", line 3255, in _read_format vals[name] = convert(record[name], record, use_name_get) File "/home/odoo/src/odoo/odoo/models.py", line 5916, in getitem return self._fields[key].get(self, type(self)) File "/home/odoo/src/odoo/odoo/fields.py", line 1140, in get raise ValueError(f"Compute method failed to assign {missing_recs}.{self.name}") Exception

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

Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/http.py", line 654, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/src/odoo/odoo/http.py", line 301, in _handle_exception raise exception.with_traceback(None) from new_cause ValueError: Compute method failed to assign sale.order.line(72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110).product_updatable

To Reproduce

  1. Install fieldservice and fieldservice_sale
  2. create sales order with more than two product lines.
github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.