Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13.0 mig mail server relay disallowed #1762

Merged
merged 3 commits into from Apr 16, 2020

Conversation

JordiBForgeFlow
Copy link
Sponsor Member

No description provided.

'license': 'AGPL-3',
'category': 'Social Network',
'depends': ['base'],
'data': [],
Copy link

Choose a reason for hiding this comment

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

Can we remove this empty key ?

_test_logger = logging.getLogger('odoo.tests')


class IrMailServer(osv.Model):
Copy link

Choose a reason for hiding this comment

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

models.Model ?

)
_logger.error(msg)
raise MailDeliveryException(_("Mail Delivery Failed"), msg)
return message_id
Copy link

Choose a reason for hiding this comment

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

I think here it should adapt changes done in original v13 code.

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 13.0-mig-mail_server_relay_disallowed branch 3 times, most recently from c858a71 to 02180cd Compare February 3, 2020 12:49
Copy link

@AdriaGForgeFlow AdriaGForgeFlow left a comment

Choose a reason for hiding this comment

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

Code review 👍

@JordiBForgeFlow
Copy link
Sponsor Member Author

/ocabot merge

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 13.0-ocabot-merge-pr-1762-by-JordiBForgeFlow-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Feb 4, 2020
Signed-off-by JordiBForgeFlow
@OCA-git-bot
Copy link
Contributor

@JordiBForgeFlow your merge command was aborted due to failed check(s), which you can inspect on this commit of 13.0-ocabot-merge-pr-1762-by-JordiBForgeFlow-bump-no.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

)
assert (
smtp_from
), "The Return-Path or From header is required for any outbound email"
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for your module.
It seems than assert expression shouldn't not be in production code like here
https://stackoverflow.com/a/5143044 because could be skipped according to the execution mode of your app instance. Then assert should be reserve for unit tests where there is no production mode in execution.
But yes Odoo SA itself use this statement in its code not only for tests. As usual, OCA promotes the best practices before Odoo SA
https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement
There is a lot of documentation on this subject in python ecosystem
Not blocking for me, just for information

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, but here this part of code is just copied from odoo (it's an override) and we want to change the minor possible the code, in order to be able to check easy what change has been done comparing to original code.

@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 13.0-mig-mail_server_relay_disallowed branch from 02180cd to 92d3db6 Compare April 15, 2020 23:56
@JordiBForgeFlow
Copy link
Sponsor Member Author

/ocabot merge

@OCA-git-bot
Copy link
Contributor

Hi @JordiBForgeFlow. Your command failed:

Required option bumpversion_mode for command merge. Possible values : major, minor, patch, nobump.

Ocabot commands

  • ocabot merge major|minor|patch|nobump

More information

@JordiBForgeFlow
Copy link
Sponsor Member Author

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 13.0-ocabot-merge-pr-1762-by-JordiBForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 8497641 into OCA:13.0 Apr 16, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at e025860. Thanks a lot for contributing to OCA. ❤️

@MiquelRForgeFlow MiquelRForgeFlow deleted the 13.0-mig-mail_server_relay_disallowed branch April 16, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants