-
- Downloads
[FIX] website_sale: sale_get_order force_create
Previously, if there was a sale_order_id but it was wrong, like when the sale order was deleted for example, the function didn't return a sale order, even with force_create=True. It used to pass the first 'if' as sale_order_id had a value, so no new sale order was created. However, as sometimes the id was referring to a non-existant sale_order, a sale_order.exists() test was used later, resulting in the function sometimes returning None, even with force_create = True. Proposed solution is to test the existence of the browse record with the given id earlier, instead of testing the existence of the id itself.
Please register or sign in to comment