0dc84e32b1
This is the forward port of https://github.com/OCA/account-financial-tools/pull/1716 MT-1044 @moduon
22 lines
747 B
Python
22 lines
747 B
Python
# Copyright 2022-2023 Moduon Team S.L. <info@moduon.team>
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import _, models
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
_inherit = "res.config.settings"
|
|
|
|
def execute_update_check_vies(self):
|
|
# Only parent partners, children are synced from parent
|
|
count_partners = self.env["res.partner"].search_count([])
|
|
self.env["res.partner"].search([]).check_vat()
|
|
return {
|
|
"effect": {
|
|
"fadeout": "slow",
|
|
"message": _("Vies passed calculated in %s partners") % count_partners,
|
|
"img_url": "/web/static/img/smile.svg",
|
|
"type": "rainbow_man",
|
|
}
|
|
}
|