Skip to content

Conversation

@cyrilmanuel
Copy link

@cyrilmanuel cyrilmanuel commented Dec 9, 2025

superseed of #2184

test removed because they are not anymore needed.

The return domain with "IN" on odoo 19.0 on fields.py change and return always something good (as far as i see) :

 :param str search: name of a method that implements search on the field.
        The method takes an operator and value. Basic domain optimizations are
        ran before calling this function.
        For instance, all ``'='`` are transformed to ``'in'``, and boolean
        fields conditions are made such that operator is ``'in'``/``'not in'``
        and value is ``[True]``.

        The method should ``return NotImplemented`` if it does not support the
        operator.
        In that case, the ORM can try to call it with other, semantically
        equivalent, operators. For instance, try with the positive operator if
        its corresponding negative operator is not implemented.
        The method must return a :ref:`reference/orm/domains` that replaces
        ``(field, operator, value)`` in its domain.

        Note that a stored field can actually have a search method. The search
        method will be invoked to rewrite the condition. This may be useful for
        sanitizing the values used in the condition, for instance.

        .. code-block:: python

            def _search_partner_ref(self, operator, value):
                if operator not in ('in', 'like'):
                    return NotImplemented
                ...  # add your logic here, example
                return Domain('partner_id.ref', operator, value)

MiquelRForgeFlow and others added 27 commits December 9, 2025 09:18
Fields are not stored anymore to avoid computed fields getting outdated and concurrency issues.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-15.0/partner-contact-15.0-partner_manual_rank
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-15-0/partner-contact-15-0-partner_manual_rank/
…arch_mode` context

Use context set by Odoo in most of their views to pre-fill supplier/customer fields.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-16.0/partner-contact-16.0-partner_manual_rank
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_manual_rank/
The base filters added by Odoo create confusion with the ones added in
the module.
Currently translated at 100.0% (6 of 6 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_manual_rank
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_manual_rank/it/
@cyrilmanuel cyrilmanuel force-pushed the 19.0-biss-partner_manual_rank branch from a720463 to b3f69e5 Compare December 9, 2025 08:29
@cyrilmanuel cyrilmanuel changed the title [MIG] partner_manual_rank: Migration to 19.0 [19.0][MIG] partner_manual_rank: Migration to 19.0 Dec 9, 2025
@cyrilmanuel cyrilmanuel force-pushed the 19.0-biss-partner_manual_rank branch from b3f69e5 to 0084787 Compare December 9, 2025 12:09
Comment on lines +54 to +55
with self.assertRaises(NotImplementedError):
self.env["res.partner"].search([("is_customer", "in", [True, False])])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still not raised, but I think I would go the same way

@hieulucky111
Copy link

Can you fix these fail tests?
image

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.