forked from OCA/cooperative
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/optional recaptcha (OCA#109)
* Recaptcha option * Captcha showing only if option active * Using website.recaptcha_key_site as active flag * Restored breaklines * Captcha flag set to company * Added vim and Pycharm files to .gitignore * PEP8 in company.py * Missing space * Recaptcha option * Captcha showing only if option active * Using website.recaptcha_key_site as active flag * Restored breaklines * Added vim and Pycharm files to .gitignore * Captcha flag set to company * PEP8 in company.py * Missing space * TODO for overloaded func added * Recaptcha option * Captcha showing only if option active * Using website.recaptcha_key_site as active flag * Restored breaklines * Added vim and Pycharm files to .gitignore * Captcha flag set to company * PEP8 in company.py * Missing space * TODO for overloaded func added * Recaptcha option * Captcha showing only if option active * Restored breaklines * Captcha flag set to company * Removed blank line
- Loading branch information
Showing
7 changed files
with
54 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import controllers | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import company |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResCompany(models.Model): | ||
_inherit = 'res.company' | ||
captcha_type = fields.Selection([ | ||
('none', 'Disabled'), | ||
('google', 'Google Recaptcha'), | ||
], 'Captcha type or disabled', required=True, default='google') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<record model="ir.ui.view" id="view_company_inherit_captcha"> | ||
<field name="name">res.company.form.captcha.easymy.coop</field> | ||
<field name="inherit_id" ref="easy_my_coop.view_company_inherit_form2"/> | ||
<field name="model">res.company</field> | ||
<field name="arch" type="xml"> | ||
<field name="internal_rules_approval_text" position="after"> | ||
<field name="captcha_type"/> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters