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

[14.0][l10n_br_account]: Error on Posting Journal Entry: Issue with fiscal_document_ids #3363

Closed
kaynnan opened this issue Sep 13, 2024 · 0 comments · Fixed by #3364
Closed
Labels

Comments

@kaynnan
Copy link
Contributor

kaynnan commented Sep 13, 2024

Module

l10n_br_account

Describe the bug

When attempting to post a journal entry with the journal type set to Miscellaneous, an error occurs in the compute method.

To Reproduce

Affected versions:
14.0

Steps to reproduce the behavior:

  1. Create Journal Entries
  2. Post

image

Error:

Erro:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo/http.py", line 696, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 370, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 358, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 919, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 544, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 1374, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/main.py", line 1362, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 406, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 391, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo-venv/lib/python3.8/site-packages/odoo/addons/sale_commission/models/account_move.py", line 60, in action_post
    return super().action_post()
  File "/opt/odoo/addons/sale/models/account_move.py", line 14, in action_post
    res = super(AccountMove, self).action_post()
  File "/opt/odoo/addons/account/models/account_move.py", line 2823, in action_post
    self._post(soft=False)
  File "/mnt/data/odoo-addons-dir/l10n_br_account_payment_brcobranca/models/account_move.py", line 89, in _post
    result = super()._post(soft)
  File "/mnt/data/odoo-addons-dir/l10n_br_account_withholding/models/account_move.py", line 173, in _post
    res = super()._post(soft)
  File "/mnt/data/odoo-addons-dir/l10n_br_account_payment_order/models/account_move.py", line 92, in _post
    result = super()._post(soft)
  File "/mnt/data/odoo-addons-dir/l10n_br_account/models/account_move.py", line 601, in _post
    move.fiscal_document_ids.filtered(
  File "/opt/odoo/odoo/fields.py", line 3164, in __get__
    return super().__get__(records, owner)
  File "/opt/odoo/odoo/fields.py", line 2494, in __get__
    return super().__get__(records, owner)
  File "/opt/odoo/odoo/fields.py", line 1050, in __get__
    raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
Exception

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

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 652, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: Compute method failed to assign account.move(39,).fiscal_document_ids

cc @marcelsavegnago @WesleyOliveira98 @rvalyi @douglascstd

@kaynnan kaynnan added the bug label Sep 13, 2024
@kaynnan kaynnan changed the title [14.0][l10n_br_account]: fiscal_document_ids return after Post Journal Entrie [14.0][l10n_br_account]: fiscal_document_ids raise Error after Post Journal Entrie Sep 13, 2024
@kaynnan kaynnan changed the title [14.0][l10n_br_account]: fiscal_document_ids raise Error after Post Journal Entrie [14.0][l10n_br_account]: Error on Posting Journal Entry: Issue with fiscal_document_ids Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant