Validate delivery when sale is confirmed

Description

Currently, in odoo, we have automated delivery validation when invoice is created. (if "Validate Pickings when invoice is created" is configured)
We need to shift this functionality on "confirmation of sale".
Note, configuration of "Skip invoice options" will remain applicable.

Expected functionality: Automating Delivery Orders - on Confirmation of Sale

  • do this only “Validate delivery when order confirmed” is configured.
    (this will replace the previous configuration "Validate Pickings when invoice is created")
    > otherwise, normal odoo delivery order is created. (which needs to be manually validated)

  • if the above configuration is enabled, and there is no stock of an item, we will ONLY validate delivery if configuration “Allow negative stock” is enabled. otherwise, create normal Delivery Order - not validated (edited)

This needs to be applicable for products in the sale order. meaning - if I have 2 items in the order to be given from "OPD Pharmacy stock room"
1. Ibuprofen 500 mg - 5 items ( however, only 3 is available at OPD pharmacy)
2. Calamine lotion - 1 item (available at OPD pharmacy)

Then,
for 1) validate delivery following the rules above. (if no negative stock allowed, it will create a unvalidated delivery order to be manually reconciled)
for 2) validate delivery order

NOTE: This does not disturb the invoice flow
1. If "Skip invoice" option is enabled, then on "confirmation of sale", it should create invoice and show payment screen
2. If "skip invoice" option is not enabled, then the "create invoice" button will show as usual.

Status

Assignee

Anand Patel

Reporter

Angshuman Sarkar

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Components

Sprint

Fix versions

Configure