We should always keep UTC and let the consumer deal w/ it.
This change is backward compatible but allows to turn off
the old behavior w/ the ctx flag `jsonifier__date_user_tz=False`.
Rationale:
1. the name reflects better what it does
as this is not _just_ a base module
2. solves publication issue on odoo apps store
due to an old module registered w/ the same name
that even if un-published blocks publishing the module
for all versions.
This in turn, blocks the publication of ALL modules
that depend on base_jsonify.
It could happen that a module adds an ir.export.line for a new field
but when tests run the field is not loaded
if this module is not a dependency of the module running tests.
Furthermore, in general, it seems too strict to break the whole computation
if there's a field that is missing.
It seems more reasonable to log an error when this happen
so that technical action can be taken to fix it.
Before this change, the result of the export of a relational field was always a dict or a list of dict.
ex:
<record id="ir_exp_shopinvader_variant_lang" model="ir.exports.line">
<field name="name">publication_language_id/name</field>
<field name="alias">publication_language_id/name:lang</field>
<field name="export_id" ref="shopinvader.ir_exp_shopinvader_variant" />
</record>
will output:
{
...
"publication_language_id" : {
"lang": "French"
}
...
}
After this change it's now possible to define simple exporter for relational fields where the value into the result will be the display_name or a list of display_name of the related records.
ex:
<record id="ir_exp_shopinvader_variant_lang" model="ir.exports.line">
<field name="name">publication_language_id</field>
<field name="alias">publication_language_id:lang</field>
<field name="export_id" ref="shopinvader.ir_exp_shopinvader_variant" />
</record>
will output:
{
"lang": "French"
}
(Cherry-pick of 652c0167a after this commit was dropped by #1894's refactoring)
(+ test so that it cannot be forgotten again)