Skip to content

Commit

Permalink
edi_sale_ubl: do not compute state for non edi orders
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk committed Jan 30, 2025
1 parent b345d0d commit 914e44d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions edi_sale_ubl_oca/components/listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ def _handle_order_state(self, order, lines=None):
self._handle_order_state_no_state(order)

Check warning on line 40 in edi_sale_ubl_oca/components/listeners.py

View check run for this annotation

Codecov / codecov/patch

edi_sale_ubl_oca/components/listeners.py#L40

Added line #L40 was not covered by tests

def _skip_state_update(self, record, fields=None, operation=None):
if record.env.context.get(
"edi_sale_skip_state_update"
) or not self._is_ubl_exchange(record):
if (
not record.origin_exchange_record_id
or record.env.context.get("edi_sale_skip_state_update")
or not self._is_ubl_exchange(record)
):
return True
return False

Expand Down

0 comments on commit 914e44d

Please sign in to comment.