Skip to content

Commit

Permalink
edi_sale_oca: handle existing order drop dead code
Browse files Browse the repository at this point in the history
This piece of code was never executed because it should have been done
with a new cursor. Yet, there's no need to post a message on the order.
Another point is: shall we simply avoid failing and return the msg to the job result?
  • Loading branch information
simahawk committed Nov 15, 2024
1 parent 0952de5 commit d023bb5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
1 change: 0 additions & 1 deletion edi_sale_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"views/res_partner.xml",
"views/sale_order.xml",
"views/edi_exchange_record.xml",
"templates/exchange_chatter_msg.xml",
],
"demo": [
"demo/edi_backend.xml",
Expand Down
18 changes: 2 additions & 16 deletions edi_sale_oca/components/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,5 @@ def _handle_create_order(self, order_id):
return order

def _handle_existing_order(self, order, message):
prev_record = self._get_previous_record(order)
self.exchange_record.message_post_with_view(
"edi_sale_oca.message_already_imported",
values={
"order": order,
"prev_record": prev_record,
"message": message,
"level": "info",
},
subtype_id=self.env.ref("mail.mt_note").id,
)

def _get_previous_record(self, order):
return self.env["edi.exchange.record"].search(
[("model", "=", "sale.order"), ("res_id", "=", order.id)], limit=1
)
# Hook
pass
37 changes: 0 additions & 37 deletions edi_sale_oca/templates/exchange_chatter_msg.xml

This file was deleted.

0 comments on commit d023bb5

Please sign in to comment.