chat.freenode.net #tryton-es log beginning Mon 30 Mar 2020 12:02:01 AM CEST | ||
-!- guifipedro[m](guifipedro@gateway/shell/matrix.org/x-ktbuzncitkxpluhn) has joined #tryton-es | 23:04 | |
-!- josesalvador(~josesalva@170.253.36.90) has joined #tryton-es | 07:02 | |
-!- mariomop(~quassel@190.193.24.15) has joined #tryton-es | 11:02 | |
-!- irclog(~irclog@moretus.b2ck.com) has joined #tryton-es | 13:17 | |
-!- irclog(~irclog@moretus.b2ck.com) has joined #tryton-es | 15:10 | |
-!- pokoli(~pokoli@mail.koolpi.com) has joined #tryton-es | 15:12 | |
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton-es | 15:13 | |
-!- irclog(~irclog@2001:41d0:1:c158::1) has joined #tryton-es | 15:32 | |
-!- pokoli(~pokoli@unaffiliated/pokoli) has joined #tryton-es | 15:46 | |
-!- mariomop(~quassel@190.193.24.15) has joined #tryton-es | 15:46 | |
-!- josesalvador(~josesalva@170.253.36.90) has joined #tryton-es | 15:46 | |
-!- SimAlbertiBeltra(sim6matrix@gateway/shell/matrix.org/x-flmaiupvjntsihsk) has joined #tryton-es | 15:46 | |
-!- ChanServ(ChanServ@services.) has joined #tryton-es | 15:46 | |
-!- xcodinas(~xcodinas@unaffiliated/xcodinas) has joined #tryton-es | 15:46 | |
josesalvador | Hola | 16:12 |
---|---|---|
josesalvador | Proteus por defecto busca en los registros activos | 16:12 |
josesalvador | en el caso de un Account NO ES ACTIVA cuando tiene una fecha de fin establecida (y pasada) | 16:13 |
josesalvador | para poder encontrarla puedo utilizar active = False como parte del dominio de búsqueda | 16:13 |
josesalvador | pero como puedo, en una sola consulta, encontrar tanto las activas como las inactivas en Proteus? | 16:14 |
josesalvador | esto (que creo debería funcionar): | 16:14 |
josesalvador | accounts = Account.search([ | 16:14 |
josesalvador | ('code', 'like', '4009%'), | 16:14 |
josesalvador | 'OR', [ | 16:14 |
josesalvador | ('active', '=', False), | 16:14 |
josesalvador | ('active', '=', True), | 16:14 |
josesalvador | ] | 16:14 |
josesalvador | ]) | 16:14 |
josesalvador | no lo hace porque alcanza el maáximo de recurividad permitida (RecursionError: maximum recursion depth exceeded) | 16:15 |
josesalvador | ?? | 16:15 |
pokoli | josesalvador: si en el context le pones active_test=False no te hara el filtro del activo | 16:37 |
pokoli | josesalvador: el error que te da es porque te falta una lista para delimitar los ORs | 16:37 |
josesalvador | pokoli: ACK | 16:38 |
-!- SimAlbertiBeltra(sim6matrix@gateway/shell/matrix.org/x-lljigfzrlgqsjqoj) has joined #tryton-es | 16:48 | |
josesalvador | pokoli: it works like a charm!!! :-D | 16:56 |
josesalvador | pokoli: donde podría haber encontrado por mi mismo lo de active_test=False? | 16:57 |
-!- guifipedro[m](guifipedro@gateway/shell/matrix.org/x-hnxjjytcfhyngvuo) has joined #tryton-es | 17:38 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!