OCA / purchase-workflow

Odoo Purchases, Workflow and Organization
GNU Affero General Public License v3.0
199 stars 765 forks source link

[V14] Purchase Request Line Not Possible to Fullfiled when Having Purchase Order although The PO Line quanity is Less than PR Lines Qty #1813

Open bunhin opened 1 year ago

bunhin commented 1 year ago

When RFQ is created from PR Lines for some reason less quantity is processed become a PO, the unfulfilled quantity for the PR Lines is not possible for other RFQ or PO to create.

Module: Purchase Request

Bug description:

  1. When a PR line quantity is processed partially caused by some valid or justified reason, it is not possible with the current implementation to fulfill the rest quantity of the PR Lines.
  2. When We select a PR line then we create RFQ with action-->Create RFQ, whatever quantity to process or to create RFQ we enter, The created RFQ always gets the PR Line quantity, not the quantity we enter to create the RFQ

Steps to reproduce the behavior:

  1. Go to Purchase Request App, then create a Purchase Request with a product in the request line for quantity = 10
  2. Save and confirm the purchase request
  3. Go to Purchase App -- Order -- Purchase Request Lines
  4. Select the purchase request line we created in step 1
  5. Click Action -- Create RFQ
  6. Modify the quantity we want to create RFQ say we want to process 5
  7. Create RFQ --> so we will get the RFQ line quantity as same with PR line quantity (10) instead of the quantity we enter in step 6 (we want 5)
  8. We edit the RFQ line quantity to be 5
  9. Confirm/Convert RFQ become Purchase Order
  10. Go to PR and check the allocation tab, we get 5 allocated (as follows the step 6, I believe)
  11. Say we want to make the second RFQ for the balance of the PR line quantity that is not processed
  12. So Go to Purchase App -- Order -- Purchase Request Lines
  13. Select the same PR line (same as step 4)
  14. The User error Pop Up is displayed saying "The purchase has already been completed."

Expected behavior

  1. We should be able to create a new RFQ for the pr line although we already have a PO in the done state because we still have 5 to process.

  2. When we select a different quantity (less than the PR line quantity) on "create RFQ wizard", the RFQ line created should respect the entered quantity.

bunhin commented 1 year ago

I also find when I try with runboat, that the purchase request line allocation table is not updated when validating the receiving of PO of the purchase request line. am I missing something to set?