Coverage for ingadhoc-account-payment / account_payment_pro / models / res_company.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-09 19:54 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-09 19:54 +0000
1from odoo import api, fields, models
4class ResCompany(models.Model):
5 _inherit = "res.company"
7 use_payment_pro = fields.Boolean(compute="_compute_use_payment_pro", store=True, readonly=False)
9 @api.depends("partner_id.country_id")
10 def _compute_use_payment_pro(self):
11 ar_companies = self.filtered(lambda x: x.partner_id.country_id.code == "AR")
12 ar_companies.use_payment_pro = True
13 (self - ar_companies).use_payment_pro = False