I am traing convert inputs of a field into uppercase using @api.onchange
when I run this code:
`@api.onchange(product_code):
def make_uppercase(self):
print "something ..."`
I get the following error:
`File "/home/hesham/odootecdev/odootec_product/odootec_product.py", line 30
@api.onchange(product_code):
^
SyntaxError: invalid syntax
`
if I remove the colon from the code like this:
`@api.onchange(product_code)
def make_uppercase(self):
print "something ..."`
then I get this in the log, and it keeps looping foever till browser say `too many redirects`:
`2015-01-11 17:40:12,304 21077 INFO goboraq openerp.modules.loading: loading 1 modules...
2015-01-11 17:40:12,609 21077 INFO goboraq openerp.modules.loading: 1 modules loaded in 0.30s, 0 queries
2015-01-11 17:40:12,624 21077 INFO goboraq openerp.modules.loading: loading 31 modules...
2015-01-11 17:40:12,868 21077 INFO None werkzeug: 127.0.0.1 - - [11/Jan/2015 17:40:12] "GET /web HTTP/1.1" 302 -
2015-01-11 17:40:12,880 21077 INFO goboraq openerp.modules.loading: loading 1 modules...
2015-01-11 17:40:13,071 21077 INFO goboraq openerp.modules.loading: 1 modules loaded in 0.19s, 0 queries
2015-01-11 17:40:13,086 21077 INFO goboraq openerp.modules.loading: loading 31 modules...
2015-01-11 17:40:13,325 21077 INFO None werkzeug: 127.0.0.1 - - [11/Jan/2015 17:40:13] "GET /web HTTP/1.1" 302 -
2015-01-11 17:40:13,333 21077 INFO goboraq openerp.modules.loading: loading 1 modules...
2015-01-11 17:40:13,515 21077 INFO goboraq openerp.modules.loading: 1 modules loaded in 0.18s, 0 queries
2015-01-11 17:40:13,531 21077 INFO goboraq openerp.modules.loading: loading 31 modules...
2015-01-11 17:40:13,861 21077 INFO None werkzeug: 127.0.0.1 - - [11/Jan/2015 17:40:13] "GET /web HTTP/1.1" 302 -
2015-01-11 17:40:13,870 21077 INFO goboraq openerp.modules.loading: loading 1 modules...
2015-01-11 17:40:14,058 21077 INFO goboraq openerp.modules.loading: 1 modules loaded in 0.19s, 0 queries
2015-01-11 17:40:14,072 21077 INFO goboraq openerp.modules.loading: loading 31 modules...
2015-01-11 17:40:14,313 21077 INFO None werkzeug: 127.0.0.1 - - [11/Jan/2015 17:40:14] "GET /web HTTP/1.1" 302 -
2015-01-11 17:40:14,323 21077 INFO goboraq openerp.modules.loading: loading 1 modules...
2015-01-11 17:40:14,512 21077 INFO goboraq openerp.modules.loading: 1 modules loaded in 0.19s, 0 queries
2015-01-11 17:40:14,526 21077 INFO goboraq openerp.modules.loading: loading 31 modules...
2015-01-11 17:40:14,774 21077 INFO None werkzeug: 127.0.0.1 - - [11/Jan/2015 17:40:14] "GET /web HTTP/1.1" 302 -
2015-01-11 17:40:14,785 21077 INFO goboraq openerp.modules.loading: loading 1 modules...
2015-01-11 17:40:15,071 21077 INFO goboraq openerp.modules.loading: 1 modules loaded in 0.29s, 0 queries
2015-01-11 17:40:15,086 21077 INFO goboraq openerp.modules.loading: loading 31 modules...
2015-01-11 17:40:15,328 21077 INFO None werkzeug: 127.0.0.1 - - [11/Jan/2015 17:40:15] "GET /web HTTP/1.1" 302 -
`
Any clue?
question edited.. sorry please read again
Thanks for the people who answer, but I edited the question, please read again