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

Sale_Blanket_order #2688

Open
jcchoquet opened this issue Sep 14, 2023 · 0 comments
Open

Sale_Blanket_order #2688

jcchoquet opened this issue Sep 14, 2023 · 0 comments
Labels

Comments

@jcchoquet
Copy link

Module

Sale_balnet_order

Describe the bug

when i will export the blanket orders and i select the field "original quantity", i have an error.

To Reproduce

Affected versions: all

Steps to reproduce the behavior:

  1. select blanket orders
  2. export field 'original quantity' of BO

Expected behavior
error:
Erreur:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/odoo-server/odoo/fields.py", line 955, in get
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo-server/odoo/api.py", line 977, in get
value = self._data[key][field][record._ids[0]]
KeyError: 4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 79, in wrap
return f(*args, **kwargs)
File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 1467, in index
return self.base(data, token)
File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 1414, in base
import_data = records.export_data(field_names, self.raw_data).get('datas',[])
File "/opt/odoo/odoo-server/odoo/models.py", line 804, in export_data
return {'datas': self._export_rows(fields_to_export)}
File "/opt/odoo/odoo-server/odoo/models.py", line 755, in _export_rows
value = record[name]
File "/opt/odoo/odoo-server/odoo/models.py", line 4849, in getitem
return self._fields[key].get(self, type(self))
File "/opt/odoo/odoo-server/odoo/fields.py", line 959, in get
self.determine_value(record)
File "/opt/odoo/odoo-server/odoo/fields.py", line 1072, in determine_value
self.compute_value(recs)
File "/opt/odoo/odoo-server/odoo/fields.py", line 1026, in compute_value
self._compute_value(records)
File "/opt/odoo/odoo-server/odoo/fields.py", line 1017, in _compute_value
getattr(records, self.compute)()
File "/opt/odoo/custom/addons/extra_addons/sale_blanket_order/models/blanket_orders.py", line 163, in _compute_uom_qty
bo.original_uom_qty = sum(bo.mapped('order_id.original_uom_qty'))
File "/opt/odoo/odoo-server/odoo/models.py", line 4600, in mapped
recs = recs._mapped_func(operator.itemgetter(name))
File "/opt/odoo/odoo-server/odoo/models.py", line 4579, in _mapped_func
vals = [func(rec) for rec in self]
File "/opt/odoo/odoo-server/odoo/models.py", line 4579, in
vals = [func(rec) for rec in self]
File "/opt/odoo/odoo-server/odoo/models.py", line 4849, in getitem
return self._fields[key].get(self, type(self))
KeyError: 'order_id'

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)

@jcchoquet jcchoquet added the bug label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant