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

[MIG][9.0] mail_attach_existing_attachment: Module migrated #68

Merged
merged 4 commits into from
Jun 12, 2016

Conversation

sergio-teruel
Copy link
Contributor

@Tecnativa
@rafaelbn please review..

@@ -29,7 +29,7 @@
'author': "ACSONE SA/NV,Odoo Community Association (OCA)",
Copy link
Member

Choose a reason for hiding this comment

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

Add Tecnativa here

@pedrobaeza
Copy link
Member

You can put a better icon for this module

@sergio-teruel
Copy link
Contributor Author

@pedrobaeza changes done

@@ -44,7 +44,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback

Choose a reason for hiding this comment

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

you can simplify this part following latest README template

@sergio-teruel
Copy link
Contributor Author

@pedrobaeza @elicoidal Changes done

def get_mail_values(self, res_ids):
res = super(MailComposeMessage, self).get_mail_values(res_ids)
if self.object_attachment_ids.ids and self.model and len(res_ids) == 1:
if not res[res_ids[0]].get('attachment_ids'):
Copy link
Member

Choose a reason for hiding this comment

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

You can make res_id = res_ids[0] for clarifying the code

Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking that you can simplify whole expression with:

res[res_ids[0]].setdefault('attachment_ids', []).extend(self.object_attachment_ids.ids)

@pedrobaeza
Copy link
Member

There's only one line without coverage. As is a corner case, you can put # pragma: nocover for ignoring it in the coverage.

@rafaelbn rafaelbn modified the milestones: 8.0, 9.0 Jun 10, 2016
@rafaelbn
Copy link
Member

Tested functionally with SO an INV 👍

@@ -35,7 +35,7 @@ def default_get(self, fields_list):
if res.get('res_id') and res.get('model') and \
res.get('composition_mode', '') != 'mass_mail' and\
not res.get('can_attach_attachment'):
# pragma: nocoverlo
# pragma: nocover
Copy link
Member

Choose a reason for hiding this comment

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

In the same line:

res['can_attach_attachment'] = True  # pragma: nocover

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ups..

Copy link
Member

@pedrobaeza pedrobaeza Jun 11, 2016

Choose a reason for hiding this comment

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

Ouch now by my part. It's # pragma: no cover

@coveralls
Copy link

coveralls commented Jun 11, 2016

Coverage Status

Coverage decreased (-2.9%) to 97.059% when pulling dff1b4f on Tecnativa:9.0-MIG-mail_attach_existing_attachment into aac3be7 on OCA:9.0.

@sergio-teruel sergio-teruel force-pushed the 9.0-MIG-mail_attach_existing_attachment branch from 5e5f164 to cbbdc24 Compare June 11, 2016 16:39
@coveralls
Copy link

coveralls commented Jun 11, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling cbbdc24 on Tecnativa:9.0-MIG-mail_attach_existing_attachment into aac3be7 on OCA:9.0.

@lasley
Copy link
Contributor

lasley commented Jun 11, 2016

👍 code + tested on partner in Runbot

@rafaelbn
Copy link
Member

@sergio-teruel review comments from @pedrobaeza and we can merge

@pedrobaeza pedrobaeza mentioned this pull request Jun 12, 2016
31 tasks
@pedrobaeza
Copy link
Member

👍

@pedrobaeza pedrobaeza merged commit dc8996e into OCA:9.0 Jun 12, 2016
@pedrobaeza pedrobaeza deleted the 9.0-MIG-mail_attach_existing_attachment branch June 12, 2016 23:54
ernestotejeda pushed a commit to ernestotejeda/social that referenced this pull request Apr 17, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
hbrunn pushed a commit that referenced this pull request Jun 13, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
ghost pushed a commit to camptocamp/social that referenced this pull request Aug 21, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
ernestotejeda pushed a commit to Tecnativa/social that referenced this pull request Nov 5, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
pedrobaeza pushed a commit to Tecnativa/social that referenced this pull request Dec 5, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
AdriaGForgeFlow pushed a commit to ForgeFlow/social that referenced this pull request Dec 21, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
alan196 pushed a commit to Jarsa/social that referenced this pull request Dec 22, 2018
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
ernestotejeda pushed a commit to Tecnativa/social that referenced this pull request Mar 7, 2019
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
manuelcalerosolis pushed a commit to Tecnativa/social that referenced this pull request Mar 3, 2020
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
Rad0van pushed a commit to Rad0van/social that referenced this pull request Aug 24, 2020
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
denris pushed a commit to denris/social that referenced this pull request Jan 28, 2021
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
ernestotejeda pushed a commit to Tecnativa/social that referenced this pull request Jul 21, 2021
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
AlvaroTForgeFlow pushed a commit to ForgeFlow/social that referenced this pull request Dec 9, 2021
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
baimont pushed a commit to acsone/social that referenced this pull request Aug 29, 2022
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
baimont pushed a commit to acsone/social that referenced this pull request Oct 3, 2022
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
baimont pushed a commit to acsone/social that referenced this pull request Jan 19, 2023
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
astirpe pushed a commit to astirpe/social that referenced this pull request Feb 3, 2024
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
astirpe pushed a commit to astirpe/social that referenced this pull request May 5, 2024
* [MIG][9.0] mail_attach_existing_attachment: Module migrated
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