Skip to Content
Menu
This question has been flagged

Hi there, has anybody come upon the following error in billing/invoice/payment.

My base currency is MXN, and documents with USD as a currency are presenting the error.

"ZeroDivisionError: float division by zero"

Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/14.0/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 912, in __call__
return self.method(*args, **kw)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 1398, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/14.0/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/14.0/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/14.0/addons/account/models/account_payment.py", line 846, in action_draft
self.move_id.button_draft()
File "/home/odoo/src/enterprise/14.0/account_asset/models/account_move.py", line 96, in button_draft
return super(AccountMove, self).button_draft()
File "/home/odoo/src/enterprise/14.0/l10n_mx_edi/models/account_move.py", line 483, in button_draft
return super().button_draft()
File "/home/odoo/src/odoo/14.0/addons/stock_account/models/account_move.py", line 59, in button_draft
res = super(AccountMove, self).button_draft()
File "/home/odoo/src/odoo/14.0/addons/account_edi/models/account_move.py", line 355, in button_draft
res = super().button_draft()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 2771, in button_draft
self.mapped('line_ids').remove_move_reconcile()
File "/home/odoo/src/odoo/14.0/addons/account_edi/models/account_move.py", line 450, in remove_move_reconcile
res = super().remove_move_reconcile()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 4932, in remove_move_reconcile
(self.matched_debit_ids + self.matched_credit_ids).unlink()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_partial_reconcile.py", line 128, in unlink
full_to_unlink.unlink()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_full_reconcile.py", line 35, in unlink
moves_to_reverse._reverse_moves(default_values_list, cancel=True)
File "/home/odoo/src/enterprise/14.0/account_asset/models/account_move.py", line 84, in _reverse_moves
return super(AccountMove, self)._reverse_moves(default_values_list, cancel)
File "/home/odoo/src/odoo/14.0/addons/sale/models/account_invoice.py", line 69, in _reverse_moves
return super()._reverse_moves(default_values_list=default_values_list, cancel=cancel)
File "/home/odoo/src/enterprise/14.0/l10n_mx_edi/models/account_move.py", line 494, in _reverse_moves
return super()._reverse_moves(default_values_list, cancel=cancel)
File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 2511, in _reverse_moves
self.env['account.move.line'].browse(line_ids).reconcile()
File "/home/odoo/src/odoo/14.0/addons/hr_expense/models/account_move_line.py", line 16, in reconcile
res = super().reconcile()
File "/home/odoo/src/odoo/14.0/addons/account_edi/models/account_move.py", line 428, in reconcile
res = super().reconcile()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_move.py", line 4883, in reconcile
tax_cash_basis_moves = partials._create_tax_cash_basis_moves()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_partial_reconcile.py", line 474, in _create_tax_cash_basis_moves
tax_cash_basis_values_per_move = self._collect_tax_cash_basis_values()
File "/home/odoo/src/odoo/14.0/addons/account/models/account_partial_reconcile.py", line 192, in _collect_tax_cash_basis_values
percentage = partial_amount_currency / move_values['total_amount_currency']
Exception

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

Traceback (most recent call last):
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
ZeroDivisionError: float division by zero

Avatar
Discard
Related Posts Replies Views Activity
1
Jun 23
1595
0
Mar 16
2613
0
Aug 15
2249
1
Jul 24
235
2
Apr 24
1038