purchase-workflow icon indicating copy to clipboard operation
purchase-workflow copied to clipboard

[16.0][FIX] Avoid repetition of lines at reception

Open CILC98 opened this issue 3 months ago • 6 comments

This change prevents the creation of lines when receiving products. This will also prevent inventory valuation from being corrupted, such that if there is more than one line (stock.move), the valuation will be incorrect when the purchase order has been invoiced previously.

Before https://github.com/user-attachments/assets/64041144-a51f-47d4-a401-bc69f9844341

After https://github.com/user-attachments/assets/be2eb62a-dff3-4794-8bf9-ef5c509cfd73

CILC98 avatar Sep 17 '25 15:09 CILC98

Please @pedrobaeza and @carlos-lopez-tecnativa can you review it?

CILC98 avatar Sep 22 '25 15:09 CILC98

Tests are in red.

pedrobaeza avatar Sep 22 '25 15:09 pedrobaeza

@pedrobaeza Hi Pedro, there's a constraint in the purchase_order_no_zero_price module that's preventing the tests from running properly. In my opinion, this module shouldn't be involved in the purchase_request module tests. Could you help me by telling me why this might be happening? I'd be very grateful in advance.

CILC98 avatar Oct 03 '25 00:10 CILC98

Well, why don't you assure your PO lines are not 0 price unit in the tests to avoid it?

pedrobaeza avatar Oct 03 '25 06:10 pedrobaeza

@pedrobaeza I followed your recommendation and it worked. Thank you. Can you review it please?

Is smiliar to #2819 but the time zone is not a problem

CILC98 avatar Oct 03 '25 15:10 CILC98

Hi @victoralmau this PR is similar to #2819 which one you helped me. Can you help again with the review please?

CILC98 avatar Oct 07 '25 17:10 CILC98