This question has been flagged
1 Reply
1532 Views

I am getting the following error when I try to run Stock Value At Date. I tried to play with the dates to no avial. I would really appreciate any help. Thank you in advance.

I am running Odoo Ves. 10.0 CE


Odoo Server Error
Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/http.py", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/odoo/http.py", line 675, in dispatch
    result = self._call_function(**self.params)
  File "/odoo/odoo-server/odoo/http.py", line 331, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/odoo/odoo-server/odoo/service/model.py", line 119, in wrapper
    return f(dbname, *args, **kwargs)
  File "/odoo/odoo-server/odoo/http.py", line 324, in checked_call
    result = self.endpoint(*a, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 933, in __call__
    return self.method(*args, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 504, in response_wrap
    response = f(*args, **kw)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 862, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 854, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 679, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 664, in call_kw_model
    result = method(recs, *args, **kwargs)
  File "/odoo/odoo-server/addons/stock_account/report/stock_history.py", line 39, in read_group
    not_real_cost_method_products = stock_history.mapped('product_id').filtered(lambda product: product.cost_method != 'real')
  File "/odoo/odoo-server/odoo/models.py", line 4935, in mapped
    recs = recs._mapped_func(operator.itemgetter(name))
  File "/odoo/odoo-server/odoo/models.py", line 4914, in _mapped_func
    vals = [func(rec) for rec in self]
  File "/odoo/odoo-server/odoo/models.py", line 5177, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/odoo/odoo-server/odoo/fields.py", line 869, in __get__
    self.determine_value(record)
  File "/odoo/odoo-server/odoo/fields.py", line 971, in determine_value
    record._prefetch_field(self)
  File "/odoo/odoo-server/odoo/models.py", line 3051, in _prefetch_field
    result = records.read([f.name for f in fs], load='_classic_write')
  File "/odoo/odoo-server/odoo/models.py", line 2991, in read
    self._read_from_database(stored, inherited)
  File "/odoo/odoo-server/odoo/models.py", line 3119, in _read_from_database
    cr.execute(query_str, params)
  File "/odoo/odoo-server/odoo/sql_db.py", line 141, in wrapper
    return f(self, *args, **kwargs)
  File "/odoo/odoo-server/odoo/sql_db.py", line 218, in execute
    res = self._obj.execute(query, params)
DataError: division by zero
Avatar
Discard
Best Answer

As per the error the issue is due to a calculation error division by zero. There is some issue in the values that you have put there. Do check and let me know so that we can get this issue fixed.

Avatar
Discard
Author

Thank you for the reply. Where would I look to see where a 0 would be located?

If you don't have any custom modules then I believe you should find it in your inventory location. I can't really place it from just the error message.