Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing from upstream OCA/server-tools (15.0) #1289

Merged
merged 97 commits into from
Sep 13, 2023
Merged

Conversation

bt-admin
Copy link

bt_gitbot

sebastienbeau and others added 30 commits March 12, 2023 09:04
remove copyrights from init and update copyrights
* [ADD] restore travis configuration

* [PEP] fix pep8

* [REF] exclude  product_categ_available_pos of testing due to issue odoo/odoo#23749
Currently translated at 100.0% (11 of 11 strings)

Translation: server-tools-12.0/server-tools-12.0-base_jsonify
Translate-URL: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-base_jsonify/zh_CN/
We can't change the order on ir.export.line since it's used to preserve the order speicifed by the user when creating a export filter into the UI
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-12.0/server-tools-12.0-base_jsonify
Translate-URL: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-base_jsonify/
…atetime object

Convert fields.Date and fields.Datetime values to string when serializing to json
simahawk and others added 28 commits March 12, 2023 09:04
…mple field

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 652c016 after this commit was dropped by #1894's refactoring)
(+ test so that it cannot be forgotten again)
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.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-14.0/server-tools-14.0-base_jsonify
Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_jsonify/
Signed-off-by thomaspaulb
@bt-admin bt-admin added the 15.0 label Sep 13, 2023
@bt-admin bt-admin merged commit bb6ef3a into brain-tec:15.0 Sep 13, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.