diff --git a/odex25_donation/p_donation_gift/.idea/.gitignore b/odex25_donation/p_donation_gift/.idea/.gitignore
deleted file mode 100644
index 26d33521a..000000000
--- a/odex25_donation/p_donation_gift/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/odex25_donation/p_donation_gift/.idea/inspectionProfiles/profiles_settings.xml b/odex25_donation/p_donation_gift/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 105ce2da2..000000000
--- a/odex25_donation/p_donation_gift/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_gift/.idea/misc.xml b/odex25_donation/p_donation_gift/.idea/misc.xml
deleted file mode 100644
index db8786c06..000000000
--- a/odex25_donation/p_donation_gift/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_gift/.idea/modules.xml b/odex25_donation/p_donation_gift/.idea/modules.xml
deleted file mode 100644
index 9b91892b1..000000000
--- a/odex25_donation/p_donation_gift/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_gift/.idea/p_donation_gift.iml b/odex25_donation/p_donation_gift/.idea/p_donation_gift.iml
deleted file mode 100644
index d0876a78d..000000000
--- a/odex25_donation/p_donation_gift/.idea/p_donation_gift.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_gift/static/src/js/gift.js b/odex25_donation/p_donation_gift/static/src/js/gift.js
index f652f5d95..ad145bb63 100644
--- a/odex25_donation/p_donation_gift/static/src/js/gift.js
+++ b/odex25_donation/p_donation_gift/static/src/js/gift.js
@@ -4,7 +4,7 @@ odoo.define('p_donation_gift.gift', function (require) {
require('web.dom_ready');
require('p_donation_theme.product-gift-card');
var publicWidget = require('web.public.widget');
- const {qweb, _t} = require('web.core');
+ const { _t } = require('web.core');
function ArabictoEnglishNumber(strNum) {
var ar = '٠١٢٣٤٥٦٧٨٩'.split('');
diff --git a/odex25_donation/p_donation_theme/.idea/.gitignore b/odex25_donation/p_donation_theme/.idea/.gitignore
deleted file mode 100644
index 26d33521a..000000000
--- a/odex25_donation/p_donation_theme/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/odex25_donation/p_donation_theme/.idea/.name b/odex25_donation/p_donation_theme/.idea/.name
deleted file mode 100644
index 58e806f80..000000000
--- a/odex25_donation/p_donation_theme/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-templates.xml
\ No newline at end of file
diff --git a/odex25_donation/p_donation_theme/.idea/inspectionProfiles/profiles_settings.xml b/odex25_donation/p_donation_theme/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 105ce2da2..000000000
--- a/odex25_donation/p_donation_theme/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_theme/.idea/misc.xml b/odex25_donation/p_donation_theme/.idea/misc.xml
deleted file mode 100644
index d1e22ecb8..000000000
--- a/odex25_donation/p_donation_theme/.idea/misc.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_theme/.idea/modules.xml b/odex25_donation/p_donation_theme/.idea/modules.xml
deleted file mode 100644
index 1e546e9f7..000000000
--- a/odex25_donation/p_donation_theme/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_theme/.idea/p_donation_theme.iml b/odex25_donation/p_donation_theme/.idea/p_donation_theme.iml
deleted file mode 100644
index d0876a78d..000000000
--- a/odex25_donation/p_donation_theme/.idea/p_donation_theme.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/odex25_donation/p_donation_theme/__manifest__.py b/odex25_donation/p_donation_theme/__manifest__.py
index f5583dbde..bf52f559f 100644
--- a/odex25_donation/p_donation_theme/__manifest__.py
+++ b/odex25_donation/p_donation_theme/__manifest__.py
@@ -11,7 +11,7 @@
'currency': 'USD',
'license': 'LGPL-3',
'category': 'Uncategorized',
- 'version': '16.0.4',
+ 'version': '14.0.1',
'depends': ['base', 'website_sale', 'theme_prime', 'droggol_theme_common', 'payment_hyperpay', 'payment_applepay'],
'data': [
@@ -20,19 +20,5 @@
'views/views.xml',
'data/sms_data.xml'
],
- 'assets': {
- 'web.assets_frontend': [
- 'p_donation_theme/static/src/scss/hyperpay_quick_donation.scss',
- 'p_donation_theme/static/src/scss/theme.scss',
- 'p_donation_theme/static/src/js/*.js',
- 'p_donation_theme/static/src/xml/donation.xml',
- ],
- 'web._assets_primary_variables': [
- "p_donation_theme/static/src/scss/primary_variables.scss",
- ],
- 'website.assets_editor': [
- 'p_donation_theme/static/src/js/components/*.js'
- ]
- },
'images': ['static/description/banner.png'],
}
diff --git a/odex25_donation/p_donation_theme/controllers/main.py b/odex25_donation/p_donation_theme/controllers/main.py
index 42d4f43bf..4b37cd21d 100644
--- a/odex25_donation/p_donation_theme/controllers/main.py
+++ b/odex25_donation/p_donation_theme/controllers/main.py
@@ -1,229 +1,154 @@
-from odoo import http, _
-from odoo.addons.website_sale.controllers.main import PaymentPortal
-from odoo.exceptions import ValidationError
-from odoo.http import request
-import requests, logging
-import phonenumbers
-from phonenumbers.phonenumberutil import NumberParseException
-
-_logger = logging.getLogger(__name__)
-
-
-
-class PaymentPortalExtraFields(PaymentPortal):
-
- def check_mobile_number_validation(self, phone):
- if phone[0] == '+' and phone[1] != '0':
- if phone[1:4] == '966':
- if len(phone[4:]) >= 8:
- return phone
- else:
- phone = phone[0] + '966' + phone[1:]
- elif phone[0] == '+' and phone[1] == '0':
- phone = phone[0] + '966' + phone[2:]
- elif phone[0] == '0' and phone[1] == '5':
- phone = '+966' + phone[1:]
- elif phone[0:2] == '00': # 00966555555555
- if phone[2:5] == '966':
- phone = '+' + '966' + phone[5:]
- elif phone[0] == '0': # 0966555555555
- if phone[1:4] == '966':
- phone = '+' + '966' + phone[4:]
- else:
- if phone[0:3] == '966':
- phone = '+' + phone
- else:
- phone = '+' + '966' + phone
- return phone
-
- @http.route()
- def shop_payment_transaction(self, *args, **kwargs):
- order = request.website.sale_get_order()
- if order:
- try:
- string_phone_number = kwargs.get('extra_mobile', '')
- string_name = kwargs.get('extra_name', '')
- if string_phone_number:
- string_phone_number = kwargs.get('extra_mobile', '')
- # string_phone_number = '+' + str(string_phone_number)
- string_phone_number = self.check_mobile_number_validation(string_phone_number)
- phone_number = phonenumbers.parse(string_phone_number)
- is_valid = phonenumbers.is_possible_number(phone_number)
- if not is_valid:
- raise ValidationError(_('Mobile Number is invalid!'))
- order.sudo().write({
- 'order_mobile_number': string_phone_number,
- })
- if string_name:
- order.sudo().write({
- 'order_name': string_name
- })
- except NumberParseException:
- raise ValidationError(_('Mobile Number is invalid!'))
- except Exception as e:
- raise ValidationError(_(e))
- return super().shop_payment_transaction(*args, **kwargs)
-
- @http.route(
- '/quickpay/hyperpay/payment', type='json', auth='public', website=True
- )
- def quick_hyperpay_payment(self, **kw):
- success = False
- order = request.website.sale_get_order(force_create=True)
- test_domain = "https://test.oppwa.com/v1/payments"
- live_domain = "https://oppwa.com/v1/payments"
- product_id = kw.pop('product_id')
- if order:
- if product_id:
- product_id = request.env['product.product'].sudo().browse(int(product_id))
- if product_id:
- order.order_line.sudo().unlink()
- order.write({
- 'order_line':
- [(0, 0, {
- 'product_id': product_id.id,
- 'product_uom_qty': 1,
- 'price_unit': float(kw.get('amount')),
- 'product_uom': product_id.uom_id.id
- })]
- })
- try:
- payment_acquire_id = request.env['payment.provider'].search([('code', '=','hyperpay'), ('company_id', 'in', (False, order.company_id.id))], limit=1)
- temp_vals = {
- 'access_token': order._portal_ensure_token(),
- 'order_id': order.id,
- 'payment_option_id': payment_acquire_id.id,
- 'flow': 'direct',
- 'tokenization_requested': False,
- 'landing_route': '/',
- 'currency_id': order.currency_id.id,
- }
- vals = self.shop_payment_transaction(**(temp_vals))
- payment_sudo = request.env['payment.transaction'].sudo()
- tx = payment_sudo.search([('reference', '=', vals.get('reference', False))], limit=1)
- if tx:
- acq = tx.provider_id
- payment_vals = {
- "entityId": acq.hyperpay_merchant_id,
- "amount": '%.2f' % tx.amount,
- "currency": tx.currency_id and tx.sudo().currency_id.name or '',
- "paymentType": "DB",
- "customParameters[SHOPPER_tx_id]": tx.id,
- "merchantTransactionId": tx.id,
- 'paymentBrand': kw.get('paymentBrand'),
- 'card.number': int(kw.get('card.number')),
- 'card.holder': kw.get('card.holder'),
- 'card.expiryMonth': '%02d' % int(kw.get('card.expiryMonth')),
- 'card.expiryYear': kw.get('card.expiryYear'),
- 'card.cvv': '%03d' % int(kw.get('card.cvv')),
- }
- try:
- headers = {
- "Authorization": "Bearer " + acq.hyperpay_authorization,
- }
- if acq.state == 'enabled':
- p_url = live_domain
- else:
- p_url = test_domain
- hyper_response = requests.post(url=p_url, data=payment_vals, headers=headers)
- hyper_response = hyper_response.json()
- tx.hyperpay_checkout_id = hyper_response.get('id')
- hyper_response.update({
- 'tx_id': hyper_response.get('customParameters', {}).get('SHOPPER_tx_id') or tx and tx.id or ''
- })
- tx._handle_notification_data('hyperpay', hyper_response)
- confirmed_orders = tx._check_amount_and_confirm_order()
- confirmed_orders._send_order_confirmation_mail()
- if tx and tx.state == 'done':
- success = True
- except Exception as e:
- _logger.info("Error in Quick Donation Payment: %s" % (e))
- except Exception as e:
- _logger.info("Error in Quick Donation Payment: %s" % (e))
- return {
- 'success': success,
- }
-
- @http.route(
- '/quickpay/hyperpay/payment/create', type='json', auth='public', website=True
- )
- def quick_hyperpay_payment_trans_create(self, **kw):
- success = False
- order = request.website.sale_get_order(force_create=True)
- product_id = kw.pop('product_id')
- acquire_id = kw.pop('acquire_id')
- mobile = kw.pop('mobile')
- if order:
- if product_id:
- product_id = request.env['product.product'].sudo().browse(int(product_id))
- if product_id:
- order.order_line.sudo().unlink()
- order.write({
- 'order_line':
- [(0, 0, {
- 'product_id': product_id.id,
- 'product_uom_qty': 1,
- 'price_unit': float(kw.get('amount')),
- 'product_uom': product_id.uom_id.id
- })],
- 'order_mobile_number': mobile
- })
- try:
- if acquire_id:
- payment_acquire_id = request.env['payment.provider'].sudo().search(
- [('code', 'in', ['hyperpay', 'applepay']), ('company_id', 'in', (False, order.company_id.id)), ('id', '=', int(acquire_id))], limit=1)
- else:
- payment_acquire_id = request.env['payment.provider'].sudo().search(
- [('code', '=', 'hyperpay'), ('company_id', 'in', (False, order.company_id.id))], limit=1)
- temp_vals = {
- 'access_token': order._portal_ensure_token(),
- 'order_id': order.id,
- 'payment_option_id': payment_acquire_id.id,
- 'flow': 'direct',
- 'tokenization_requested': False,
- 'landing_route': '/',
- 'currency_id': order.currency_id.id,
- }
- vals = self.shop_payment_transaction(**(temp_vals))
- payment_sudo = request.env['payment.transaction'].sudo()
- tx = payment_sudo.search([('reference', '=', vals.get('reference', False))], limit=1)
- for sale in tx.sale_order_ids:
- sale.done_with_quick_donation = True
- final_vals = {
- 'success': True,
- 'tx_id': tx.id
- }
- if payment_acquire_id and payment_acquire_id.code == 'applepay' and tx:
- redirect_url = '/quick/applepay/payment?tx=%s' % (tx.id)
- final_vals.update({
- 'redirect_url': redirect_url
- })
- return final_vals
- except Exception as e:
- _logger.info("Error in Quick Donation Payment: %s" % (e))
- return {
- 'success': success,
- }
-
- @http.route('/quick/applepay/payment', type='http', auth='public', website=True, csrf=False)
- def apple_pay_payment_method(self, **kwargs):
- tx = kwargs.get('tx')
- payment_sudo = request.env['payment.transaction'].sudo()
- tx = payment_sudo.search([('id', '=', int(tx))], limit=1)
- if tx:
- kw = tx._get_processing_values()
- kw = tx._get_specific_rendering_values(kw)
-
- acquirer = request.env['payment.provider'].sudo().search([('code', '=', 'applepay')], limit=1)
-
- kw['currency'] = 'SAR'
- _logger.info("Post Values From Apple Payment = %s" % (kw))
-
- if acquirer.state == 'test':
- return request.render("payment_applepay.payment_applepay_card",
- {'check_out_id': kw.get('check_out_id'), 'return_url': kw.get('applepay_return')})
- else:
- return request.render("payment_applepay.payment_applepay_card_live",
- {'check_out_id': kw.get('check_out_id'), 'return_url': kw.get('applepay_return')})
- else:
- return request.redirect('/')
+from odoo import http, _
+from odoo.addons.website_sale.controllers.main import WebsiteSale
+from odoo.addons.payment.controllers.portal import PaymentProcessing
+from odoo.exceptions import ValidationError
+from odoo.http import request
+import logging
+import phonenumbers
+from phonenumbers.phonenumberutil import NumberParseException
+
+_logger = logging.getLogger(__name__)
+
+
+class WebsiteSaleExtended(WebsiteSale):
+
+ @http.route()
+ def checkout(self, **post):
+ response = super(WebsiteSaleExtended, self).checkout(**post)
+ response.qcontext.update({'hide_quick_donation': True})
+ return response
+
+ @http.route()
+ def payment(self, **post):
+ response = super(WebsiteSaleExtended, self).payment(**post)
+ response.qcontext.update({'hide_quick_donation': True})
+ return response
+
+ @http.route()
+ def cart(self, access_token=None, revive='', **post):
+ response = super(WebsiteSaleExtended, self).cart(access_token, revive, **post)
+ response.qcontext.update({'hide_quick_donation': True})
+ return response
+
+ @http.route()
+ def product(self, product, category='', search='', **kwargs):
+ response = super(WebsiteSaleExtended, self).product(product, category, search, **kwargs)
+ response.qcontext.update({'hide_quick_donation': True, 'product_details': True})
+ return response
+
+ @http.route()
+ def shop(self, page=0, category=None, search='', min_price=0.0, max_price=0.0, ppg=False, **post):
+ response = super().shop(page=page, category=category, search=search, min_price=min_price, max_price=max_price, ppg=ppg, **post)
+ return response
+
+ def check_mobile_number_validation(self, phone):
+ if phone[0] == '+' and phone[1] != '0':
+ if phone[1:4] == '966':
+ if len(phone[4:]) >= 8:
+ return phone
+ else:
+ phone = phone[0] + '966' + phone[1:]
+ elif phone[0] == '+' and phone[1] == '0':
+ phone = phone[0] + '966' + phone[2:]
+ elif phone[0] == '0' and phone[1] == '5':
+ phone = '+966' + phone[1:]
+ elif phone[0:2] == '00': # 00966555555555
+ if phone[2:5] == '966':
+ phone = '+' + '966' + phone[5:]
+ elif phone[0] == '0': # 0966555555555
+ if phone[1:4] == '966':
+ phone = '+' + '966' + phone[4:]
+ else:
+ if phone[0:3] == '966':
+ phone = '+' + phone
+ else:
+ phone = '+' + '966' + phone
+ return phone
+
+ @http.route('/customer/data/save', type='json', auth='public', website=True)
+ def save_customer_data(self, **kwargs):
+ order = request.website.sale_get_order()
+ if order:
+ try:
+ string_phone_number = kwargs.get('extra_mobile', '')
+ string_name = kwargs.get('extra_name', '')
+ if string_phone_number:
+ string_phone_number = kwargs.get('extra_mobile', '')
+ string_phone_number = self.check_mobile_number_validation(string_phone_number)
+ phone_number = phonenumbers.parse(string_phone_number)
+ is_valid = phonenumbers.is_possible_number(phone_number)
+ if not is_valid:
+ raise ValidationError(_('Mobile Number is invalid!'))
+ order.sudo().write({
+ 'order_mobile_number': string_phone_number.replace('+', ''),
+ })
+ if string_name:
+ order.sudo().write({
+ 'order_name': string_name
+ })
+ except NumberParseException:
+ raise ValidationError(_('Mobile Number is invalid!'))
+ except Exception as e:
+ raise ValidationError(_(e))
+ return True
+
+ @http.route('/quickpay/hyperpay/payment/create', type='json', auth='public', website=True)
+ def quick_hyperpay_payment_trans_create(self, **kw):
+ success = False
+ order = request.website.sale_get_order(force_create=True)
+ product_id = kw.pop('product_id')
+ acquire_id = kw.pop('acquire_id')
+ mobile = kw.pop('mobile', '')
+ string_phone_number = self.check_mobile_number_validation(mobile)
+ phone_number = phonenumbers.parse(string_phone_number)
+ is_valid = phonenumbers.is_possible_number(phone_number)
+ if not is_valid:
+ raise ValidationError(_('Mobile Number is invalid!'))
+ if order:
+ if product_id:
+ product_id = request.env['product.product'].sudo().browse(int(product_id))
+ if product_id:
+ order.order_line.sudo().unlink()
+ order.write({
+ 'order_line':
+ [(0, 0, {
+ 'product_id': product_id.id,
+ 'product_uom_qty': 1,
+ 'price_unit': float(kw.get('amount')),
+ 'product_uom': product_id.uom_id.id
+ })],
+ 'order_mobile_number': string_phone_number.replace('+', '')
+ })
+ try:
+ if acquire_id:
+ payment_acquire_id = request.env['payment.acquirer'].sudo().search(
+ [('code', 'in', ['hyperpay', 'applepay']), ('company_id', 'in', (False, order.company_id.id)), ('id', '=', int(acquire_id))], limit=1)
+ else:
+ payment_acquire_id = request.env['payment.acquirer'].sudo().search(
+ [('code', '=', 'hyperpay'), ('company_id', 'in', (False, order.company_id.id))], limit=1)
+
+ # Create transaction
+ vals = {'acquirer_id': payment_acquire_id,
+ 'return_url': '/shop/payment/validate'}
+
+ transaction = order._create_payment_transaction(vals)
+
+ # store the new transaction into the transaction list and if there's an old one, we remove it
+ # until the day the ecommerce supports multiple orders at the same time
+ last_tx_id = request.session.get('__website_sale_last_tx_id')
+ last_tx = request.env['payment.transaction'].browse(last_tx_id).sudo().exists()
+ if last_tx:
+ PaymentProcessing.remove_payment_transaction(last_tx)
+ PaymentProcessing.add_payment_transaction(transaction)
+ request.session['__website_sale_last_tx_id'] = transaction.id
+
+ for sale in transaction.sale_order_ids:
+ sale.done_with_quick_donation = True
+ final_vals = {
+ 'success': True,
+ 'tx_id': transaction.id
+ }
+ return final_vals
+ except Exception as e:
+ _logger.info("Error in Quick Donation Payment: %s" % (e))
+ return {'success': success}
diff --git a/odex25_donation/p_donation_theme/models/product.py b/odex25_donation/p_donation_theme/models/product.py
index 409009af4..2ddde0df9 100644
--- a/odex25_donation/p_donation_theme/models/product.py
+++ b/odex25_donation/p_donation_theme/models/product.py
@@ -1,11 +1,9 @@
from odoo import models, fields, api, _
from dateutil.relativedelta import relativedelta
from datetime import datetime
-import calendar
-import time
-import logging
-logger = logging.getLogger(__name__)
+import logging
+logger = logging.getLogger(__name__)
class ProductTemplate_Inherit(models.Model):
_inherit = 'product.template'
@@ -196,10 +194,6 @@ class ProductTemplate_Inherit(models.Model):
else:
rec['donated_amount'] = 0
-
-
-
-
class ProductProduct_Inherit(models.Model):
_inherit = 'product.product'
diff --git a/odex25_donation/p_donation_theme/models/sale.py b/odex25_donation/p_donation_theme/models/sale.py
index 2b6961ab0..f84577588 100644
--- a/odex25_donation/p_donation_theme/models/sale.py
+++ b/odex25_donation/p_donation_theme/models/sale.py
@@ -21,6 +21,19 @@ class SaleOrder_Inherit(models.Model):
qty = kwargs.get('add_qty', False) or kwargs.get('set_qty', False)
if qty and order_line:
self.convert_donation_qty_to_price(order_line, qty)
+ if 'donators_ids' in kwargs:
+ order_line = self.env['sale.order.line'].browse(res.get('line_id')).sudo()
+ order_line.extra_donators_ids.sudo().unlink()
+ extra_donators_ids = []
+ for i in json_scriptsafe.loads(kwargs.get('donators_ids')):
+ extra_donators_ids.append((0, 0, {
+ 'sale_id': order_line.order_id.id,
+ 'product_id': int(i.get('product_id')),
+ 'donated_amount': float(i.get('donated_amount')),
+ 'donator_name': i.get('donator_name'),
+ 'donator_mobile_number': i.get('donator_mobile_number')
+ }))
+ order_line.extra_donators_ids = extra_donators_ids
return res
def convert_donation_qty_to_price(self, order_line, qty):
@@ -50,48 +63,6 @@ class SaleOrder_Inherit(models.Model):
)
return call_super
- def _prepare_order_line_values(
- self, product_id, quantity, linked_line_id=False,
- no_variant_attribute_values=None, product_custom_attribute_values=None,
- **kwargs
- ):
- call_super = super(SaleOrder_Inherit, self)._prepare_order_line_values(product_id, quantity, linked_line_id,
- no_variant_attribute_values,
- product_custom_attribute_values, **kwargs)
-
- order_id = call_super.get('order_id')
- if order_id and 'donators_ids' in kwargs:
- extra_donators_ids = []
- for i in json_scriptsafe.loads(kwargs.get('donators_ids')):
- extra_donators_ids.append((0, 0, {
- 'sale_id': order_id,
- 'product_id': int(i.get('product_id')),
- 'donated_amount': float(i.get('donated_amount')),
- 'donator_name': i.get('donator_name'),
- 'donator_mobile_number': i.get('donator_mobile_number')
- }))
- call_super.update({'extra_donators_ids' : extra_donators_ids})
- return call_super
-
- def _prepare_order_line_update_values(
- self, order_line, quantity, linked_line_id=False, **kwargs
- ):
- call_super = super(SaleOrder_Inherit, self)._prepare_order_line_update_values(order_line, quantity, linked_line_id, **kwargs)
-
- if order_line and 'donators_ids' in kwargs:
- order_line.extra_donators_ids.sudo().unlink()
- extra_donators_ids = []
- for i in json_scriptsafe.loads(kwargs.get('donators_ids')):
- extra_donators_ids.append((0, 0, {
- 'sale_id': order_line.order_id.id,
- 'product_id': int(i.get('product_id')),
- 'donated_amount': float(i.get('donated_amount')),
- 'donator_name': i.get('donator_name'),
- 'donator_mobile_number': i.get('donator_mobile_number')
- }))
- order_line.extra_donators_ids = extra_donators_ids
- return call_super
-
class ExtraDonators(models.Model):
_name = "sale.order.extra_donators"
diff --git a/odex25_donation/p_donation_theme/static/description/index.html b/odex25_donation/p_donation_theme/static/description/index.html
index fe8daffa6..b19184288 100644
--- a/odex25_donation/p_donation_theme/static/description/index.html
+++ b/odex25_donation/p_donation_theme/static/description/index.html
@@ -1,380 +1,380 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
- Community
- Enterprise
- Odoo.sh
-
-
-
-
-
-
-
-
-
-
Ensan.sa new donation platform
-
-

-
this module changes odoo e-commerce interface to Ensan.sa interface
-
-
-
-
-
-
-
- -
- Setup
-
- -
- Support
-
- -
- Our Services
-
- -
- Our Industries
-
-
-
-
-
-
-
-
-
-
Ensan.sa new donation platform
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
- Odoo
- Customization
-
-
-
-
-

-
-
- Odoo
- Implementation
-
-
-
-
-

-
-
- Odoo
- Support
-
-
-
-
-
-

-
-
- Hire
- Odoo
- Developer
-
-
-
-
-

-
-
- Odoo
- Integration
-
-
-
-
-

-
-
- Odoo
- Migration
-
-
-
-
-
-

-
-
- Odoo
- Consultancy
-
-
-
-
-

-
-
- Odoo
- Implementation
-
-
-
-
-

-
-
- Odoo
- Licensing Consultancy
-
-
-
-
-
-
-
-
-
-
-

-
- Trading
-
-
- Easily procure
- and
- sell your products
-
-
-
-
-
-

-
- POS
-
-
- Easy
- configuration
- and convivial experience
-
-
-
-
-
-

-
- Education
-
-
- A platform for
- educational management
-
-
-
-
-
-

-
- Manufacturing
-
-
- Plan, track and
- schedule your operations
-
-
-
-
-
-

-
- E-commerce & Website
-
-
- Mobile
- friendly,
- awe-inspiring product pages
-
-
-
-
-
-

-
- Service Management
-
-
- Keep track of
- services and invoice
-
-
-
-
-
-

-
- Restaurant
-
-
- Run your bar or
- restaurant methodically
-
-
-
-
-
-

-
- Hotel Management
-
-
- An
- all-inclusive
- hotel management application
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+ Community
+ Enterprise
+ Odoo.sh
+
+
+
+
+
+
+
+
+
+
Ensan.sa new donation platform
+
+

+
this module changes odoo e-commerce interface to Ensan.sa interface
+
+
+
+
+
+
+
+ -
+ Setup
+
+ -
+ Support
+
+ -
+ Our Services
+
+ -
+ Our Industries
+
+
+
+
+
+
+
+
+
+
Ensan.sa new donation platform
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+ Odoo
+ Customization
+
+
+
+
+

+
+
+ Odoo
+ Implementation
+
+
+
+
+

+
+
+ Odoo
+ Support
+
+
+
+
+
+

+
+
+ Hire
+ Odoo
+ Developer
+
+
+
+
+

+
+
+ Odoo
+ Integration
+
+
+
+
+

+
+
+ Odoo
+ Migration
+
+
+
+
+
+

+
+
+ Odoo
+ Consultancy
+
+
+
+
+

+
+
+ Odoo
+ Implementation
+
+
+
+
+

+
+
+ Odoo
+ Licensing Consultancy
+
+
+
+
+
+
+
+
+
+
+

+
+ Trading
+
+
+ Easily procure
+ and
+ sell your products
+
+
+
+
+
+

+
+ POS
+
+
+ Easy
+ configuration
+ and convivial experience
+
+
+
+
+
+

+
+ Education
+
+
+ A platform for
+ educational management
+
+
+
+
+
+

+
+ Manufacturing
+
+
+ Plan, track and
+ schedule your operations
+
+
+
+
+
+

+
+ E-commerce & Website
+
+
+ Mobile
+ friendly,
+ awe-inspiring product pages
+
+
+
+
+
+

+
+ Service Management
+
+
+ Keep track of
+ services and invoice
+
+
+
+
+
+

+
+ Restaurant
+
+
+ Run your bar or
+ restaurant methodically
+
+
+
+
+
+

+
+ Hotel Management
+
+
+ An
+ all-inclusive
+ hotel management application
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/odex25_donation/p_donation_theme/static/src/img/facebook.svg b/odex25_donation/p_donation_theme/static/src/img/facebook.svg
index cbb13c4b1..a6e48b6c7 100644
--- a/odex25_donation/p_donation_theme/static/src/img/facebook.svg
+++ b/odex25_donation/p_donation_theme/static/src/img/facebook.svg
@@ -1,3 +1,3 @@
-