mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] website_sale_signifyd: to Odoo 15.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'Signifyd Connector',
|
'name': 'Signifyd Connector',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'version': '14.0.1.0.0',
|
'version': '15.0.1.0.0',
|
||||||
'category': 'Sale',
|
'category': 'Sale',
|
||||||
'description': """
|
'description': """
|
||||||
Automate Order Fraud Detection with the Signifyd API.
|
Automate Order Fraud Detection with the Signifyd API.
|
||||||
|
|||||||
@@ -14,12 +14,11 @@ class SignifydConnector(models.Model):
|
|||||||
|
|
||||||
name = fields.Char(string='Connector Name', required=True)
|
name = fields.Char(string='Connector Name', required=True)
|
||||||
test_mode = fields.Boolean(string='Test Mode')
|
test_mode = fields.Boolean(string='Test Mode')
|
||||||
user_key = fields.Char(string='Team/Username', required=True)
|
|
||||||
secret_key = fields.Char(string='API Key', required=True)
|
secret_key = fields.Char(string='API Key', required=True)
|
||||||
user_key_test = fields.Char(string='TEST Team/Username')
|
|
||||||
secret_key_test = fields.Char(string='TEST API Key')
|
secret_key_test = fields.Char(string='TEST API Key')
|
||||||
webhooks_registered = fields.Boolean(string='Successfully Registered Webhooks')
|
webhooks_registered = fields.Boolean(string='Successfully Registered Webhooks')
|
||||||
notify_user_ids = fields.Many2many('res.users', string='Receive decline notifications')
|
notify_user_ids = fields.Many2many('res.users', string='Receive decline notifications')
|
||||||
|
website_ids = fields.One2many('website', 'signifyd_connector_id', string='Used on Websites')
|
||||||
|
|
||||||
# TODO ideally this would be a regular constant
|
# TODO ideally this would be a regular constant
|
||||||
# however other entities currently use this by reference
|
# however other entities currently use this by reference
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ from odoo import api, fields, models
|
|||||||
class Website(models.Model):
|
class Website(models.Model):
|
||||||
_inherit = 'website'
|
_inherit = 'website'
|
||||||
|
|
||||||
signifyd_connector_id = fields.Many2one('signifyd.connector')
|
signifyd_connector_id = fields.Many2one('signifyd.connector', ondelete='set null')
|
||||||
|
|||||||
@@ -80,14 +80,14 @@
|
|||||||
<field name="webhooks_registered" invisible="1"/>
|
<field name="webhooks_registered" invisible="1"/>
|
||||||
<div class="text-success float-right"
|
<div class="text-success float-right"
|
||||||
attrs="{'invisible': [('webhooks_registered', '=', False)]}">
|
attrs="{'invisible': [('webhooks_registered', '=', False)]}">
|
||||||
<i class="fa fa-check-square"></i>
|
<i class="fa fa-check-square" title="Webhooks Active"/>
|
||||||
<strong>
|
<strong>
|
||||||
Webhooks Active
|
Webhooks Active
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-danger float-right"
|
<div class="text-danger float-right"
|
||||||
attrs="{'invisible': [('webhooks_registered', '=', True)]}">
|
attrs="{'invisible': [('webhooks_registered', '=', True)]}">
|
||||||
<i class="fa fa-square"></i>
|
<i class="fa fa-square" title="Webhooks Inactive"/>
|
||||||
<strong>
|
<strong>
|
||||||
Webhooks Inactive
|
Webhooks Inactive
|
||||||
</strong>
|
</strong>
|
||||||
@@ -103,16 +103,14 @@
|
|||||||
|
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="user_key" attrs="{'invisible': [('test_mode', '=', True)]}"/>
|
|
||||||
<field name="secret_key" attrs="{'invisible': [('test_mode', '=', True)]}"/>
|
<field name="secret_key" attrs="{'invisible': [('test_mode', '=', True)]}"/>
|
||||||
<field name="user_key_test" attrs="{'invisible': [('test_mode', '!=', True)]}"/>
|
|
||||||
<field name="secret_key_test" attrs="{'invisible': [('test_mode', '!=', True)]}"/>
|
<field name="secret_key_test" attrs="{'invisible': [('test_mode', '!=', True)]}"/>
|
||||||
<p class="text-muted">
|
<p class="text-muted">
|
||||||
Optional: Add users to be notified if a sale order is declined by Signifyd.
|
Optional: Add users to be notified if a sale order is declined by Signifyd.
|
||||||
</p>
|
</p>
|
||||||
<field name="notify_user_ids" widget="many2many_tags"/>
|
<field name="notify_user_ids" widget="many2many_tags"/>
|
||||||
|
<field name="website_ids" widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<template id="sig_web_assets_frontend" inherit_id="website.assets_frontend">
|
<template id="checkout" inherit_id="payment.checkout">
|
||||||
<xpath expr="//script[last()]" position="after">
|
<xpath expr="." position="inside">
|
||||||
<script defer="1" type="text/javascript" id="sig-api" t-att-data-order-session-id="request.session.session_token"
|
<script defer="1" type="text/javascript" id="sig-api" t-att-data-order-session-id="request.session.session_token"
|
||||||
src="https://cdn-scripts.signifyd.com/api/script-tag.js"></script>
|
src="https://cdn-scripts.signifyd.com/api/script-tag.js"></script>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -7,12 +7,6 @@
|
|||||||
<field name="inherit_id" ref="website.view_website_form"/>
|
<field name="inherit_id" ref="website.view_website_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//group[@name='other']" position="inside">
|
<xpath expr="//group[@name='other']" position="inside">
|
||||||
<div class="oe_title">
|
|
||||||
<h3>
|
|
||||||
Signifyd Configuration
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<label for="signifyd_connector_id" string="Settings"/>
|
|
||||||
<field name="signifyd_connector_id"/>
|
<field name="signifyd_connector_id"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user