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

[IMP] [14-15-16] sale_delivery_state #2818

Open
ValentinVinagre opened this issue Nov 28, 2023 · 5 comments
Open

[IMP] [14-15-16] sale_delivery_state #2818

ValentinVinagre opened this issue Nov 28, 2023 · 5 comments

Comments

@ValentinVinagre
Copy link
Contributor

Explanation of the limitation:

If in a sale order you have 2 lines:

  • Consumable/storable type product
  • Service type product that refers to transportation.

The "delivery_state" field will never indicate that it has been completely delivered because it takes into account the delivery of the service and will have to force that the entire sale has been delivered.

Solution:

Create a checkbox in sales configuration (by company), which indicates whether this field has to take into account service type products or not.
In the future it could be expanded with the sale_order_type module in case there are order types that do have to be taken into account.

What do you think about adding this new functionality? If you are convinced, we will carry out the PR with the extension.
@HaraldPanten @etobella @pedrobaeza

@etobella
Copy link
Member

I think you don't even need the flag, by default, the delivery shouldn't check services. Or did I understood something wrongly=

@ValentinVinagre
Copy link
Contributor Author

It makes sense in sales that create projects and invoices based on recorded hours (which count as delivered), so in those cases it should work.

@HaraldPanten
Copy link
Contributor

I think that delivery state should be focused in picking, not in hours (even if the system takes in consideration the delivered hours), but a checkbox will be an "intermediate solution" that will satisfy both points of view.

@yostashiro @sebastienbeau @lmignon @rousseldenis that might be interesting for you, as well.

@yostashiro
Copy link
Sponsor Member

sale_delivery_state already skips order lines with is_delivery true, but I suppose the issue raised here is about service lines with is_delivery false (or when delivery module is not installed).

I tend to think that those service lines should also be accounted for, and users should manually update delivered quantities. However, I think it's also good to have a boolean field in the order line to provide an option to be skipped in the delivery state computation. Adding a global configuration is good, and it'd be even better to be able to adjust skip/no-skip at the order line level.

@ValentinVinagre
Copy link
Contributor Author

sale_delivery_state already skips order lines with is_delivery true, but I suppose the issue raised here is about service lines with is_delivery false (or when delivery module is not installed).

I tend to think that those service lines should also be accounted for, and users should manually update delivered quantities. However, I think it's also good to have a boolean field in the order line to provide an option to be skipped in the delivery state computation. Adding a global configuration is good, and it'd be even better to be able to adjust skip/no-skip at the order line level.

We could consider both cases, I see it well. Because it is well received, we will present a PR with the change in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants