Error "outstanding_amount" in the Purchase Invoice Doctype

I have a problem when upgrade ERPNext to version 14. An error occurs when changing anything in the Purchase Invoice doctype. The error is:

Traceback (most recent call last):
  File "apps/frappe/frappe/", line 66, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/", line 76, in execute_cmd
    return, **frappe.form_dict)
  File "apps/frappe/frappe/", line 1474, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/", line 25, in savedocs
  File "apps/frappe/frappe/model/", line 312, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/", line 366, in _save
  File "apps/frappe/frappe/model/", line 1090, in run_post_save_methods
  File "apps/frappe/frappe/model/", line 943, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1267, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1249, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/", line 940, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/core/doctype/doctype/", line 355, in on_update
    raise e
  File "apps/frappe/frappe/core/doctype/doctype/", line 352, in on_update
    frappe.db.updatedb(, Meta(self))
  File "apps/frappe/frappe/database/mariadb/", line 375, in updatedb
  File "apps/frappe/frappe/database/", line 45, in sync
  File "apps/frappe/frappe/database/mariadb/", line 50, in alter
  File "apps/frappe/frappe/database/", line 242, in build_for_alter_table
  File "apps/frappe/frappe/database/", line 258, in default_changed
    return self.default_changed_for_decimal(current_def)
  File "apps/frappe/frappe/database/", line 298, in default_changed_for_decimal
    return float(current_def["default"]) != float(self.default)
ValueError: could not convert string to float: 'outstanding_amount'

This is because the default value of paid_amount is set to ‘outstanding_amount’, but in the UI is this set to nothing.
When I run the python debugger I see that outstanding amount is pass into this field.

Anybody a idea when I can start looking? or maybe a fix?

Links to the Github issues: