Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
In OpenERP 7 , I am using a cr.execute to execute a SQL Request
cr.execute('select distinct(value) from ir_translation where name = \'product.bat3,name\' and src = \''+ str(res_bat[j].encode('utf-8'))+'\' and res_id = '+ str(res_bat[j])+' and lang = \''+ str(line2.partner_id.lang)+'\'')
However, my string res_bat[j] is a string with a quote. The string is: test's Thus I have the error bellow:
ProgrammingError: syntax error at or near "s" LINE 1: ... where name = 'product.bat3,name' and src = 'test's' and res...
How can I modify my SQL request to correct this error?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/2/16, 3:58 AM|
|Seen: 424 times|
|Last updated: 8/2/16, 5:48 AM|