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

[18.0][MIG] mail_restrict_follower_selection: Migration to 18.0 #4

Open
wants to merge 38 commits into
base: 18.0
Choose a base branch
from

Conversation

Kimkhoi3010
Copy link
Owner

No description provided.

hbrunn and others added 30 commits October 15, 2024 12:26
Currently translated at 100.0% (3 of 3 strings)

Translation: social-11.0/social-11.0-mail_restrict_follower_selection
Translate-URL: https://translation.odoo-community.org/projects/social-11-0/social-11-0-mail_restrict_follower_selection/fr/
Currently translated at 100.0% (3 of 3 strings)

Translation: social-11.0/social-11.0-mail_restrict_follower_selection
Translate-URL: https://translation.odoo-community.org/projects/social-11-0/social-11-0-mail_restrict_follower_selection/de/
Currently translated at 75.0% (3 of 4 strings)

Translation: social-13.0/social-13.0-mail_restrict_follower_selection
Translate-URL: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mail_restrict_follower_selection/it/
When creating a record from a record from another model, the model is not in the context (`default_res_model` key). For example: creating an invoice from a sale order.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: social-14.0/social-14.0-mail_restrict_follower_selection
Translate-URL: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_restrict_follower_selection/
Currently translated at 100.0% (7 of 7 strings)

Translation: social-14.0/social-14.0-mail_restrict_follower_selection
Translate-URL: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_restrict_follower_selection/it/
1. Use forecreate=false in mail_restrict_follower_selection/data/ir_config_parameter.xml so that a deleted configuration is not recreated by a module update
2. Change the default domain to something less agressive
3. Add an example restriction restricting following a specific model
OCA-git-bot and others added 8 commits October 15, 2024 12:26
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: social-16.0/social-16.0-mail_restrict_follower_selection
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_restrict_follower_selection/it/
With this is change it is now possible to use the `ref` function
in the domain set in a parameter, allowing to include xmlids
in the domain.
Copy link

@thienvh332 thienvh332 left a comment

Choose a reason for hiding this comment

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

LG overall

Comment on lines 26 to 39
str(domain), locals_dict={"ref": lambda str_id: _id_get(self.env, str_id)}
)
for key in result:
items_to_remove = []
for item in result[key]:
partner_id = item[0]
if partner_id:
partner = self.env["res.partner"].search(
[("id", "=", partner_id)] + eval_domain
)
if not partner:
items_to_remove.append(item)
for item in items_to_remove:
result[key].remove(item)
items_to_remove = []
for item in result:
partner_id = item.get("partner_id", False)
if partner_id:
partner_count = self.env["res.partner"].search_count(
[("id", "=", partner_id)] + eval_domain
)
if not partner_count:
items_to_remove.append(item)
for item in items_to_remove:
result.remove(item)

Choose a reason for hiding this comment

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

Please add a note regarding this structural change.
Hint: this change originated from Here

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.