Commit Graph

10 Commits (782ef3313a3de50d6d318f126261d53d06b17903)

Author SHA1 Message Date
Simone Orsi 2d5d36b976 jsonifier: adapt tests 2025-02-21 11:34:48 +01:00
Simone Orsi 134294b3e8 jsonifier: make pre-commit happy 2025-02-21 10:52:00 +01:00
Simone Orsi 2e7ee2269b jsonifier: fix field validation
An invalid field must be skipped in any case if not in strict mode.
Error message has been downgraded to warning since is not really broken
till you use string mode.

Log tests reworked.
2025-02-21 10:34:55 +01:00
Giovanni Francesco Capalbo aee47a5e41 [ADD] jsonifier: with_fieldname option
Orig commit msg:

[ADD] use jsonifier features to retund postprocessed values, containing
field string as well

Better Version, not using function features , leaves parser syntax
intact.

[FIX] Review fixes

[FIX] small comment and style fix
2025-02-21 10:27:12 +01:00
Simone Orsi 908a4c5956 jsonifier: allow json_key override by resolver
Quite handy to take full control of the final result.
2025-02-21 09:50:53 +01:00
Laurent Mignon (ACSONE) 8d9f80f140 [FIX] jsonifier: Call callable for unknown field
If a field name into the parser definition doesn't exist into the model but is resolved by a callable, call the method. Prior to this change, it was o more possible to define computed json value for custome keys
2024-02-02 14:13:15 +01:00
Sébastien BEAU 6281758a6e jsonifier: remove deprecated logic for getting the date in user tz 2023-02-27 10:16:05 +01:00
Sébastien BEAU db4d191c35 jsonifier: migration to v16 2023-02-27 10:09:28 +01:00
Sébastien BEAU a9449b2be9 [IMP] jsonifier: black, isort, prettier 2023-02-27 10:05:54 +01:00
Simone Orsi 47306c8143 Replace base_jsonify w/ jsonifier
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.
2023-02-27 10:05:54 +01:00