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

V16 merge from upstream #600

Merged
merged 440 commits into from
Jul 1, 2024
Merged

Conversation

ndd-odoo
Copy link
Member

No description provided.

remytms and others added 30 commits February 15, 2024 15:24
[16.0][OU-FIX] payment: install account_payment module
…_image-renamed-into-pos_payment_method_image

[OU-IMP] apriori : OCA/pos_journal_image renamed into OCA/pos_payment_method_image
[16.0][OU-IMP] sale: remove obsolete SQL views
Signed-off-by legalsylvain
- The error was located in the create_work_contact() method at line 150, where the join function was incorrectly called. The original call '" , ".joins(matching_partner.ids)' resulted in a TypeError because it expected a str instance but found an int.

The error was fixed using the following line of code:
", ".join(str(v) for v in matching_partner.ids)

This fix ensures that the elements of matching_partner.ids are properly converted to strings before being joined by the join function, thereby avoiding the error.
[16.0][OU-FIX] hr: Error when calling the join() function
[16.0][OU-ADD] mail_preview_base + mail_preview_audio: Merged into mail
…e-mig

[16.0] [OU-ADD] hr_maintenance: Nothing to do
Signed-off-by legalsylvain
Signed-off-by legalsylvain
Signed-off-by pedrobaeza
…on-mig

[16.0][OU-ADD] hr_gamification: Nothing to do
[16.0] [OU-ADD] gamification_sale_crm: nothing to do
[16.0][OU-ADD] product_margin: Nothing to do
[16.0] [OU-ADD] website_livechat: nothing to do
pedrobaeza and others added 26 commits May 28, 2024 19:30
[16.0][OU-ADD] l10n_be: nothing to do
the mail.template template_fs field must contain the path of the data
file where it is defined (to allow for it to be reset to its default value).
fill empty values by searching for the mail templates (by xml id) in the xml
files of the module that defines it.
…plate_template_fs_field

[16.0][OU-FIX] fill new mail.template template_fs field
This can gives us a hint of possible bottlenecks.

TT46020
…5-times

[16.0][IMP] website: log conversion of html fields from BS4 to BS5
… anymore. OCA/account_invoice_margin works out of the box with Odoo/point_of_sale.

See : OCA/pos#1128
…account_invoice_margin-merged-into-point_of_sale

[OU-IMP] apriori : pos_margin_account_invoice_margin merged into point_of_sale
[16.0][OU-ADD] l10n_ar: Nothing to do
…oice_document

[16.0][OU-ADD] l10n_latam_invoice_document: Nothing to do
Now that openupgradelib checks implicitly if a record value has a class
attribute, we can refine the conversion further applying some extra logical
filtering. Mainly when we're dealing with large tables.

We want also to log conversion performance to detect where the bottlenecks might be.

TT46020
Precompute this new store computed fields:

- account.bank.statement.first_line_index
- account.bank.statement.is_complete
- account.move.is_storno
- account.move.auto_post_until

TT46020
…5-times

[IMP] website: BS4->BS5 performance refinement
[16.0][OU][IMP] account: speed up new compute fields init
[16.0][OU-IMP] account: add work documentation
The method ``update_translatable_fields`` is inspired in the core
``_get_translation_upgrade_queries`` method, which had a bug that has
been recently addressed in odoo/odoo#168038

Also, we're avoiding removing any original ir_translation record so we
can address any further issue easly without needing to redump the table
from the former DB.

For html/xml tranlatable fields we'll use
``openupgrade_160.migrate_translations_to_jsonb`` which calls to the
proper core method in ``end-migration``.

Ideally we'd like to do everything with that method, but it relies on
having the models already in the registry, and that doesn't happen when
we're in `base`.

Rationale from Odoo's fix:

Before Odoo 16.0, it is possible to have database column whose value is ``NULL``
but still has translations in the ir_translation table. And these translations
can be displayed correctly in the UI.

How to reproduce before Odoo 16.0:
1. Open the form view of a record with non-required translated field.
   E.g. product.template.sale_description
2. Create a new record without touching the translated field for test
3. Directly click the translation button and fill all translations
4. click save
The column for the record's translated field has ``NULL`` value, and the
ir_translation table has new translation records with ``NULL`` in the src column

During upgrade, when the column value is converted to jsonb for the translated
field by the ORM, it will still be ``NULL``. And in the upgrade script when
update the value with all translations, the result will still be ``NULL``. E.g.
``NULL || '{"fr_FR": "french"}'::jsonb``
``NULL || '{"en_US": "english", "fr_FR": "french"}'::jsonb``

In this commit, for the above corner case, we assume the src was empty string
instead of NULL. In the above example, the result would be
``'{"en_US": ""}'::jsonb || '{"fr_FR": "french"}'::jsonb``
``'{"en_US": ""}'::jsonb || '{"en_US": "english", "fr_FR": "french"}'::jsonb``

TT49615
[16.0][OU-ADD] google_gmail: Migration done
…ranslation

[16.0][FIX] base: keep translations for null src while upgrade
…configurator_on_confirm

[16.0][OU-ADD] purchase_variant_configurator_on_confirm: Merged into purchase_variant_configurator
@ndd-odoo ndd-odoo requested a review from royle-vietnam July 1, 2024 04:42
@ndd-odoo ndd-odoo force-pushed the v16_merge_from_upstream branch from 4399e33 to f948805 Compare July 1, 2024 04:47
@royle-vietnam royle-vietnam merged commit 9b1091d into Viindoo:16.0 Jul 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.