diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot
index 26eb3b066e2..d16e22a5f51 100644
--- a/addons/account/i18n/account.pot
+++ b/addons/account/i18n/account.pot
@@ -10927,3 +10927,8 @@ msgstr ""
msgid "→ Count"
msgstr ""
+#. module: account
+#: code:addons/account/models/account.py:309
+#, python-format
+msgid "Currency field should only be set if the journal's currency is different from the company's. Leave the field blank to use company currency."
+msgstr ""
diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 800e52e7539..95c55b6c0f3 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -447,6 +447,8 @@ class AccountJournal(models.Model):
@api.constrains('currency_id', 'default_credit_account_id', 'default_debit_account_id')
def _check_currency(self):
if self.currency_id:
+ if self.currency_id == self.company_id.currency_id:
+ raise ValidationError(_("Currency field should only be set if the journal's currency is different from the company's. Leave the field blank to use company currency."))
if self.default_credit_account_id and not self.default_credit_account_id.currency_id.id == self.currency_id.id:
raise ValidationError(_('Configuration error!\nThe currency of the journal should be the same than the default credit account.'))
if self.default_debit_account_id and not self.default_debit_account_id.currency_id.id == self.currency_id.id:
diff --git a/addons/account/test/account_minimal_test.xml b/addons/account/test/account_minimal_test.xml
index e127af9b289..5e1753efbfc 100644
--- a/addons/account/test/account_minimal_test.xml
+++ b/addons/account/test/account_minimal_test.xml
@@ -284,7 +284,6 @@
bank
-
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 75030e95acc..63aff0fc7ef 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -1278,6 +1278,9 @@ var ClientListScreenWidget = ScreenWidget.extend({
} else {
fields.property_product_pricelist = false;
}
+ var contents = this.$(".client-details-contents");
+ contents.off("click", ".button.save");
+
rpc.query({
model: 'res.partner',
@@ -1297,6 +1300,7 @@ var ClientListScreenWidget = ScreenWidget.extend({
'title': _t('Error: Could not Save Changes'),
'body': error_body,
});
+ contents.on('click','.button.save',function(){ self.save_client_details(partner); });
});
},
@@ -1314,6 +1318,8 @@ var ClientListScreenWidget = ScreenWidget.extend({
// has created, and reload_partner() must have loaded the newly created partner.
self.display_client_details('hide');
}
+ }).always(function(){
+ $(".client-details-contents").on('click','.button.save',function(){ self.save_client_details(partner); });
});
},
diff --git a/addons/web_editor/static/src/js/editor/rte.js b/addons/web_editor/static/src/js/editor/rte.js
index 341b42f93c6..90062a02b02 100644
--- a/addons/web_editor/static/src/js/editor/rte.js
+++ b/addons/web_editor/static/src/js/editor/rte.js
@@ -591,6 +591,14 @@ var RTEWidget = Widget.extend({
return;
}
+ // Removes strange _moz_abspos attribute when it appears. Cannot
+ // find another solution which works in all cases. A grabber still
+ // appears at the same time which I did not manage to remove.
+ // TODO find a complete and better solution
+ _.defer(function () {
+ $editable.find('[_moz_abspos]').removeAttr('_moz_abspos');
+ });
+
if ($target.is('a')) {
/**
* Remove content editable everywhere and add it on the link only so that characters can be added
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py
index d0eab8fa087..452d5507c3e 100644
--- a/addons/website_sale/controllers/main.py
+++ b/addons/website_sale/controllers/main.py
@@ -398,7 +398,11 @@ class WebsiteSale(http.Controller):
@http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True, csrf=False)
def cart_update(self, product_id, add_qty=1, set_qty=0, **kw):
- request.website.sale_get_order(force_create=1)._cart_update(
+ sale_order = request.website.sale_get_order(force_create=1)
+ if sale_order.state != 'draft':
+ request.session['sale_order_id'] = None
+ sale_order = request.website.sale_get_order(force_create=True)
+ sale_order._cart_update(
product_id=int(product_id),
add_qty=add_qty,
set_qty=set_qty,
diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst
index e6c74883d41..57a2cbed847 100644
--- a/doc/reference/orm.rst
+++ b/doc/reference/orm.rst
@@ -947,17 +947,17 @@ them (e.g. to change their default sort order):
.. literalinclude:: ../../odoo/addons/test_documentation_examples/extension.py
:language: python
- :lines: 5-
+ :lines: 7-
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
:language: python
- :lines: 8,13
+ :lines: 10,15
will yield:
.. literalinclude:: ../../odoo/addons/test_documentation_examples/tests/test_extension.py
:language: text
- :lines: 11
+ :lines: 13
.. note:: it will also yield the various :ref:`automatic fields
` unless they've been disabled