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

[17.0][mig] mail_attach_existing_attachment_account #1547

Open
wants to merge 19 commits into
base: 17.0
Choose a base branch
from

Conversation

damdam-s
Copy link
Member

No description provided.

tbaden and others added 18 commits January 16, 2025 14:44
[UPD] README.rst

[ADD] icon.png

[UPD] Update mail_attach_existing_attachment_account.pot

[UPD] README.rst
TT28899

[UPD] Update mail_attach_existing_attachment_account.pot

[UPD] README.rst
…ti-company

Doing a bulk search on accounts without company filter can lead to
selecting an account of other company, and thus, making the test to
fail.

We restrict the account search to the current company.
We show the field with the same technique as in the base module, which
improves the display, showing the label.
Currently translated at 50.0% (1 of 2 strings)

Translation: social-16.0/social-16.0-mail_attach_existing_attachment_account
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_attach_existing_attachment_account/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: social-16.0/social-16.0-mail_attach_existing_attachment_account
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_attach_existing_attachment_account/it/
@damdam-s damdam-s force-pushed the 17.0-mig-mail_attach_existing_attachment_account2 branch from a073f31 to d701bc5 Compare January 20, 2025 12:27
@damdam-s damdam-s force-pushed the 17.0-mig-mail_attach_existing_attachment_account2 branch from c1132cd to 1ff4372 Compare January 20, 2025 14:26
Copy link

@alexandregaldeano alexandregaldeano left a comment

Choose a reason for hiding this comment

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

Overall, LGTM

Comment on lines +37 to +43
# def _prepare_mail_values(self, res_ids):
# res = super()._prepare_mail_values(res_ids)
# if self.object_attachment_ids.ids and self.model and len(res_ids) == 1:
# res[res_ids[0]].setdefault("attachment_ids", []).extend(
# self.object_attachment_ids.ids
# )
# return res

Choose a reason for hiding this comment

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

Remove this commented out code please :)

name="object_attachment_ids"
widget="many2many_checkboxes"
domain="[('res_model', '=', 'account.move'), ('res_id', 'in', move_ids)]"
invisible="can_attach_attachment==False"
Copy link

@alexandregaldeano alexandregaldeano Jan 24, 2025

Choose a reason for hiding this comment

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

Suggested change
invisible="can_attach_attachment==False"
invisible="not can_attach_attachment"

?

Copy link

@petrus-v petrus-v left a comment

Choose a reason for hiding this comment

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

I suppose we could improve test coverage on this module

Comment on lines +37 to +43
# def _prepare_mail_values(self, res_ids):
# res = super()._prepare_mail_values(res_ids)
# if self.object_attachment_ids.ids and self.model and len(res_ids) == 1:
# res[res_ids[0]].setdefault("attachment_ids", []).extend(
# self.object_attachment_ids.ids
# )
# return res

Choose a reason for hiding this comment

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

I suppose comment code could be removed

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

TT54708
@Tecnativa

res["can_attach_attachment"] = True # pragma: no cover
return res

can_attach_attachment = fields.Boolean()
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the duplicate field; it is already declared at the top of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.