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

Error with the last update of account_move_name_sequence #1941

Open
alvarosalinero opened this issue Sep 26, 2024 · 0 comments
Open

Error with the last update of account_move_name_sequence #1941

alvarosalinero opened this issue Sep 26, 2024 · 0 comments
Labels

Comments

@alvarosalinero
Copy link

Module

account_move_name_sequence

Describe the bug

With the last version of this module, when I try to create a account move, it has the following error:
`Odoo Server Error
Traceback (most recent call last):
File "/home/pc/workspace/odoo14/core/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 361, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/pc/workspace/odoo14/core/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 914, in call
return self.method(*args, **kw)
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/home/pc/workspace/odoo14/core/addons/web/controllers/main.py", line 1388, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/pc/workspace/odoo14/core/addons/web/controllers/main.py", line 1380, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/pc/workspace/odoo14/core/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/pc/workspace/odoo14/core/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/pc/workspace/odoo14/extra_addons/account_invoice_date_due/models/account_move.py", line 34, in onchange
return super(AccountMove, obj).onchange(values, field_name, field_onchange)
File "/home/pc/workspace/odoo14/core/addons/account/models/account_move.py", line 1160, in onchange
return super(AccountMove, self.with_context(recursive_onchanges=False)).onchange(values, field_name, field_onchange)
File "/home/pc/workspace/odoo14/core/odoo/models.py", line 6281, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/home/pc/workspace/odoo14/core/odoo/models.py", line 6023, in _onchange_eval
method_res = method(self)
File "/home/pc/workspace/odoo14/core/addons/account/models/account_move.py", line 1264, in _onchange_name_warning
origin_name = self.highest_name
File "/home/pc/workspace/odoo14/core/odoo/fields.py", line 1021, in get
self.compute_value(recs)
File "/home/pc/workspace/odoo14/core/odoo/fields.py", line 1177, in compute_value
records._compute_field_value(self)
File "/home/pc/workspace/odoo14/core/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/home/pc/workspace/odoo14/core/odoo/models.py", line 4078, in _compute_field_value
getattr(self, field.compute)()
File "/home/pc/workspace/odoo14/core/addons/account/models/account_move.py", line 1253, in _compute_highest_name
record.highest_name = record._get_last_sequence(lock=False)
File "/home/pc/workspace/odoo14/core/addons/account/models/sequence_mixin.py", line 181, in _get_last_sequence
self.env.cr.execute(query, param)
File "", line 2, in execute
File "/home/pc/workspace/odoo14/core/odoo/sql_db.py", line 101, in check
return f(self, *args, **kwargs)
File "/home/pc/workspace/odoo14/core/odoo/sql_db.py", line 300, in execute
res = self._obj.execute(query, params)
Exception

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

Traceback (most recent call last):
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/pc/workspace/odoo14/core/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type integer: ""
LINE 3: WHERE journal_id = '' AND name != '/' AND se...
^
`

To Reproduce

Affected versions: 14

Steps to reproduce the behavior:

  1. Go to Invoicing
  2. Go to Customer » Invoices
  3. Click to create button

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant