diff --git a/addons/account/tests/test_account_invoice_rounding.py b/addons/account/tests/test_account_invoice_rounding.py
index 38c7193a2f1..f0a7774d61d 100644
--- a/addons/account/tests/test_account_invoice_rounding.py
+++ b/addons/account/tests/test_account_invoice_rounding.py
@@ -3,7 +3,6 @@
from odoo.addons.account.tests.account_test_classes import AccountingTestCase
from odoo.exceptions import ValidationError
from odoo.tests import tagged
-from odoo.tools import mute_logger
import time
@@ -61,8 +60,7 @@ class TestAccountInvoiceRounding(AccountingTestCase):
# to avoid a ValidationError from _check_cash_rounding because the onchange
# are not well triggered in the tests.
try:
- with mute_logger('odoo.models'):
- invoice_id.cash_rounding_id = cash_rounding_id
+ invoice_id.cash_rounding_id = cash_rounding_id
except ValidationError:
pass
diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml
index 480b1378a29..6f87ff01c31 100644
--- a/addons/account/views/account_payment_view.xml
+++ b/addons/account/views/account_payment_view.xml
@@ -71,7 +71,7 @@
-
+
diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml
index 6e453e1eb32..5f6644a892a 100644
--- a/addons/account/views/account_view.xml
+++ b/addons/account/views/account_view.xml
@@ -1487,7 +1487,7 @@
-
+
diff --git a/addons/account_asset/views/account_asset_views.xml b/addons/account_asset/views/account_asset_views.xml
index bc364455ae2..595912687d1 100644
--- a/addons/account_asset/views/account_asset_views.xml
+++ b/addons/account_asset/views/account_asset_views.xml
@@ -262,7 +262,7 @@
-
+
diff --git a/addons/account_budget/views/account_budget_views.xml b/addons/account_budget/views/account_budget_views.xml
index 6188e5e9e7b..71b7f86a094 100644
--- a/addons/account_budget/views/account_budget_views.xml
+++ b/addons/account_budget/views/account_budget_views.xml
@@ -170,7 +170,7 @@
-
+
diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py
index 0fd69631650..509c95ad909 100644
--- a/addons/gamification/models/badge.py
+++ b/addons/gamification/models/badge.py
@@ -233,7 +233,7 @@ class GamificationBadge(models.Model):
elif self.rule_auth == 'users' and self.env.user not in self.rule_auth_user_ids:
return self.USER_NOT_VIP
elif self.rule_auth == 'having':
- all_user_badges = self.env['gamification.badge.user'].search([('user_id', '=', self.env.uid)])
+ all_user_badges = self.env['gamification.badge.user'].search([('user_id', '=', self.env.uid)]).mapped('badge_id')
if self.rule_auth_badge_ids - all_user_badges:
return self.BADGE_REQUIRED
diff --git a/addons/hr_holidays/report/hr_leave_reports.xml b/addons/hr_holidays/report/hr_leave_reports.xml
index 5afdd6e78ff..507d9bed128 100644
--- a/addons/hr_holidays/report/hr_leave_reports.xml
+++ b/addons/hr_holidays/report/hr_leave_reports.xml
@@ -77,7 +77,7 @@
-
+
diff --git a/addons/lunch/views/lunch_views.xml b/addons/lunch/views/lunch_views.xml
index aef9f006d4b..ca7b8f4f857 100644
--- a/addons/lunch/views/lunch_views.xml
+++ b/addons/lunch/views/lunch_views.xml
@@ -383,7 +383,7 @@
-
+
diff --git a/addons/mrp/views/mrp_unbuild_views.xml b/addons/mrp/views/mrp_unbuild_views.xml
index d89d6ca9e2c..b78ff31ed94 100644
--- a/addons/mrp/views/mrp_unbuild_views.xml
+++ b/addons/mrp/views/mrp_unbuild_views.xml
@@ -83,7 +83,7 @@
-
+
diff --git a/addons/payment_authorize/models/payment.py b/addons/payment_authorize/models/payment.py
index 89aa33aa249..cf55effdd12 100644
--- a/addons/payment_authorize/models/payment.py
+++ b/addons/payment_authorize/models/payment.py
@@ -6,6 +6,7 @@ from datetime import datetime
import hashlib
import hmac
import logging
+import string
import time
from odoo import _, api, fields, models
@@ -53,8 +54,16 @@ class PaymentAcquirerAuthorize(models.Model):
values['x_fp_sequence'],
values['x_fp_timestamp'],
values['x_amount'],
- values['x_currency_code']])
- return hmac.new(values['x_trans_key'].encode('utf-8'), data.encode('utf-8'), hashlib.md5).hexdigest()
+ values['x_currency_code']]).encode('utf-8')
+
+ # [BACKWARD COMPATIBILITY] Check that the merchant did update his transaction
+ # key to signature key (end of MD5 support from Authorize.net)
+ # The signature key is now '128-character hexadecimal format', while the
+ # transaction key was only 16-character.
+ if len(values['x_trans_key']) == 128:
+ return hmac.new(values['x_trans_key'].decode("hex").encode('utf-8'), data, hashlib.sha512).hexdigest().upper()
+ else:
+ return hmac.new(values['x_trans_key'].encode('utf-8'), data, hashlib.md5).hexdigest()
@api.multi
def authorize_form_generate_values(self, values):
@@ -182,7 +191,7 @@ class TxAuthorize(models.Model):
def _authorize_form_get_tx_from_data(self, data):
""" Given a data dict coming from authorize, verify it and find the related
transaction record. """
- reference, trans_id, fingerprint = data.get('x_invoice_num'), data.get('x_trans_id'), data.get('x_MD5_Hash')
+ reference, trans_id, fingerprint = data.get('x_invoice_num'), data.get('x_trans_id'), data.get('x_SHA2_Hash') or data.get('x_MD5_Hash')
if not reference or not trans_id or not fingerprint:
error_msg = _('Authorize: received data with missing reference (%s) or trans_id (%s) or fingerprint (%s)') % (reference, trans_id, fingerprint)
_logger.info(error_msg)
diff --git a/addons/payment_authorize/tests/test_authorize.py b/addons/payment_authorize/tests/test_authorize.py
index 3584cd38dc1..aed42f91716 100644
--- a/addons/payment_authorize/tests/test_authorize.py
+++ b/addons/payment_authorize/tests/test_authorize.py
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
-import hashlib
-import hmac
import time
from werkzeug import urls
from lxml import objectify
@@ -29,15 +27,6 @@ class AuthorizeCommon(PaymentAcquirerCommon):
@odoo.tests.tagged('post_install', '-at_install')
class AuthorizeForm(AuthorizeCommon):
- def _authorize_generate_hashing(self, values):
- data = '^'.join([
- values['x_login'],
- values['x_fp_sequence'],
- values['x_fp_timestamp'],
- values['x_amount'],
- ]) + '^'
- return hmac.new(values['x_trans_key'].encode('utf-8'), data.encode('utf-8'), hashlib.md5).hexdigest()
-
def test_10_Authorize_form_render(self):
self.assertEqual(self.authorize.environment, 'test', 'test without test environment')
@@ -82,7 +71,7 @@ class AuthorizeForm(AuthorizeCommon):
'x_ship_to_state': None,
}
- form_values['x_fp_hash'] = self._authorize_generate_hashing(form_values)
+ form_values['x_fp_hash'] = self.env['payment.acquirer']._authorize_generate_hashing(form_values)
# render the button
res = self.authorize.render('SO004', 56.16, self.currency_usd.id, values=self.buyer_values)
# check form result
@@ -109,7 +98,9 @@ class AuthorizeForm(AuthorizeCommon):
# typical data posted by authorize after client has successfully paid
authorize_post_data = {
'return_url': u'/shop/payment/validate',
+ # x_MD5_Hash will be empty starting the 28th March 2019
'x_MD5_Hash': u'7934485E1C105940BE854208D10FAB4F',
+ 'x_SHA2_Hash': u'7D3AC844BE8CA3F649AB885A90D22CFE35B850338EC91D1A5ADD819A85FF948A3D777334A18CDE36821DC8F2B42A6E1950C1FF96B52B60F23201483A656195FB',
'x_account_number': u'XXXX0027',
'x_address': u'Huge Street 2/543',
'x_amount': u'320.00',
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 08262f73336..045f0be7718 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -1307,7 +1307,7 @@ var ClientListScreenWidget = ScreenWidget.extend({
// what happens when we've just pushed modifications for a partner of id partner_id
saved_client_details: function(partner_id){
var self = this;
- this.reload_partners().then(function(){
+ return this.reload_partners().then(function(){
var partner = self.pos.db.get_partner_by_id(partner_id);
if (partner) {
self.new_client = partner;
diff --git a/addons/point_of_sale/views/pos_order_view.xml b/addons/point_of_sale/views/pos_order_view.xml
index 9d2e02948cb..321f6567208 100644
--- a/addons/point_of_sale/views/pos_order_view.xml
+++ b/addons/point_of_sale/views/pos_order_view.xml
@@ -134,7 +134,7 @@
-
diff --git a/addons/point_of_sale/views/pos_session_view.xml b/addons/point_of_sale/views/pos_session_view.xml
index 5a82b72b0f2..81ca11b722c 100644
--- a/addons/point_of_sale/views/pos_session_view.xml
+++ b/addons/point_of_sale/views/pos_session_view.xml
@@ -161,7 +161,7 @@
-
diff --git a/addons/purchase_requisition/views/purchase_requisition_views.xml b/addons/purchase_requisition/views/purchase_requisition_views.xml
index 52953440ab1..349ff3e63d2 100644
--- a/addons/purchase_requisition/views/purchase_requisition_views.xml
+++ b/addons/purchase_requisition/views/purchase_requisition_views.xml
@@ -30,7 +30,7 @@
-
+
@@ -253,7 +253,7 @@
-
+
diff --git a/addons/repair/views/repair_views.xml b/addons/repair/views/repair_views.xml
index 9ced7d7c9f4..af7f379fa1d 100644
--- a/addons/repair/views/repair_views.xml
+++ b/addons/repair/views/repair_views.xml
@@ -205,7 +205,7 @@
-
+
diff --git a/addons/stock/views/stock_inventory_views.xml b/addons/stock/views/stock_inventory_views.xml
index 32bd5767096..acf1780864c 100644
--- a/addons/stock/views/stock_inventory_views.xml
+++ b/addons/stock/views/stock_inventory_views.xml
@@ -93,7 +93,7 @@
-
+
diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml
index ac77ab0f020..c7d1601eeb3 100644
--- a/addons/stock/views/stock_move_views.xml
+++ b/addons/stock/views/stock_move_views.xml
@@ -83,7 +83,7 @@
-
+
@@ -446,7 +446,7 @@
-
@@ -510,7 +510,7 @@
-
diff --git a/addons/stock_picking_batch/views/stock_picking_batch_views.xml b/addons/stock_picking_batch/views/stock_picking_batch_views.xml
index 5666a0e10fd..22d2b57bde4 100644
--- a/addons/stock_picking_batch/views/stock_picking_batch_views.xml
+++ b/addons/stock_picking_batch/views/stock_picking_batch_views.xml
@@ -69,7 +69,7 @@
-
+
diff --git a/addons/survey/views/survey_views.xml b/addons/survey/views/survey_views.xml
index 72d6cc823e2..35c2ba1c038 100644
--- a/addons/survey/views/survey_views.xml
+++ b/addons/survey/views/survey_views.xml
@@ -108,7 +108,7 @@
-
+
diff --git a/addons/web/static/src/js/fields/field_registry.js b/addons/web/static/src/js/fields/field_registry.js
index 135243398fe..5b8e887d407 100644
--- a/addons/web/static/src/js/fields/field_registry.js
+++ b/addons/web/static/src/js/fields/field_registry.js
@@ -42,8 +42,9 @@ registry
.add('attachment_image', basic_fields.AttachmentImage)
.add('image_selection', basic_fields.ImageSelection)
.add('label_selection', basic_fields.LabelSelection)
+ .add('kanban_label_selection', basic_fields.LabelSelection) // deprecated, use label_selection
.add('state_selection', basic_fields.StateSelectionWidget)
- .add('kanban_state_selection', basic_fields.StateSelectionWidget)
+ .add('kanban_state_selection', basic_fields.StateSelectionWidget) // deprecated, use state_selection
.add('boolean_favorite', basic_fields.FavoriteWidget)
.add('boolean_button', basic_fields.FieldBooleanButton)
.add('boolean_toggle', basic_fields.BooleanToggle)
diff --git a/addons/website_mass_mailing/i18n/website_mass_mailing.pot b/addons/website_mass_mailing/i18n/website_mass_mailing.pot
index 55bc9b23069..46453c2c4ee 100644
--- a/addons/website_mass_mailing/i18n/website_mass_mailing.pot
+++ b/addons/website_mass_mailing/i18n/website_mass_mailing.pot
@@ -76,6 +76,11 @@ msgstr ""
msgid "Mailing Subscriptions"
msgstr ""
+#. module: website_mass_mailing
+#: model:ir.ui.view,arch_db:website_mass_mailing.unsubscribe
+msgid "Update my subscriptions"
+msgstr ""
+
#. module: website_mass_mailing
#. openerp-web
#: code:addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js:21
@@ -170,4 +175,3 @@ msgstr ""
#: model:ir.ui.view,arch_db:website_mass_mailing.s_newsletter_subscribe_popup
msgid "your email..."
msgstr ""
-
diff --git a/addons/website_mass_mailing/views/unsubscribe_templates.xml b/addons/website_mass_mailing/views/unsubscribe_templates.xml
index ae0a10a9674..ca7be31bc50 100644
--- a/addons/website_mass_mailing/views/unsubscribe_templates.xml
+++ b/addons/website_mass_mailing/views/unsubscribe_templates.xml
@@ -30,7 +30,7 @@
-
+ Update my subscriptions
diff --git a/addons/website_sale/models/website.py b/addons/website_sale/models/website.py
index 47108f1206b..9f81a40c9fe 100644
--- a/addons/website_sale/models/website.py
+++ b/addons/website_sale/models/website.py
@@ -227,7 +227,7 @@ class Website(models.Model):
country_code = request.session['geoip'].get('country_code')
if country_code:
country_id = request.env['res.country'].search([('code', '=', country_code)], limit=1).id
- fp_id = request.env['account.fiscal.position'].sudo()._get_fpos_by_region(country_id)
+ fp_id = request.env['account.fiscal.position'].sudo().with_context(force_company=request.website.company_id.id)._get_fpos_by_region(country_id)
sale_order.fiscal_position_id = fp_id
else:
# if no geolocation, use the public user fp
diff --git a/odoo/addons/base/tests/test_views.py b/odoo/addons/base/tests/test_views.py
index 7266e90d9d1..d9cb3034917 100644
--- a/odoo/addons/base/tests/test_views.py
+++ b/odoo/addons/base/tests/test_views.py
@@ -866,7 +866,7 @@ class TestViews(ViewCase):
# implemeted elsewhere...
modifiers_tests()
- @mute_logger('odoo.addons.base.models.ir_ui_view', 'odoo.models')
+ @mute_logger('odoo.addons.base.models.ir_ui_view')
def test_invalid_field(self):
with self.assertRaises(ValidationError):
self.View.create({
@@ -880,7 +880,7 @@ class TestViews(ViewCase):
""",
})
- @mute_logger('odoo.addons.base.models.ir_ui_view', 'odoo.models')
+ @mute_logger('odoo.addons.base.models.ir_ui_view')
def test_invalid_subfield(self):
with self.assertRaises(ValidationError):
self.View.create({
@@ -899,7 +899,7 @@ class TestViews(ViewCase):
""",
})
- @mute_logger('odoo.addons.base.models.ir_ui_view', 'odoo.models')
+ @mute_logger('odoo.addons.base.models.ir_ui_view')
def test_context_in_view(self):
arch = """