How to change currency in Child table grid?

I want to change currency in child table grid based on Currency I chose. It’s like when we create new Sales Invoice.

Hi @magic-overflow

Can you explain this in brief?

I want to change Expense Claim in HR module to have multi currency.
I added custom field Currency and Conversion Rate.
In Expense Claim, there’s a table grid. I want to change its columns [Claim Amount, Sanctioned Amount] currency based on the custom field Currency value. If i chose USD, value in table grid will have $ sign with amount like in Sales Invoice (Multi currency)

Same here.Any news on this? Did you find a solution?

I managed to see currency code in the grid by using Contract:parent:contract_currency.

So on the parent doctype “Contract” if the contract_currency is USD, then the prefix “USD” shows up on the child column…

But when you save or print, it gives error “Contract None was not found”. So it seems that while the display is possible, the print is not.


Can anybody confirm this if the behaviour is expected or not expected, so that a bug report can be created if required.

One more trial. Changed the Options from Contract:parent:contract_currency to Contract::contract_currency and it worked to save. But gives error upon printing.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 56, in execute_cmd
return, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 1027, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/www/”, line 187, in get_html_and_style
no_letterhead=no_letterhead, trigger_print=trigger_print),
File “/home/frappe/frappe-bench/apps/frappe/frappe/www/”, line 158, in get_html
html = template.render(args, filters={“len”: len})
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/print_formats/standard.html”, line 32, in top-level template code
{{ render_field(df, doc) }}
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 579, in _invoke
rv = self._func(*arguments)
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/print_formats/standard_macros.html”, line 3, in template
{{ render_table(df, doc) }}
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 579, in _invoke
rv = self._func(*arguments)
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/print_formats/standard_macros.html”, line 55, in template

{{ print_value(tdf, d, doc, visible_columns) }}

File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/”, line 579, in _invoke
rv = self._func(*arguments)
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/print_formats/standard_macros.html”, line 134, in template
{{ doc.get_formatted(df.fieldname, parent_doc or doc, translated=df.translatable) }}
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 715, in get_formatted
return format_value(val, df=df, doc=doc, currency=currency)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 60, in format_value
currency=currency if currency else (get_field_currency(df, doc) if doc else None))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 484, in get_field_currency
currency = frappe.get_cached_value(split_opts[0], doc.get(split_opts[1]), split_opts[2])
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 697, in get_cached_value
doc = get_cached_doc(doctype, name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 682, in get_cached_doc
doc = get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 725, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 97, in init = frappe.db.get_value(args[0], args[1], “name”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 484, in get_value
order_by, cache=cache)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 528, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 664, in _get_values_from_table
conditions, values = self.build_conditions(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 448, in build_conditions
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 415, in _build_condition
_operator = value[0]
IndexError: list index out of range