Git Product home page Git Product logo

Comments (8)

pedrobaeza avatar pedrobaeza commented on July 21, 2024

There shouldn't be a new state, or that will break flows that expect the standard states. I know you are thinking in this way for simplifying the code, but for sure it will have secondary effects. You can add a boolean field that is filled when validating the order, aborting it, and hide standard validation button and showing the other (for allowed one), in that case.

Anyway, I want to hear @carlosdauden's opinion on this.

from credit-control.

tafaRU avatar tafaRU commented on July 21, 2024

Thanks @pedrobaeza for your prompt feedback!

You can add a boolean field that is filled when validating the order, aborting it, and hide standard validation button and showing the other (for allowed one), in that case.

This solution seems to me acceptable.
I remain awating opinion from @carlosdauden before proceeding.

from credit-control.

carlosdauden avatar carlosdauden commented on July 21, 2024

What is the goal of that new state/field?
Could it be looking for orders with that state/field to force confirmation in batch? Could it be done using the existing wizard instead of a new button?
Remember that risk state is something quite variable that depends on several things.
Perhaps seeing the implementation will make it clearer, I am not opposed to any kind of improvement as long as it does not affect performance

from credit-control.

pedrobaeza avatar pedrobaeza commented on July 21, 2024

Also an integration with sale_tier_validation can be interesting instead of developing something apart, but indeed it's important the time factor: something that is in risk in one moment (or the contrary) can change in other moment of time.

from credit-control.

tafaRU avatar tafaRU commented on July 21, 2024

@carlosdauden

Could it be looking for orders with that state/field to force confirmation in batch?

Yes, this is the main reason. One of our customers would want to extrapolate the list of sale orders that have risk exceeded and decide which ones can be possibly confirmed.

Perhaps seeing the implementation will make it clearer, I am not opposed to any kind of improvement as long as it does not affect performance

Ok, I propose the PR in order to evaluate it.

from credit-control.

tafaRU avatar tafaRU commented on July 21, 2024

There shouldn't be a new state, or that will break flows that expect the standard states. I know you are thinking in this way for simplifying the code, but for sure it will have secondary effects.

@pedrobaeza could you please give an example?

from credit-control.

pedrobaeza avatar pedrobaeza commented on July 21, 2024

Right now I don't have an specific example, but I remember having this problem when adding a new state in sale.order in the past:

  • Buttons visibility broken as some states are not included.
  • Some code broken due to the same reason.

You will have side effects sooner or later, so it's not advisable IMO.

from credit-control.

tafaRU avatar tafaRU commented on July 21, 2024

In the end I decided to go for a customization.
Well, thank you for your time.

from credit-control.

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.