Odoo18-Base/addons/l10n_pe/models/res_company.py
2025-01-06 10:57:38 +07:00

13 lines
375 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class ResCompany(models.Model):
_inherit = 'res.company'
def _localization_use_documents(self):
# OVERRIDE
self.ensure_one()
return self.account_fiscal_country_id.code == "PE" or super()._localization_use_documents()