mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX][H4547] website_sale_signifyd: make module installable
This commit is contained in:
@@ -125,16 +125,17 @@ class SaleOrder(models.Model):
|
||||
'confirmationEmail': self.partner_id.email,
|
||||
'confirmationPhone': self.partner_id.phone,
|
||||
'products': [
|
||||
'itemName': line.product_id.name,
|
||||
'itemPrice': line.price_unit,
|
||||
'itemQuantity': line.product_uom_qty,
|
||||
'itemIsDigital': line.product_id.is_digital,
|
||||
'itemCategory': line.product_id.categ_id.name,
|
||||
# 'itemSubCategory'?
|
||||
'itemId': line.product_id.id,
|
||||
'itemUrl': line.product_id.website_url,
|
||||
'itemWeight': line.product_id.weight,
|
||||
for line in self.order_line if line.product_id
|
||||
{
|
||||
'itemName': line.product_id.name,
|
||||
'itemPrice': line.price_unit,
|
||||
'itemQuantity': line.product_uom_qty,
|
||||
'itemIsDigital': line.product_id.is_digital,
|
||||
'itemCategory': line.product_id.categ_id.name,
|
||||
# 'itemSubCategory'?
|
||||
'itemId': line.product_id.id,
|
||||
'itemUrl': line.product_id.website_url,
|
||||
'itemWeight': line.product_id.weight,
|
||||
} for line in self.order_line if line.product_id
|
||||
],
|
||||
'shipments': [
|
||||
{
|
||||
@@ -146,24 +147,24 @@ class SaleOrder(models.Model):
|
||||
},
|
||||
'transactions': [
|
||||
{
|
||||
"parentTransactionId": None,
|
||||
"transactionId": tx.id,
|
||||
"gateway": tx.acquirer_id.name,
|
||||
"paymentMethod": "CREDIT_CARD",
|
||||
"gatewayStatusCode": tx_status_type.get(tx.state, 'PENDING'),
|
||||
"currency": tx.currency_id.name,
|
||||
"amount": tx.amount,
|
||||
'parentTransactionId': None,
|
||||
'transactionId': tx.id,
|
||||
'gateway': tx.acquirer_id.name,
|
||||
'paymentMethod': 'CREDIT_CARD',
|
||||
'gatewayStatusCode': tx_status_type.get(tx.state, 'PENDING'),
|
||||
'currency': tx.currency_id.name,
|
||||
'amount': tx.amount,
|
||||
# "avsResponseCode": "Y",
|
||||
# "cvvResponseCode": "N",
|
||||
"checkoutPaymentDetails": {
|
||||
"accountHolderName": tx.partner_id.name,
|
||||
"billingAddress": {
|
||||
"streetAddress": tx.partner_id.street,
|
||||
"unit": tx.partner_id.street2,
|
||||
"city": tx.partner_id.city,
|
||||
"provinceCode": tx.partner_id.state_id.code,
|
||||
"postalCode": tx.partner_id.zip,
|
||||
"countryCode": tx.partner_id.country_id.code,
|
||||
'checkoutPaymentDetails': {
|
||||
'accountHolderName': tx.partner_id.name,
|
||||
'billingAddress': {
|
||||
'streetAddress': tx.partner_id.street,
|
||||
'unit': tx.partner_id.street2,
|
||||
'city': tx.partner_id.city,
|
||||
'provinceCode': tx.partner_id.state_id.code,
|
||||
'postalCode': tx.partner_id.zip,
|
||||
'countryCode': tx.partner_id.country_id.code,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class SignifydCoverage(models.Model):
|
||||
name = fields.Char(required=True)
|
||||
description = fields.Char()
|
||||
code = fields.Char(required=True)
|
||||
exclusive = fields.Boolean())
|
||||
exclusive = fields.Boolean()
|
||||
|
||||
def _apply_exclusivity(self):
|
||||
return self.filtered('exclusive')[:1] or self
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='website_id']" position="after">
|
||||
<field name="signifyd_case_required"/>
|
||||
<field name="signifyd_coverage_type_ids"/>
|
||||
<field name="signifyd_coverage_ids"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<field name="secret_key" attrs="{'invisible': [('test_mode', '=', True)]}"/>
|
||||
<field name="secret_key_test" attrs="{'invisible': [('test_mode', '!=', True)]}"/>
|
||||
<!-- <field name="signifyd_case_type" /> -->
|
||||
<field name="signifyd_coverage_type_ids"/>
|
||||
<field name="signifyd_coverage_ids"/>
|
||||
<p class="text-muted">
|
||||
Optional: Add users to be notified if a sale order is declined by Signifyd.
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user