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

Erro ao criar fatura - Odoo 14 #1076

Open
brunobronks opened this issue Apr 29, 2021 · 1 comment
Open

Erro ao criar fatura - Odoo 14 #1076

brunobronks opened this issue Apr 29, 2021 · 1 comment

Comments

@brunobronks
Copy link

Boa tarde,

Quando tento criar uma fatura, ocorre o seguinte erro:

Odoo Server Error

Traceback (most recent call last):
File "/home/bruno/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/bruno/odoo/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/home/bruno/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/bruno/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/bruno/odoo/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/home/bruno/odoo/odoo/http.py", line 912, in call
return self.method(*args, **kw)
File "/home/bruno/odoo/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/home/bruno/odoo/addons/web/controllers/main.py", line 1393, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/bruno/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/bruno/odoo/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/bruno/odoo/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/bruno/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 183, in create_invoices
self._create_invoice(order, so_line, amount)
File "/home/bruno/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 131, in _create_invoice
invoice = self.env['account.move'].sudo().create(invoice_vals).with_user(self.env.uid)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/api.py", line 344, in _model_create_multi
return create(self, [arg])
File "/home/bruno/odoo/addons/purchase/models/account_invoice.py", line 102, in create
moves = super(AccountMove, self).create(vals_list)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/home/bruno/odoo/addons/account/models/account_move.py", line 1846, in create
rslt = super(AccountMove, self).create(vals_list)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/home/bruno/odoo/addons/mail/models/mail_thread.py", line 264, in create
threads = super(MailThread, self).create(vals_list)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/home/bruno/odoo/odoo/addons/base/models/ir_fields.py", line 533, in create
recs = super().create(vals_list)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/home/bruno/odoo/odoo/models.py", line 3868, in create
records = self._create(data_list)
File "/home/bruno/odoo/odoo/models.py", line 4028, in _create
for other, data in zip(others, data_list)
File "/home/bruno/odoo/odoo/fields.py", line 3038, in create
self.write_batch(record_values, True)
File "/home/bruno/odoo/odoo/fields.py", line 3064, in write_batch
return self.write_real(records_commands_list, create)
File "/home/bruno/odoo/odoo/fields.py", line 3236, in write_real
flush()
File "/home/bruno/odoo/odoo/fields.py", line 3200, in flush
comodel.create(to_create)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/home/bruno/odoo/addons/account/models/account_move.py", line 3862, in create
moves._check_balanced()
File "/home/bruno/odoo/addons/account/models/account_move.py", line 1674, in _check_balanced
self.env['account.move.line'].flush(self.env['account.move.line']._fields)
File "/home/bruno/odoo/odoo/models.py", line 5442, in flush
self.recompute(fnames, records=records)
File "/home/bruno/odoo/odoo/models.py", line 5908, in recompute
process(field)
File "/home/bruno/odoo/odoo/models.py", line 5879, in process
field.recompute(recs)
File "/home/bruno/odoo/odoo/fields.py", line 1153, in recompute
self.compute_value(recs)
File "/home/bruno/odoo/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/home/bruno/odoo/odoo/models.py", line 4063, in _compute_field_value
field.compute(self)
File "/home/bruno/odoo/odoo/fields.py", line 553, in _compute_related
record[self.name] = self._process_related(value[self.related_field.name])
File "/home/bruno/odoo/odoo/models.py", line 5666, in getitem
return self._fields[key].get(self, type(self))
File "/home/bruno/odoo/odoo/fields.py", line 967, in get
self.recompute(record)
File "/home/bruno/odoo/odoo/fields.py", line 1153, in recompute
self.compute_value(recs)
File "/home/bruno/odoo/odoo/fields.py", line 1175, in compute_value
records._compute_field_value(self)
File "/home/bruno/odoo/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
return super()._compute_field_value(field)
File "/home/bruno/odoo/odoo/models.py", line 4061, in _compute_field_value
getattr(self, field.compute)()
File "/home/bruno/odoo/addons/account/models/account_move.py", line 1088, in _compute_name
highest_name = self[0]._get_last_sequence() if self else False
File "/home/bruno/odoo/addons/account/models/sequence_mixin.py", line 179, in _get_last_sequence
self.env.cr.execute(query, param)
File "/usr/local/lib/python3.6/dist-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/home/bruno/odoo/odoo/sql_db.py", line 101, in check
return f(self, *args, **kwargs)
File "/home/bruno/odoo/odoo/sql_db.py", line 298, 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/bruno/odoo/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/bruno/odoo/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
psycopg2.errors.InvalidRegularExpression: invalid regular expression: quantifier operand invalid

@brunobronks brunobronks changed the title Erro ao criar fatura Erro ao criar fatura - Odoo 14 Apr 29, 2021
@danimaribeiro
Copy link
Member

Talvez você tenha que atualizar a versão do postgres, notei que em versões antigas esse erro acontece.

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

No branches or pull requests

2 participants