You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.2 KiB

5 years ago
  1. # © 2019 Le Filament (<http://www.le-filament.com>)
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo import api, models, fields, _
  4. from ..helpers import constants
  5. class ResConfigSettings(models.TransientModel):
  6. _inherit = 'res.config.settings'
  7. payzen_site_id = fields.Char(
  8. string=_('Identifiant boutique'),
  9. help=_('The identifier provided by PayZen.'),
  10. default=constants.PAYZEN_PARAMS.get('SITE_ID'),
  11. required=True)
  12. payzen_key_test = fields.Char(
  13. string=_('Clé en mode test'),
  14. help=_('Clé fournie par PayZen pour le mode test (disponible dans le Back Office PayZen).'),
  15. default=constants.PAYZEN_PARAMS.get('KEY_TEST'),
  16. readonly=constants.PAYZEN_PLUGIN_FEATURES.get('qualif'),
  17. required=True)
  18. payzen_key_prod = fields.Char(
  19. string=_('Clé en mode production'),
  20. help=_('Clé fournie par PayZen (disponible dans le Back Office PayZen après activation du mode de production).'),
  21. default=constants.PAYZEN_PARAMS.get('KEY_PROD'),
  22. required=True)
  23. @api.multi
  24. def execute_payzen(self):
  25. self.ensure_one()
  26. return self.execute()