I have just upgraded my code to 7.0.1.3. I am using multicurrency and here is a brief configurations info:
- Two currencies (AFN as base and USD as secondary)
- Proper accounts created in the chart of accounts for both currencies
- Two journals created, one for AFN which is base currency and 2nd one for USD. Secondary currency in the journal is set to USD
- I create an invoice in AFS, receive the payment through USD journal but when i confirm, i get an error (No currency rate associated for currency 48 for the given period):
- Fiscal year, periods are set properly. Currency exchange rates are there for the current period. Price lists for both currencies set.
Below is the error log from the server: 2013-09-04 17:09:57,419 3850 ERROR xyzcompany openerp.tools.safe_eval: Cannot eval u'proforma_voucher()' Traceback (most recent call last): File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/tools/safe_eval.py", line 241, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in <module> File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 374, in function_proxy return attr(self._cr, self._uid, [self._id], args, *kwargs) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account_voucher/account_voucher.py", line 936, in proforma_voucher self.action_move_line_create(cr, uid, ids, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account_voucher/account_voucher.py", line 1397, in action_move_line_create move_line_id = move_line_pool.create(cr, uid, self.first_move_line_get(cr,uid,voucher.id, move_id, company_currency, current_currency, context), context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/account_move_line.py", line 1226, in create result = super(account_move_line, self).create(cr, uid, vals, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 4319, in create vals = self._add_missing_default_values(cr, user, vals, context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 2489, in _add_missing_default_values defaults = self.default_get(cr, uid, missing_defaults, context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/account_move_line.py", line 163, in default_get data = self._default_get(cr, uid, fields, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/account_move_line.py", line 299, in _default_get data['amount_currency'] = currency_obj.compute(cr, uid, account.company_id.currency_id.id, data['currency_id'], -total, context=compute_ctx) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 230, in compute rate = self._get_conversion_rate(cr, uid, from_currency, to_currency, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/res_currency.py", line 31, in _get_conversion_rate rate = super(res_currency_account, self)._get_conversion_rate(cr, uid, from_currency, to_currency, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 201, in _get_conversion_rate if from_currency.rate == 0 or to_currency.rate == 0: File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 486, in __getattr__ return self[name] File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 401, in __getitem__ field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write") File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 113, in read res = super(res_currency, self).read(cr, user, ids, fields, context, load) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 3606, in read result = self._read_flat(cr, user, select, fields, context, load) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 3726, in _read_flat res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/fields.py", line 1133, in get result = self._fnct(obj, cr, uid, ids, name, self._arg, context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account_voucher/account_voucher.py", line 38, in _current_rate res = super(res_currency, self)._current_rate(cr, uid, ids, name, arg, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 34, in _current_rate return self._current_rate_computation(cr, uid, ids, name, arg, True, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 60, in _current_rate_computation raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id))) except_osv: (u'Error!', u'No currency rate associated for currency 48 for the given period') 2013-09-04 17:09:57,420 3850 ERROR xyzcompany openerp.netsvc: Error! No currency rate associated for currency 48 for the given period Traceback (most recent call last): File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, params) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, *args, *kwargs) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/osv.py", line 220, in exec_workflow res = self.exec_workflow_cr(cr, uid, obj, signal, args) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/osv.py", line 213, in exec_workflow_cr return object._workflow_signal(cr, uid, [res_id], signal)[res_id] File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 3928, in _workflow_signal result[res_id] = wf_service.trg_validate(uid, self._name, res_id, signal, cr) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/wkf_service.py", line 119, in trg_validate res2 = instance.validate(cr, id, ident, signal) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/instance.py", line 43, in validate workitem.process(cr, witem, ident, signal, force_running, stack=stack) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/workitem.py", line 60, in process ok = _split_test(cr, workitem, activity['split_mode'], ident, signal, stack) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/workitem.py", line 175, in _split_test _join_test(cr, t[0], t[1], ident, stack) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/workitem.py", line 183, in _join_test create(cr,[activity], inst_id, ident, stack) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/workitem.py", line 40, in create process(cr, res, ident, stack=stack) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/workitem.py", line 52, in process result = _execute(cr, workitem, activity, ident, stack) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/workitem.py", line 106, in _execute returned_action = wkf_expr.execute(cr, ident, workitem, activity) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/wkf_expr.py", line 67, in execute return _eval_expr(cr, ident, workitem, activity['action']) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/workflow/wkf_expr.py", line 57, in _eval_expr ret = eval(line, env, nocopy=True) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/tools/safe_eval.py", line 241, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "", line 1, in <module> File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 374, in function_proxy return attr(self._cr, self._uid, [self._id], *args, *kwargs) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account_voucher/account_voucher.py", line 936, in proforma_voucher self.action_move_line_create(cr, uid, ids, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account_voucher/account_voucher.py", line 1397, in action_move_line_create move_line_id = move_line_pool.create(cr, uid, self.first_move_line_get(cr,uid,voucher.id, move_id, company_currency, current_currency, context), context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/account_move_line.py", line 1226, in create result = super(account_move_line, self).create(cr, uid, vals, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 4319, in create vals = self._add_missing_default_values(cr, user, vals, context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 2489, in _add_missing_default_values defaults = self.default_get(cr, uid, missing_defaults, context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/account_move_line.py", line 163, in default_get data = self._default_get(cr, uid, fields, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/account_move_line.py", line 299, in _default_get data['amount_currency'] = currency_obj.compute(cr, uid, account.company_id.currency_id.id, data['currency_id'], -total, context=compute_ctx) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 230, in compute rate = self._get_conversion_rate(cr, uid, from_currency, to_currency, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account/res_currency.py", line 31, in _get_conversion_rate rate = super(res_currency_account, self)._get_conversion_rate(cr, uid, from_currency, to_currency, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 201, in _get_conversion_rate if from_currency.rate == 0 or to_currency.rate == 0: File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 486, in __getattr__ return self[name] File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 401, in __getitem__ field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write") File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 113, in read res = super(res_currency, self).read(cr, user, ids, fields, context, load) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 3606, in read result = self._read_flat(cr, user, select, fields, context, load) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/orm.py", line 3726, in _read_flat res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/osv/fields.py", line 1133, in get result = self._fnct(obj, cr, uid, ids, name, self._arg, context) File "/home/ubuntu/WorkSpace/openerp/dev/addons/account_voucher/account_voucher.py", line 38, in _current_rate res = super(res_currency, self)._current_rate(cr, uid, ids, name, arg, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 34, in _current_rate return self._current_rate_computation(cr, uid, ids, name, arg, True, context=context) File "/home/ubuntu/WorkSpace/openerp/dev/server/openerp/addons/base/res/res_currency.py", line 60, in _current_rate_computation raise osv.except_osv(_('Error!'),_("No currency rate associated for currency %d for the given period" % (id))) except_osv: (u'Error!', u'No currency rate associated for currency 48 for the given period') 2013-09-04 17:09:57,422 3850 INFO xyzcompany werkzeug: 127.0.0.1 - - [04/Sep/2013 17:09:57] "POST /web/dataset/exec_workflow HTTP/1.1" 200
There seems to be multiple errors i am facing with 7.0.1.3, this is just one of them. Any solutions?