Giter VIP home page Giter VIP logo

Comments (6)

hbrunn avatar hbrunn commented on July 30, 2024

This is odoo's standard behavior, to change this, we'd have to put {'active_test': False} into the context by default. I dont think this is a good idea, because then we'd also see objects that are inactive for good reasons.

from web.

clonedagain avatar clonedagain commented on July 30, 2024

I'm not convinced it's right to accept and extend Odoo's default behavior in this case.
The behavior users expect is that the main model is filtered on "Active=True", not the related models.
i.e. when a partner is inactive, you can still find it's related invoices.

The problem is that, as it is now, the implicit criteria "active=True" makes the "user experience" inconsistent.
For example:

  • search for invoices in period X => finds results for all partners
  • search for invoices in period X and partner "in selection (category = 'ABCD')" => finds results for only the active partners in the category ABCD

Would you be kind enough to reconsider your position?

from web.

pedrobaeza avatar pedrobaeza commented on July 30, 2024

I agree with @clonedagain about the reasoning on the feature, but I think that there's a technical problem to implement this correctly. @hbrunn, is this correct?

from web.

hbrunn avatar hbrunn commented on July 30, 2024

In most cases, it should be enough to put active_test: False in the context, analyze the current search domain if it contains the active field, the model if it has an active field, and finally add ('active', '=', True) if all this checks go right.
But still, we'll run into subtle weirdnesses as described in odoo/odoo#3939 - especially the explanation linked in the second last post.

I simply don't think there's a general way to exclude inactive records we actually don't want to see while including other active records we do want to see, and making this explicit doesn't seem like a big issue to me, so from my side, I won't invest time in addressing this. If somebody else will, I'll be happy to review.

from web.

pedrobaeza avatar pedrobaeza commented on July 30, 2024

Well, looking at the issue, this is only due to the child_of operator and the partner hierarchy implementation, which is not one of the allowed in the advanced search, so I still think that we can provide this facility in the module, and 99% of cases will be correctly treated.

from web.

hbrunn avatar hbrunn commented on July 30, 2024

wontfix for reasons stated above

from web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.