# Deposit a check with account\_check\_ar

**URL:** <https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629>\
**Category:** User\
**Created:** [July 31, 2019, 12:39pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629 "2019-07-31T12:39:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andres53016](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/andres53016/32/406_2.png) [@andres53016](https://discuss.tryton.org/u/andres53016)\
**Post date:** [July 31, 2019, 12:39pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/1 "2019-07-31T12:39:35Z")

</div>

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’

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [July 31, 2019, 1:00pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/2 "2019-07-31T13:00:39Z")

</div>

> [@andres53016](#):
>
> Pero ahora cuando quiero depositar un cheque en la cuenta que cree me genera el siguiente error:

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

---

<div class="post-metadata">

**Author:** ![andres53016](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/andres53016/32/406_2.png) [@andres53016](https://discuss.tryton.org/u/andres53016)\
**Post date:** [July 31, 2019, 1:15pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/3 "2019-07-31T13:15:32Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 31, 2019, 1:18pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/4 "2019-07-31T13:18:36Z")

</div>

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 - #5 by ced](https://discuss.tryton.org/t/localizacion-es-ar/1458/5)

---

<div class="post-metadata">

**Author:** ![lukio](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/lukio/32/98_2.png) [@lukio](https://discuss.tryton.org/u/lukio)\
**Post date:** [July 31, 2019, 3:50pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/5 "2019-07-31T15:50:24Z")

</div>

> [@ced](#):
>
> For me, it is a bug in account\_check\_ar module. You should report it to the author.

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:

> <https://github.com/tryton-ar/account_check_ar/issues/7>
>
> Cuando intento depositar un cheque surge el siguiente error:
> 
> \> Traceback (mos…t 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 436, 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".
> \>

> [@](#):
>
> I really think the features of those modules should be integrated as generic feature in Tryton: [Localizacion ES\_AR - #5 by ced](https://discuss.tryton.org/t/localizacion-es-ar/1458/5)

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

---

<div class="post-metadata">

**Author:** ![andres53016](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/andres53016/32/406_2.png) [@andres53016](https://discuss.tryton.org/u/andres53016)\
**Post date:** [July 31, 2019, 7:43pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/6 "2019-07-31T19:43:47Z")

</div>

¡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;`

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [August 30, 2019, 7:43pm UTC](https://discuss.tryton.org/t/deposit-a-check-with-account-check-ar/1629/7 "2019-08-30T19:43:50Z")

</div>

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