Sale advance payment amount added multiple times
(Tested in develop branch)
- Create an empty database and install sale_advance_payment and its requirements.
- Make the initial configuration.
- Add a new party for the sale "Sale Test"
- Add an advance payment, for this case, we add a new line with the values:
- Description: Advance Payment 30%
- Account: Advance Payment
- Formula: untaxed_amount * 0.3
- Create a new account product category
- Create a new product "Computer" with a list price of "1000", check the "salable" check
- Create a new sale, with the values:
- Party: Sale Test (created in step 3)
- Invoice Method: On shipment send
- Shipment Method: On order processed
- Advance Payment: "Advance Payment Test" (created in step 4)
- Add a new sale line, with the values:
- Product: "Computer" (created in step 6)
- Quantity: 10
- Click "Quote" button
- Click "Confirm" button
- Click "Process" button
- Now, pay the advance invoice created and go back to the sale
- Go to the shipment created and change the quantity from the inventory move and outgoing move from "10" to "5", leave done this shipment and go back to the sale, now we have an invoice with 5 "Computer" units and advance payment with the 30% value of the sale
- In the sale, click again "process", this will create another shipment for the 5 left units, leave as done this shipment.
- If we go to the sale, we see another invoice for the 5 left units, with another "Advanve Payment" line.
I think this is incorrect because instead of have 30% of the sale as advance payment we have the 60%, if the first invoice have an advance payment, the second invoice must not have another advance payment line.