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',
|
||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||
'version': '14.0.1.0.0',
|
||||
'version': '15.0.1.0.0',
|
||||
'category': 'Sale',
|
||||
'description': """
|
||||
Automate Order Fraud Detection with the Signifyd API.
|
||||
|
||||
@@ -14,12 +14,11 @@ class SignifydConnector(models.Model):
|
||||
|
||||
name = fields.Char(string='Connector Name', required=True)
|
||||
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)
|
||||
user_key_test = fields.Char(string='TEST Team/Username')
|
||||
secret_key_test = fields.Char(string='TEST API Key')
|
||||
webhooks_registered = fields.Boolean(string='Successfully Registered Webhooks')
|
||||
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
|
||||
# however other entities currently use this by reference
|
||||
|
||||
@@ -6,4 +6,4 @@ from odoo import api, fields, models
|
||||
class Website(models.Model):
|
||||
_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"/>
|
||||
<div class="text-success float-right"
|
||||
attrs="{'invisible': [('webhooks_registered', '=', False)]}">
|
||||
<i class="fa fa-check-square"></i>
|
||||
<i class="fa fa-check-square" title="Webhooks Active"/>
|
||||
<strong>
|
||||
Webhooks Active
|
||||
</strong>
|
||||
</div>
|
||||
<div class="text-danger float-right"
|
||||
attrs="{'invisible': [('webhooks_registered', '=', True)]}">
|
||||
<i class="fa fa-square"></i>
|
||||
<i class="fa fa-square" title="Webhooks Inactive"/>
|
||||
<strong>
|
||||
Webhooks Inactive
|
||||
</strong>
|
||||
@@ -103,16 +103,14 @@
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_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)]}"/>
|
||||
<p class="text-muted">
|
||||
Optional: Add users to be notified if a sale order is declined by Signifyd.
|
||||
</p>
|
||||
<field name="notify_user_ids" widget="many2many_tags"/>
|
||||
<field name="website_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
|
||||
<template id="sig_web_assets_frontend" inherit_id="website.assets_frontend">
|
||||
<xpath expr="//script[last()]" position="after">
|
||||
<template id="checkout" inherit_id="payment.checkout">
|
||||
<xpath expr="." position="inside">
|
||||
<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>
|
||||
</xpath>
|
||||
|
||||
@@ -7,12 +7,6 @@
|
||||
<field name="inherit_id" ref="website.view_website_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<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"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user