Hello
I developed a custom module for currency rates. I have added extra fields like "special_currency_rate" to the res.currency model during the development phase of this module. However, when I upload the changes I make to Odoo.sh , I am getting error in odoo.log file like this: psycopg2.ProgrammingError: column res_currency.special_currency_rate does not exist.
I've tried some ways to solve the problem:
- I changed name of variable
- I removed everything about "special_currency_rate" from methods and views and only I defined the variable.
But none of it worked. How can I solve this problem urgently?
2018-09-17 08:11:34,363 4 INFO ? werkzeug: 176.237.61.112 - - [17/Sep/2018 08:11:34] "GET /web_editor/static/src/xml/editor.xml HTTP/1.1" 200 -
2018-09-17 08:11:34,412 4 INFO nitrobilisim-test-131700 werkzeug: 176.237.61.112 - - [17/Sep/2018 08:11:34] "GET /web/image/website/1/favicon/ HTTP/1.1" 200 -
2018-09-17 08:11:34,468 4 INFO ? werkzeug: 176.237.61.112 - - [17/Sep/2018 08:11:34] "GET /web_planner/static/src/xml/web_planner.xml HTTP/1.1" 200 -
2018-09-17 08:11:34,585 4 INFO ? werkzeug: 176.237.61.112 - - [17/Sep/2018 08:11:34] "GET /web_tour/static/src/xml/tip.xml HTTP/1.1" 200 -
2018-09-17 08:11:34,611 4 INFO nitrobilisim-test-131700 werkzeug: 176.237.61.112 - - [17/Sep/2018 08:11:34] "POST /web/dataset/call_kw/web.planner/search_read HTTP/1.1" 200 -
2018-09-17 08:11:37,708 4 ERROR nitrobilisim-test-131700 odoo.sql_db: bad query: b'SELECT "res_currency"."id" as "id","res_currency"."special_currency_rate" as "special_currency_rate","res_currency"."create_uid" as "create_uid","res_currency"."name" as "name","res_currency"."write_date" as "write_date","res_currency"."currency_subunit_label" as "currency_subunit_label","res_currency"."active" as "active","res_currency"."currency_unit_label" as "currency_unit_label","res_currency"."position" as "position","res_currency"."create_date" as "create_date","res_currency"."write_uid" as "write_uid","res_currency"."symbol" as "symbol","res_currency"."rounding" as "rounding" FROM "res_currency" WHERE "res_currency".id IN (8, 1, 32, 11, 3)'
ERROR: column res_currency.special_currency_rate does not exist
LINE 1: SELECT "res_currency"."id" as "id","res_currency"."special_c...
File "/home/odoo/src/odoo/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column res_currency.special_currency_rate does not exist
LINE 1: SELECT "res_currency"."id" as "id","res_currency"."special_c...
^
My class definition is as follows:
class ResCurrency(models.Model):
_inherit = 'res.currency'
rate = fields.Float(compute='_compute_current_rate', string='Efektif Satış', digits=(12, 6),
help='The rate of the currency to the currency of rate 1.')
banknot_buying_rate = fields.Float(digits=(12, 6), string="Efektif Alış", compute='compute_banknot_buying_rate')
forex_selling_rate = fields.Float(digits=(12, 6), string="Döviz Satış", compute='compute_forex_selling_rate')
forex_buying_rate = fields.Float(digits=(12, 6), string="Döviz Alış", compute='compute_forex_buying_rate')
special_currency_rate = fields.Float(digits=(12, 6), string="Özel Kur")