Before this commit, the gengo private password was displayed in plaintext in edit mode. This is due to text fields being rendered as `textarea` in edit mode, which does not support the "password" type. This commit fixes the issue by turning this field to `Char`, so that it is rendered as `input` with type "password" in edit mode. The loss of multi-line from `textarea` is not a big deal, because gengo passwords are not that long. Task-ID 1892058 closes odoo/odoo#32725 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
18 lines
1.0 KiB
Python
18 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, models, fields
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
_inherit = 'res.config.settings'
|
|
|
|
gengo_private_key = fields.Char(string="Gengo Private Key", related="company_id.gengo_private_key", readonly=False)
|
|
gengo_public_key = fields.Text(string="Gengo Public Key", related="company_id.gengo_public_key", readonly=False)
|
|
gengo_comment = fields.Text(string="Comments", related="company_id.gengo_comment",
|
|
help="This comment will be automatically be enclosed in each an every request sent to Gengo")
|
|
gengo_auto_approve = fields.Boolean(string="Auto Approve Translation ?", related="company_id.gengo_auto_approve", readonly=False,
|
|
help="Jobs are Automatically Approved by Gengo.")
|
|
gengo_sandbox = fields.Boolean(string="Sandbox Mode", related="company_id.gengo_sandbox", readonly=False,
|
|
help="Check this box if you're using the sandbox mode of Gengo, mainly used for testing purpose.")
|