[ADD] report_carbone, jsonifier, export_json : carbone is an alternative to Py3o
This commit is contained in:
12
jsonifier/demo/resolver_demo.xml
Normal file
12
jsonifier/demo/resolver_demo.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="ir_exports_resolver_dict" model="ir.exports.resolver">
|
||||
<field name="name">ExtraData dictionary (number/text)</field>
|
||||
<field name="python_code">
|
||||
is_number = field_type in ('integer', 'float')
|
||||
ftype = "NUMBER" if is_number else "TEXT"
|
||||
value = value if is_number else str(value)
|
||||
result = {"Key": name, "Value": value, "Type": ftype, "IsPublic": True}
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user