Skip to content

Conversation

@andrel-exo
Copy link
Contributor

My first PR #831 fixed the issue where analytic distributions intended only for POS were also being applied in the backend.
However, it introduced a side effect: analytic lines started being created in flows where they shouldn’t (e.g. POS payments and session closing).

The root cause was that the _get_default_search_domain_vals method was missing. Without it, the POS-scoped models were still being matched globally in Odoo 18, since the analytic engine only filters on keys present in vals.

This new PR restores the original logic but also defines _get_default_search_domain_vals with {"pos_config_id": False}.

@pedrobaeza pedrobaeza added this to the 18.0 milestone Oct 13, 2025
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

I don't really get the problem, and it would be advisable:

  1. Put comments on the code on what and why that 2 overrides.
  2. Put a regression test checking what this patch is fixing.

@andrel-exo andrel-exo changed the title [17.0][FIX] pos_analytic_by_config [18.0][FIX] pos_analytic_by_config Oct 13, 2025
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.

2 participants