Issue for bi_customer_overdue_statement (#4,544)
Status: OPEN
Date: 08/11/2021
ID: 4,544
S/O number: SO2021/1667245
Reviewer: Tirth Mehta
Module Name: bi_customer_overdue_statement
Version: 14.0

Assigned to
Sachinay Bhujbal

We hope to have identified the source of the trace back error. See below:

User: developer

Password: F!xTh!5Err0r

On account move there are large numbers of sales transactions where the due date is not set.

See customers: Elite Electrical for an example

Therefore when the report runs we get the error as no due date (ml.date_maturity) is available for comparison. (diff = today - ml.date_maturity)

When any partner that has an account move where the maturity_date is not set is accessed we receive the server error. Thereefore we cannot leave the module installed even though it will produce statements for customers for whom all account moves have a due date set.


Odoo Server Error

Traceback (most recent call last):

File "/opt/odoo14/odoo/odoo/addons/base/models/", line 237, in _dispatch

result = request.dispatch()

File "/opt/odoo14/odoo/odoo/", line 684, in dispatch

result = self._call_function(**self.params)

File "/opt/odoo14/odoo/odoo/", line 360, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/opt/odoo14/odoo/odoo/service/", line 94, in wrapper

return f(dbname, *args, **kwargs)

File "/opt/odoo14/odoo/odoo/", line 348, in checked_call

result = self.endpoint(*a, **kw)

File "/opt/odoo14/odoo/odoo/", line 913, in __call__

return self.method(*args, **kw)

File "/opt/odoo14/odoo/odoo/", line 532, in response_wrap

response = f(*args, **kw)

File "/opt/odoo14/odoo/addons/web/controllers/", line 1389, in call_kw

return self._call_kw(model, method, args, kwargs)

File "/opt/odoo14/odoo/addons/web/controllers/", line 1381, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/opt/odoo14/odoo/odoo/", line 396, in call_kw

result = _call_kw_multi(method, model, args, kwargs)

File "/opt/odoo14/odoo/odoo/", line 383, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "/opt/odoo14/odoo/odoo/", line 3022, in read

return self._read_format(fnames=fields, load=load)

File "/opt/odoo14/odoo/odoo/", line 3042, in _read_format

vals[name] = convert(record[name], record, use_name_get)

File "/opt/odoo14/odoo/odoo/", line 5668, in __getitem__

return self._fields[key].__get__(self, type(self))

File "/opt/odoo14/odoo/odoo/", line 1019, in __get__


File "/opt/odoo14/odoo/odoo/", line 1175, in compute_value


File "/opt/odoo14/odoo/addons/mail/models/", line 410, in _compute_field_value

return super()._compute_field_value(field)

File "/opt/odoo14/odoo/odoo/", line 4063, in _compute_field_value

getattr(self, field.compute)()

File "/home/dattah/source/bizanova_addons/bi_customer_overdue_statement/models/", line 152, in compute_days

diff = today - ml.date_maturity


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

Traceback (most recent call last):

File "/opt/odoo14/odoo/odoo/", line 640, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/opt/odoo14/odoo/odoo/", line 316, in _handle_exception

raise exception.with_traceback(None) from new_cause

TypeError: unsupported operand type(s) for -: '' and 'bool'

Message and communication history