Last active
June 11, 2022 06:59
-
-
Save 3mrdev/fd9191e3ab88e3bc4aa18783a9a0ee4c to your computer and use it in GitHub Desktop.
Add a new button in top of the list view in Odoo when clicked it will call a method in your model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from odoo import models, fields, api | |
class YourModel(models.Model): | |
_name = "your_model" | |
partner_id = fields.Many2one("res.partner") | |
def your_method(self, model_name, active_id, domain, searchQ): | |
recs = self.env["your_model"].search(domain) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment