8000 [IMP] handle context for unlink method by adejongscalizer · Pull Request #7 · ScalizerOrg/s6r-odoo-addons-server-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[IMP] handle context for unlink method #7

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

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Conversation

adejongscalizer
Copy link
Contributor

No description provided.

@@ -23,11 +23,18 @@ def write(self, vals):
self._apply_tags(tag_ids)
return res

def unlink(self):
tag_ids = self.env['model.tag'].search([('model', '=', self._name)])
Copy link
Contributor

Choose a reason for hiding this comment

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

A la place de la condition "if tag_id.compute_on_unlink:" tu rajoute compute_on_link = True dans le domain du search

Et pour self._apply_tags(tag_id) est ce que cela ne va pas générer un bug si on supprime plusieurs lignes en même temps ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok merci, j'ai fait un commit pour mettre à jour le domaine.

Concernant self._apply_tags(tag_id), la méthode _apply_tags() fait déjà une boucle sur les records. 👍

@kbentaleb kbentaleb merged commit 36b5b87 into 16.0 Jan 28, 2025
1 check passed
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.

2 participants
0