Skip to content
Snippets Groups Projects
Commit 2e7f7b12 authored by Pedram (PEBR)'s avatar Pedram (PEBR)
Browse files

[FIX] point_of_sale: improve order synchronization mechanism


This commit introduces improvements to the order synchronization
mechanism. The changes ensure better error handling and provide a more
reliable and informative synchronization process.

Key Changes:

1. Enhance `_flush_orders` Method
    - The `_flush_orders` method now has additional error handling to
    detect RPC errors during synchronization of multiple orders. If an
    RPC error is detected and multiple orders are being synced, the
    method will attempt to send each order to the server individually.

2. Introduce `_flush_orders_retry` Method
    - This method sends orders to the server one by one and keeps track
    of the synchronization status (successful, RPC error, or other
    errors).
    - It sets the synchronization status to `'connected'`, `'error'`,
    or `'disconnected'` based on the outcome of individual order
    synchronization attempts.

3. Improve Error Handling
    - Enhanced error handling mechanisms to differentiate between
    various types of errors.
    - Synchronization status reflects the type of error encountered.

opw-3389388

closes odoo/odoo#134333

X-original-commit: 57074c34e90cdbf1db5b06fc8ccd6ae2318191fc
Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: default avatarPedram Bi Ria (pebr) <pebr@odoo.com>
parent 2aafff6a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment