account_move.py 468 B

1234567891011121314151617
  1. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  2. from odoo import models
  3. from odoo.tools import str2bool
  4. class AccountMove(models.Model):
  5. _inherit = 'account.move'
  6. def _has_to_be_paid(self):
  7. enabled_feature = str2bool(
  8. self.env['ir.config_parameter'].sudo().get_param(
  9. 'account_payment.enable_portal_payment'
  10. )
  11. )
  12. return enabled_feature and super()._has_to_be_paid()