How can i have a look at the results(res) of self.search.
res = self.search([('type','=',inv_type),('number','=',str(number_down)),('date_invoice','>',date_invoice)])
if res:
raise except_orm(res bla bla bla bla bla..............................
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How can i have a look at the results(res) of self.search.
res = self.search([('type','=',inv_type),('number','=',str(number_down)),('date_invoice','>',date_invoice)])
if res:
raise except_orm(res bla bla bla bla bla..............................
Hi John Doe, try this:
from openerp.exceptions import UserError
res = self.search([('type','=',inv_type),('number','=',str(number_down)),('date_invoice','>',date_invoice)])
raise osv.except_osv(_('Title'),_(res))
or to see in your log:
import logging
_logger = logging.getLogger(__name__)
res = self.search([('type','=',inv_type),('number','=',str(number_down)),('date_invoice','>',date_invoice)])
logger.info('Content: %r',res)
I hope it helps you, regards.
res = self.search([('type','=',inv_type),('number','=',str(number_down)),('date_invoice','>',date_invoice)])raise osv.except_osv(_('Title'),_(res)
#If you want just see what's inside of your res add
print res
then in console you will see what's in there
this is the easiest thing you can do. I think ...
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
jul 25
|
535 | ||
Search a message
Resuelto
|
|
1
feb 25
|
1249 | |
|
0
sept 23
|
2195 | ||
|
2
jun 23
|
4035 | ||
|
1
ago 22
|
12774 |