diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index 106579c7195..faca4362532 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -1305,9 +1305,10 @@ class AccountInvoiceTax(models.Model):
base = 0.0
for line in tax.invoice_id.invoice_line_ids:
if tax.tax_id in line.invoice_line_tax_ids:
- base += line.price_subtotal
- # To add include base amount taxes
- base += sum((line.invoice_line_tax_ids.filtered(lambda t: t.include_base_amount) - tax.tax_id).mapped('amount'))
+ price_unit = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
+ base += (line.invoice_line_tax_ids - tax.tax_id).compute_all(
+ price_unit, line.invoice_id.currency_id, line.quantity, line.product_id, line.invoice_id.partner_id
+ )['base']
tax.base = base
invoice_id = fields.Many2one('account.invoice', string='Invoice', ondelete='cascade', index=True)
diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml
index 50a11debc44..c08b71152f7 100644
--- a/addons/hr_recruitment/views/hr_recruitment_views.xml
+++ b/addons/hr_recruitment/views/hr_recruitment_views.xml
@@ -300,6 +300,7 @@
+
Mobile:
oe_kanban_text_red
diff --git a/addons/payment_paypal/controllers/main.py b/addons/payment_paypal/controllers/main.py
index 0048c3ffb26..f840a33d6eb 100644
--- a/addons/payment_paypal/controllers/main.py
+++ b/addons/payment_paypal/controllers/main.py
@@ -65,7 +65,7 @@ class PaypalController(http.Controller):
self.paypal_validate_data(**post)
return ''
- @http.route('/payment/paypal/dpn', type='http', auth="none", methods=['POST'], csrf=False)
+ @http.route('/payment/paypal/dpn', type='http', auth="none", methods=['POST', 'GET'], csrf=False)
def paypal_dpn(self, **post):
""" Paypal DPN """
_logger.info('Beginning Paypal DPN form_feedback with post data %s', pprint.pformat(post)) # debug
diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py
index 5f6a06308f3..b98865f9995 100644
--- a/addons/point_of_sale/models/pos_config.py
+++ b/addons/point_of_sale/models/pos_config.py
@@ -71,7 +71,7 @@ class PosConfig(models.Model):
iface_invoicing = fields.Boolean(string='Invoicing', help='Enables invoice generation from the Point of Sale', default=True)
iface_big_scrollbars = fields.Boolean('Large Scrollbars', help='For imprecise industrial touchscreens')
iface_print_auto = fields.Boolean(string='Automatic Receipt Printing', default=False,
- help='The receipt will automatically be p-rinted at the end of each order')
+ help='The receipt will automatically be printed at the end of each order')
iface_print_skip_screen = fields.Boolean(string='Skip Receipt Screen', default=True,
help='The receipt screen will be skipped if the receipt can be printed automatically.')
iface_precompute_cash = fields.Boolean(string='Prefill Cash Payment',
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index f8e2c07cde1..d663b69bb32 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -391,7 +391,7 @@ class PurchaseOrder(models.Model):
res = order._prepare_picking()
picking = self.env['stock.picking'].create(res)
moves = order.order_line.filtered(lambda r: r.product_id.type in ['product', 'consu'])._create_stock_moves(picking)
- moves.action_confirm()
+ moves = moves.action_confirm()
order.order_line.mapped('move_ids').force_assign()
picking.message_post_with_view('mail.message_origin_link',
values={'self': picking, 'origin': order},
diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py
index 5c86fd93d77..f241ddd5a05 100644
--- a/addons/stock/models/stock_quant.py
+++ b/addons/stock/models/stock_quant.py
@@ -82,7 +82,7 @@ class Quant(models.Model):
if quant.company_id != self.env.user.company_id:
# if the company of the quant is different than the current user company, force the company in the context
# then re-do a browse to read the property fields for the good company.
- quant = quant.with_context(force_company=quant.company__id.id)
+ quant = quant.with_context(force_company=quant.company_id.id)
quant.inventory_value = quant.product_id.standard_price * quant.qty
@api.model_cr
diff --git a/addons/web/static/src/js/control_panel.js b/addons/web/static/src/js/control_panel.js
index 4c8faec9ad7..56f02d90eaf 100644
--- a/addons/web/static/src/js/control_panel.js
+++ b/addons/web/static/src/js/control_panel.js
@@ -67,7 +67,7 @@ var ControlPanel = Widget.extend({
};
// Prevent the search dropdowns to close when clicking inside them
- this.$el.on('click.bs.dropdown', '.oe-search-options .dropdown-menu', function (e) {
+ this.$el.on('click.bs.dropdown', '.o_search_options .dropdown-menu', function (e) {
e.stopPropagation();
});
diff --git a/addons/web/static/src/js/web_client.js b/addons/web/static/src/js/web_client.js
index 5fc1f3f2796..8157270638e 100644
--- a/addons/web/static/src/js/web_client.js
+++ b/addons/web/static/src/js/web_client.js
@@ -58,10 +58,10 @@ return AbstractWebClient.extend({
toggle_bars: function(value) {
this.$('tr:has(td.navbar),.oe_leftbar').toggle(value);
},
- update_logo: function() {
+ update_logo: function(reload) {
var company = session.company_id;
var img = session.url('/web/binary/company_logo' + '?db=' + session.db + (company ? '&company=' + company : ''));
- this.$('.oe_logo img').attr('src', '').attr('src', img);
+ this.$('.o_sub_menu_logo img').attr('src', '').attr('src', img + (reload ? "#" + Date.now() : ''));
this.$('.oe_logo_edit').toggleClass('oe_logo_edit_admin', session.is_superuser);
},
logo_edit: function(ev) {
@@ -76,12 +76,13 @@ return AbstractWebClient.extend({
action_buttons: true,
headless: true,
};
- self.action_manager.do_action(result);
- var form = self.action_manager.dialog_widget.views.form.controller;
- form.on("on_button_cancel", self.action_manager, self.action_manager.dialog_stop);
- form.on('record_saved', self, function() {
- self.action_manager.dialog_stop();
- self.update_logo();
+ self.action_manager.do_action(result).then(function () {
+ var form = self.action_manager.dialog_widget.views.form.controller;
+ form.on("on_button_cancel", self.action_manager, self.action_manager.dialog_stop);
+ form.on('record_saved', self, function() {
+ self.action_manager.dialog_stop();
+ self.update_logo();
+ });
});
});
});
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index 020c93cdc17..66789ef635e 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -596,7 +596,7 @@ data.Class = Widget.extend({
animation.start(true, $target);
self.call_for_all_snippets($target, function (editor, $snippet) {
- editor.drop_and_build_snippet();
+ _.defer(function () { editor.drop_and_build_snippet(); });
});
self.create_snippet_editor($target);
self.cover_target($target.data('overlay'), $target);
@@ -616,12 +616,10 @@ data.Class = Widget.extend({
var self = this;
$snippet.add(data.globalSelector.all($snippet)).each(function () {
var $snippet = $(this);
- setTimeout(function () {
- self.create_snippet_editor($snippet);
- if ($snippet.data("snippet-editor")) {
- callback.call(self, $snippet.data("snippet-editor"), $snippet);
- }
- });
+ self.create_snippet_editor($snippet);
+ if ($snippet.data("snippet-editor")) {
+ callback.call(self, $snippet.data("snippet-editor"), $snippet);
+ }
});
},
@@ -918,17 +916,25 @@ data.Editor = Class.extend({
},
_drag_and_drop_stop: function () {
var self = this;
- var $dropzone = this.$target.prev();
- var prev = $dropzone.length && $dropzone[0].previousSibling;
+
+ $(".oe_drop_zone").droppable('destroy').remove();
+
+ var prev = this.$target.first()[0].previousSibling;
var next = this.$target.last()[0].nextSibling;
var $parent = this.$target.parent();
- $(".oe_drop_clone").after(this.$target);
+ var $clone = $(".oe_drop_clone");
+ if (prev === $clone[0]) {
+ prev = $clone[0].previousSibling;
+ } else if (next === $clone[0]) {
+ next = $clone[0].nextSibling;
+ }
+ $clone.after(this.$target);
this.$overlay.removeClass("hidden");
$("body").removeClass('move-important');
- $('.oe_drop_zone').droppable('destroy').remove();
- $(".oe_drop_clone, .oe_drop_to_remove").remove();
+ $clone.remove();
+ $(".oe_drop_to_remove").remove();
if (this.dropped) {
this.buildingBlock.getParent().rte.historyRecordUndo(this.$target);
diff --git a/addons/website_portal/controllers/main.py b/addons/website_portal/controllers/main.py
index 3bb7c0acc1a..be707e9f91d 100644
--- a/addons/website_portal/controllers/main.py
+++ b/addons/website_portal/controllers/main.py
@@ -73,7 +73,7 @@ class website_account(http.Controller):
'country_id': post.pop('country_id'),
'state_id': post.pop('state_id')
}
- partner.commercial_partner_id.write(address_fields)
+ partner.commercial_partner_id.sudo().write(address_fields)
partner.sudo().write(post)
if redirect:
return request.redirect(redirect)
diff --git a/doc/cla/corporate/goopen.md b/doc/cla/corporate/goopen.md
new file mode 100644
index 00000000000..91f5cded22a
--- /dev/null
+++ b/doc/cla/corporate/goopen.md
@@ -0,0 +1,15 @@
+Slovenia, 2016-09-05
+
+GoOpen, računalniške storitve, Aleš Ferlan s.p. agrees to the terms of the
+Odoo Corporate Contributor License Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Aleš Ferlan alefer89@protonmail.com
+
+List of contributors:
+
+Aleš Ferlan alefer89@protonmail.com
diff --git a/doc/setup/deploy.rst b/doc/setup/deploy.rst
index 3209154c41b..5b906bfcd7a 100644
--- a/doc/setup/deploy.rst
+++ b/doc/setup/deploy.rst
@@ -233,15 +233,15 @@ connections to the secure port
.. warning::
- In case you are using the Point of Sale module in combinaison with a `POSBox`_,
+ In case you are using the Point of Sale module in combination with a `POSBox`_,
you must disable the HTTPS configuration for the route ``/pos/web`` to avoid
- mix-content errors.
+ mixed-content errors.
Configuration sample
--------------------
* redirect http requests to https
-* proxiing requests to odoo
+* proxy requests to odoo
in ``/etc/odoo.conf`` set:
@@ -440,4 +440,4 @@ of the supported browsers by Odoo version is the following:
.. _use an SSH tunnel:
http://www.postgresql.org/docs/9.3/static/ssh-tunnels.html
.. _WSGI: http://wsgi.readthedocs.org/
-.. _POSBox: https://www.odoo.com/page/point-of-sale-hardware#part_2
\ No newline at end of file
+.. _POSBox: https://www.odoo.com/page/point-of-sale-hardware#part_2