Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
616 Lượt xem

Hi, I'm trying to implement a self hosted Odoo v18 enterprise server for managing the company's accounting.

I'm using a Windows server, I installed Odoo, download and configure the chilean localization, but after uploading the CAF, creating a quotation, confirm it, and prepare the invoice to be send to the SII, I'm getting the following error


Error de servidor de Odoo

RPC_ERROR

Odoo Server Error

Occured on 10.0.1.203:8069 on model account.move and id 148 on 2025-03-14 17:55:08 GMT

Traceback (most recent call last):
  File "C:\Program Files\Odoo\server\odoo\http.py", line 1957, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\service\model.py", line 137, in retrying
    result = func()
             ^^^^^^
  File "C:\Program Files\Odoo\server\odoo\http.py", line 1924, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\http.py", line 2171, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\addons\base\models\ir_http.py", line 329, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\http.py", line 727, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\addons\web\controllers\dataset.py", line 40, in call_button
    action = call_kw(request.env[model], method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\api.py", line 517, in call_kw
    result = getattr(recs, name)(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\addons\l10n_cl_edi_factoring\models\account_move.py", line 60, in l10n_cl_send_dte_to_sii
    return super().l10n_cl_send_dte_to_sii(retry_send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\addons\l10n_cl_edi\models\account_move.py", line 225, in l10n_cl_send_dte_to_sii
    return self._l10n_cl_send_dte_to_sii_non_ticket(retry_send=retry_send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Odoo\server\odoo\addons\l10n_cl_edi\models\account_move.py", line 282, in _l10n_cl_send_dte_to_sii_non_ticket
    'rutSender': digital_signature_sudo.subject_serial_number[:-2],
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'bool' object is not subscriptable

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://10.0.1.203:8069/web/assets/83a26c2/web.assets_web.min.js:3131:163)
        at XMLHttpRequest.<anonymous> (http://10.0.1.203:8069/web/assets/83a26c2/web.assets_web.min.js:3136:13)

I understand the problem is in 

'rutSender': digital_signature_sudo.subject_serial_number[:-2]

but the digital certificate was uploaded correctly.

Any ideas how to fix it?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I fix the problem.

As I suspected, the problem was in the error 

'rutSender': digital_signature_sudo.subject_serial_number[:-2]

Turns out, some digital certificates embed the RUT of the owner, while some don't.

The first digital certificate I was using had the RUT embedded, the second one not, hence the error.

To fix it I just add the RUT number at the  Subject Serial Number field, in the digital certificate configuration in Odoo.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
593
2
thg 5 25
558
0
thg 4 25
433
0
thg 4 25
472
0
thg 3 25
503