New procurement method

Registered by Ana Juaristi Olalde

I propose building a new procurement method that would be a mix between both method existing today on OpenERP.
Today:
Procurement to stock: Needs a rule to be defined. System verify if there is stock available. If there is stock but quantity is less than minimum quantity especified on rule, then a purchase order will be created, includin quantity max of rule.
Procurement to order: Does not need a rule. System always creates a purchase order including the quantity specified on sales order.

New produrement method:
No rule need to apply the method. System verify if there is stock for product. If there is enought quantity nothing is done. If there is 0 quantity stock, a purchase order is created with quantity of sales order line.
If there is a part available, a purchase order is created with quantity of sales order less available quantity.

This kind of procurement is very offten done, with a distributor works buying products to foreing countries where delivery can be delayed for multiple problems. This is the case:
   I buy 120 product A. I always need buying product A agains stock because my supplier is chinese. Delivery is 2 months long.
   If I have stock of A, I don't wanna buy more. If I haven't got A and a customer buys it, I have got another alternative spanish supplier who can deliver the product to me in 2 days, but is much more expensive for me than selling my own product, so i only wanna buy to spanish provider the just necesary quantity to be able to deliver the order to muy customer and no more.
So mixed method could fill this need.

I think easiest way to build this new functionality could be using the standar producurement method to order. For that we would include a new check box on products form. We would mark this check for products that have to be procured with this new method.
After the supplier order is created:
   1. System would check if product included on purchase order line is marked with new check on product from
   2. If it is, the quantity would be recalculated this way:
        1. If there is enought virtual stock to serve the sales order line, line would be deleted
        2. If there is a part of virtual stock available, quantity on purchase order line would be recalculated as quantity sold less product virtual stock
        3. if thereis no virtual stock available nothing is done
   3. If after procesing all purchase order lines there is no lines on it, purchase order would be deleted.

---------------------------
Nuevo método de abastecimiento:
Se desea conseguir un método de abastecimiento que es intermedio entre el abastecimiento contra stock y el abastecimiento contra pedido:

Standar de Openerp:

    * Contra stock --> Verifica si hay stock y solo hace pedido de compra si la cantidad solicitada en el pedido de venta baja del mínimo establecido en la regla de stock asociada. La cantidad incluida en el pedido de compra corresponde al máximo establecido en la regla asociada.
    * Contra Pedido --> No verifica stock y siempre incluye en el pedido de compra la cantidad establecida en el pedido de venta.

Nuevo método:

    * No requiere regla de stock. Verifica la cantidad en stock. La cantidad incluida en la compra debe ser la solicitada en el pedido de venta menos el stock disponible del producto.

Lo único que cambia del funcionamiento standar de OpenERP es la cantidad incluida en la línea del pedido de compra. Incluso, si es más sencillo podría hacerse un update posterior a la creación de la misma. Es decir, que actúe OpenERP de forma standar y cuando se crea el pedido de compra y cada vez que se crea uno, por cada producto que hay en la línea si dicho producto tiene abastecimiento contra stock, cambiar la cantidad por cantidad solicitada en el pedido de venta origen - stock real del producto.

Si al final del tratamiento de todas las líneas, no hay líneas en el pedido de compra, este sería borrado.

------------------------------------------------------------------------------------------------------------------------------------------------

EDITED: 2009/11/28

This blueprint it's not necesary by now... OpenERP standar functionality allows configuring this situation. It's only necesary to specify on product:
   .- procurement to stock
   .- Min = 0 and Max = 0 on Minimun stock rule.

It works. It only creates a sales order with the necesary quantity of product.

Thanks Albert Cervera to give me the clue!!!! I didn't think about this kind of configuration on rules!!!

Thank you:

Ana

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Ana Juaristi Olalde
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Ana Juaristi Olalde
Completed by
Ana Juaristi Olalde

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.