Deposit a check with account_check_ar

muchas gracias! Tu respuesta solucionó el problema.
Pero ahora cuando quiero depositar un cheque en la cuenta que cree me genera el siguiente error:

Traceback (most recent call last):
File “/trytond/wsgi.py”, line 71, in dispatch_request
return endpoint(request, **request.view_args)
File “/trytond/protocols/dispatcher.py”, line 41, in rpc
request, database_name, *request.rpc_params)
File “/trytond/wsgi.py”, line 42, in auth_required
return wrapped(*args, **kwargs)
File “/trytond/protocols/wrappers.py”, line 122, in wrapper
return func(request, pool, *args, **kwargs)
File “/trytond/protocols/dispatcher.py”, line 167, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File “/trytond/wizard/wizard.py”, line 287, in execute
return wizard._execute(state_name)
File “/trytond/wizard/wizard.py”, line 318, in _execute
result = self._execute(transition())
File “/trytond/modules/account_check_ar/account_check_ar.py”, line 404, in transition_deposit
self.start.bank_account.journal.debit_account.id,
AttributeError: ‘NoneType’ object has no attribute ‘id’

You should set a debit and a credit account on the journal used on the wizard.

Agregue la cuenta de débito y crédito para el libro correspondiente, pero ahora me da el siguiente error:

Traceback (most recent call last):
File “/trytond/wsgi.py”, line 71, in dispatch_request
return endpoint(request, **request.view_args)
File “/trytond/protocols/dispatcher.py”, line 41, in rpc
request, database_name, *request.rpc_params)
File “/trytond/wsgi.py”, line 42, in auth_required
return wrapped(*args, **kwargs)
File “/trytond/protocols/wrappers.py”, line 122, in wrapper
return func(request, pool, *args, **kwargs)
File “/trytond/protocols/dispatcher.py”, line 167, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File “/trytond/wizard/wizard.py”, line 287, in execute
return wizard._execute(state_name)
File “/trytond/wizard/wizard.py”, line 318, in _execute
result = self._execute(transition())
File “/trytond/modules/account_check_ar/account_check_ar.py”, line 425, in transition_deposit
‘state’: ‘deposited’,
File “/trytond/model/modelsql.py”, line 996, in write
where=red_sql))
File “/trytond/backend/postgresql/database.py”, line 61, in execute
cursor.execute(self, sql, args)
IntegrityError: insert or update on table “account_third_check” violates foreign key constraint “account_third_check_account_bank_out_fkey”
DETAIL: Key (account_bank_out)=(1) is not present in table “account_party_bank”.

For me, it is a bug in account_check_ar module. You should report it to the author.

I really think the features of those modules should be integrated as generic feature in Tryton: Localizacion ES_AR

Yes, it was a change from 3.8 to 4.2 when we drop account_party_bank custom module in benefit of bank module from Tryton core. I already reply this stuff at:

Hi! I really want to start work on this stuff, but I did not have to much time to do it. :confused:

1 Like

¡Muchas gracias a los dos! Pude resolver el problema, para los que van actualizando el sistema desde versiones anteriores a las 3.8 y tenían instalado el modulo account_bank_ar se soluciona eliminando el foreing key de la tabla account_third_check la siguiente manera:

ALTER TABLE account_third_check DROP CONSTRAINT account_third_check_account_bank_out_fkey;

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.