diff --git a/addons/l10n_ch/models/res_bank.py b/addons/l10n_ch/models/res_bank.py
index 28abbc7b058..24ac1792cfe 100644
--- a/addons/l10n_ch/models/res_bank.py
+++ b/addons/l10n_ch/models/res_bank.py
@@ -10,8 +10,12 @@ from odoo.tools.misc import mod10r
def _is_l10n_ch_postal(account_ref):
""" Returns True iff the string account_ref is a valid postal account number,
i.e. it only contains ciphers and is last cipher is the result of a recursive
- modulo 10 operation ran over the rest of it.
+ modulo 10 operation ran over the rest of it. Shorten form with - is also accepted.
"""
+ if re.match('^[0-9]{2}-[0-9]{1,6}-[0-9]$', account_ref or ''):
+ ref_subparts = account_ref.split('-')
+ account_ref = ref_subparts[0] + ref_subparts[1].rjust(6,'0') + ref_subparts[2]
+
if re.match('\d+$', account_ref or ''):
account_ref_without_check = account_ref[:-1]
return mod10r(account_ref_without_check) == account_ref
diff --git a/addons/l10n_ro/data/l10n_ro_chart_data.xml b/addons/l10n_ro/data/l10n_ro_chart_data.xml
index ceccc8bb1fa..bf4f7621bc8 100644
--- a/addons/l10n_ro/data/l10n_ro_chart_data.xml
+++ b/addons/l10n_ro/data/l10n_ro_chart_data.xml
@@ -1818,7 +1818,7 @@
- >Datorii din operaţiuni de fiducie
+ Datorii din operaţiuni de fiducie
4661
diff --git a/addons/l10n_vn/data/l10n_vn_chart_data.xml b/addons/l10n_vn/data/l10n_vn_chart_data.xml
index 359c9afc996..f6fa14fad0d 100644
--- a/addons/l10n_vn/data/l10n_vn_chart_data.xml
+++ b/addons/l10n_vn/data/l10n_vn_chart_data.xml
@@ -92,8 +92,7 @@
- Thuế GTGT được khấu trừ của hàng hóa, dịch vụ
-
+ Thuế GTGT được khấu trừ của hàng hóa, dịch vụ
1332
@@ -151,7 +150,7 @@
1388
-
+
Phải thu khác
@@ -160,7 +159,7 @@
141
-
+
Tạm ứng
@@ -333,8 +332,7 @@
- Cây lâu năm, súc vật làm việc và cho sản phẩm
-
+ Cây lâu năm, súc vật làm việc và cho sản phẩm
2118
@@ -460,7 +458,7 @@
- >Đầu tư vào công ty liên doanh
+ Đầu tư vào công ty liên doanh
@@ -470,7 +468,7 @@
- >Đầu tư góp vốn vào đơn vị khác
+ Đầu tư góp vốn vào đơn vị khác
@@ -662,14 +660,14 @@
3341
-
+
Phải trả công nhân viên
3348
-
+
Phải trả người lao động khác
@@ -688,7 +686,7 @@
- Phải trả nội bộ về vốn kinh doanh
+ Phải trả nội bộ về vốn kinh doanh
@@ -774,7 +772,7 @@
3388
-
+
Phải trả, phải nộp khác
@@ -801,7 +799,7 @@
- Trái phiếu
+ Trái phiếu
34311
diff --git a/odoo/addons/base/res/res_config.py b/odoo/addons/base/res/res_config.py
index 0e19d5265c5..ddec5f19555 100644
--- a/odoo/addons/base/res/res_config.py
+++ b/odoo/addons/base/res/res_config.py
@@ -380,8 +380,6 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
def copy(self, values):
raise UserError(_("Cannot duplicate configuration!"), "")
- # TODO: Find replacement for 'onchange' attribute in view with dynamic
- # api.onchange(...) and migrate the onchange_module(...) accordingly.
@api.model
def fields_view_get(self, view_id=None, view_type='form',
toolbar=False, submenu=False):
@@ -403,9 +401,6 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
modifiers = json.loads(node.get("modifiers"))
modifiers['readonly'] = True
node.set("modifiers", json.dumps(modifiers))
- if 'on_change' not in node.attrib:
- node.set("on_change",
- "onchange_module(%s, '%s')" % (field, field))
ret_val['arch'] = etree.tostring(doc, encoding='unicode')
return ret_val
@@ -429,6 +424,16 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
}
return {}
+ def _register_hook(self):
+ """ Add an onchange method for each module field. """
+ def make_method(name):
+ return lambda self: self.onchange_module(self[name], name)
+
+ for name in self._fields:
+ if name.startswith('module_'):
+ method = make_method(name)
+ self._onchange_methods[name].append(method)
+
@api.model
def _get_classified_fields(self):
""" return a dictionary with the fields classified by category::
diff --git a/requirements.txt b/requirements.txt
index 85d4a1902e7..4fdf4ac9768 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -33,7 +33,7 @@ PyYAML==3.12 ; python_version < '3.7'
PyYAML==3.13 ; python_version >= '3.7'
qrcode==5.3
reportlab==3.3.0
-requests==2.11.1
+requests==2.20.0
suds-jurko==0.6
vatnumber==1.2
vobject==0.9.3
diff --git a/setup/win32/winpy_requirements.txt b/setup/win32/winpy_requirements.txt
index 4a615ad1818..f998d871af2 100644
--- a/setup/win32/winpy_requirements.txt
+++ b/setup/win32/winpy_requirements.txt
@@ -28,7 +28,7 @@ pyusb==1.0.0
PyYAML==3.12
qrcode==5.3
reportlab>=3.3.0
-requests==2.11.1
+requests==2.20.0
six==1.10.0
suds-jurko==0.6
vatnumber==1.2