Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Outgoing quantity from draft/sent or not fully delivered confirmed orders (odoo14)

by
Francesco Ballerini
- 05/06/2024 10:25:21

Hi Yoshi,


This perfectly matches what I was searching for 👍👍 I like the approach of adding 'draft' and 'sent' quantities directly into the 'virtual_available' field, I think we can try to use your module as is.
This was really helpful and effective, thank you !

--
Francesco Ballrini



Il giorno mer 5 giu 2024 alle ore 02:39 Yoshi Tashiro <notifications@odoo-community.org> ha scritto:
Hi Francesco,

We made this module for a client for the similar need to what you describe.


Good luck!
-- 
田代祥隆 Yoshi Tashiro
コタエル株式会社 / Quartile Limited



On Wed, Jun 5, 2024 at 12:23 AM Francesco Ballerini <notifications@odoo-community.org> wrote:
Hi,

I am looking for way to compute a field on products that shows the "free quantity" in a slightly different way compared to Odoo:
Odoo will show free quantity as "qty on hand - reserved qty", but the reserved quantity is related to stock moves so the evaluation involves an order confirmation.

I have been asked to add a new "free quantity" field that is computed instead as "qty on hand - outgoing qty" where the outgoing quantity should be computed from

  •  'draft' (quotations) orders
  • 'sent' (e-Commerce) orders
  • 'confirm' orders but only for those lines that hasn't been fully delivered

I might have found an approach to this, which I'll describe below, but I'd like to ask if you have a better suggestion (in best case a field that I've missed or maybe a module introducing this), as I was looking for an easier or better way to achieve this task. 

Otherwise I think I can do the following:

I think I can use this module maybe in combination with its parent sale_delivery_state, in order to filter out the majority of orders and evaluate the remaining order lines, filtered by active product: 
the sum of `demanded quantity - delivered quantity` for all those lines should match the needed computation I need for the "outgoing" quantity at this point.

Do you have any hint for a shorter and/or better way?

Thanks in advance

--
Francesco Ballerini

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe