Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] api: add and enhance several endpoints
Added docstring, clarified the purpose and improved of multiple endpoints to enhance the user experience and maintain consistency in the application. 1. `/create_schedule_activity_invoice`: Improved error handling for creating scheduled activities related to invoices. 2. `/get_states_mexico`: Enhanced the endpoint to retrieve the list of states in Mexico, including better error handling and more detailed responses. 3. `/get_inventory_by_sku`: Updated the endpoint to retrieve inventory details based on SKU, ensuring accurate and detailed inventory information is returned. Filter inventory by location. 4. `/get_inventory`: Improved the retrieval of inventory details for all products with a SKU, adding more detailed responses. Filter inventory by location. 5. `/send_message_sale_order`: Added functionality to post messages to sale orders, with better logging and error handling. 6. `/create_schedule_activity`: Enhanced the creation of scheduled activities related to sale orders, including additional validation and detailed responses. 7. `/confirm_sale_order`: Simplified the process of confirming sale orders and added detailed logging and responses. 8. `/send_invoice_by_email/<int:invoice_id>`: Improved the functionality for sending invoices by email, ensuring better user feedback and error handling. 9. `/stamp_invoice/<int:invoice_id>`: Enhanced the invoice stamping process, including detailed error messages and success responses. 10. `/download_invoice/<int:invoice_id>`: Streamlined the invoice download process to generate and deliver PDFs more efficiently. 11. `/get_shipping_info/<model("sale.order"):order>`: Added functionality to retrieve detailed shipping information for sale orders, including delivery address details and shipping records. 12. `/register_payment_invoice/<model("account.move"):invoice>`: Improved the payment registration process for invoices, ensuring accurate logging and error handling. 13. `/invoice_sale_order`: Enhanced the process of invoicing sale orders, including better handling of invoice creation and posting. 14. `/update_sale_order`: Improved the update process for sale orders, including validation and detailed logging. 15. `/create_sale_order`: Enhanced the creation process for sale orders with better validation and handling of optional fields. 16. Unify scheduling and address endpoints 17. `/delivery_address`: Improved the process for creating or updating delivery addresses, including better handling of address formatting and validation. 18. `/address_invoice`: Enhanced the process for creating or updating billing addresses, ensuring better validation and error handling. 19. `/update_contact`: Improved the contact update process, including better validation and detailed logging. 20. `/create_contact`: Enhanced the contact creation process with better search logic and validation based on email, phone, or store name (contact name). 21. doc: add README.rst for module documentation 22. Filter inventory by location and SKU 23. Unify scheduling and address endpoints These changes improve the overall robustness and maintainability of the system by ensuring that each endpoint handles data consistently and provides meaningful feedback to users. Closes #24 Closes #25
- Loading branch information