Skip to content

[IMP] edi_core_oca: Improve result message - #306

Open
wouitmil wants to merge 2 commits into
OCA:19.0from
camptocamp:edi_core_oca-improve_result_message
Open

[IMP] edi_core_oca: Improve result message#306
wouitmil wants to merge 2 commits into
OCA:19.0from
camptocamp:edi_core_oca-improve_result_message

Conversation

@wouitmil

Copy link
Copy Markdown

No description provided.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @etobella, @simahawk,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added mod:edi_core_oca Module edi_core_oca series:19.0 mod:edi_queue_oca Module edi_queue_oca labels Jun 11, 2026
@wouitmil
wouitmil force-pushed the edi_core_oca-improve_result_message branch 3 times, most recently from 20b7a5b to 382f659 Compare June 11, 2026 15:50
Comment thread edi_core_oca/models/edi_backend.py Outdated
@Ricardoalso
Ricardoalso force-pushed the edi_core_oca-improve_result_message branch from 382f659 to 80ead6d Compare July 6, 2026 09:26
@Ricardoalso

Ricardoalso commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@wouitmil
Rebased for the purposes of the origin project

@Ricardoalso
Ricardoalso force-pushed the edi_core_oca-improve_result_message branch from 80ead6d to 2ff6676 Compare July 6, 2026 09:28
@wouitmil

Copy link
Copy Markdown
Author

@ivantodorovich this PR is ready to be merged

@ivantodorovich ivantodorovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to you @simahawk ?

self._check_exchange_generate(exchange_record, force=force)
output = self._exchange_generate(exchange_record, **kw)
message = None
action_result = self._ensure_action_result(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each _exchange_$action should take care of returning the wrapped result.
Here you should not wrap.
Also I wouldn't pass default_message.
Just do message = result.message or exchange_record._exchange_status_message("generate_ok")

message = exchange_record._exchange_status_message("send_ok")
message = (
send_result.message
or send_result.output

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want the output as a message you must return it as the message

else "output_sent"
)
res = message
res = send_result.output or message

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

read above

Comment thread edi_core_oca/utils.py


@dataclass
class EdiExchangeActionResult:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class EdiExchangeActionResult:
class EDIExchangeActionResult:

@ivantodorovich

Copy link
Copy Markdown
Contributor

ping @wouitmil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:edi_core_oca Module edi_core_oca mod:edi_queue_oca Module edi_queue_oca series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants