Hello,
I was trying to create a report for an app created with Odoo studio.
When I was trying to add a monetary field in the report table, I got this error :
Expected singleton: res.currency() Traceback (most recent call last): File "/home/odoo/src/odoo/13.0/odoo/models.py", line 5101, in ensure_one _id, = self._ids ValueError: not enough values to unpack (expected 1, got 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_studio_report_document_8844 File "<template>", line 28, in foreach_8843 File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_qweb.py", line 382, in _get_field content = converter.record_to_html(record, field_name, field_options) File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_qweb_fields.py", line 464, in record_to_html return super(MonetaryConverter, self).record_to_html(record, field_name, options) File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_qweb_fields.py", line 128, in record_to_html return False if value is False else record.env[self._name].value_to_html(value, options=options) File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_qweb_fields.py", line 434, in value_to_html formatted_amount = lang.format(fmt, display_currency.round(value), File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/res_currency.py", line 133, in round self.ensure_one() File "/home/odoo/src/odoo/13.0/odoo/models.py", line 5104, in ensure_one raise ValueError("Expected singleton: %s" % self) ValueError: Expected singleton: res.currency() Error to render compiling AST ValueError: Expected singleton: res.currency() Template: studio_report_document
Please advice
Please post your code for more info.