[MERGE] forward port branch 9.0 up to 5be4086
This commit is contained in:
@@ -1273,9 +1273,10 @@ class AccountInvoiceTax(models.Model):
|
|||||||
base = 0.0
|
base = 0.0
|
||||||
for line in tax.invoice_id.invoice_line_ids:
|
for line in tax.invoice_id.invoice_line_ids:
|
||||||
if tax.tax_id in line.invoice_line_tax_ids:
|
if tax.tax_id in line.invoice_line_tax_ids:
|
||||||
base += line.price_subtotal
|
price_unit = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
|
||||||
# To add include base amount taxes
|
base += (line.invoice_line_tax_ids - tax.tax_id).compute_all(
|
||||||
base += sum((line.invoice_line_tax_ids.filtered(lambda t: t.include_base_amount) - tax.tax_id).mapped('amount'))
|
price_unit, line.invoice_id.currency_id, line.quantity, line.product_id, line.invoice_id.partner_id
|
||||||
|
)['base']
|
||||||
tax.base = base
|
tax.base = base
|
||||||
|
|
||||||
invoice_id = fields.Many2one('account.invoice', string='Invoice', ondelete='cascade', index=True)
|
invoice_id = fields.Many2one('account.invoice', string='Invoice', ondelete='cascade', index=True)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class HrExpense(models.Model):
|
|||||||
user_ids.append(employee.parent_id.user_id.id)
|
user_ids.append(employee.parent_id.user_id.id)
|
||||||
if employee.department_id and employee.department_id.manager_id and employee.parent_id != employee.department_id.manager_id:
|
if employee.department_id and employee.department_id.manager_id and employee.parent_id != employee.department_id.manager_id:
|
||||||
user_ids.append(employee.department_id.manager_id.user_id.id)
|
user_ids.append(employee.department_id.manager_id.user_id.id)
|
||||||
self.message_subscribe_users(user_ids=user_ids)
|
self.sudo().message_subscribe_users(user_ids=user_ids)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class PaypalController(http.Controller):
|
|||||||
self.paypal_validate_data(**post)
|
self.paypal_validate_data(**post)
|
||||||
return ''
|
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):
|
def paypal_dpn(self, **post):
|
||||||
""" Paypal DPN """
|
""" Paypal DPN """
|
||||||
_logger.info('Beginning Paypal DPN form_feedback with post data %s', pprint.pformat(post)) # debug
|
_logger.info('Beginning Paypal DPN form_feedback with post data %s', pprint.pformat(post)) # debug
|
||||||
|
|||||||
@@ -620,7 +620,7 @@ var BuildingBlock = Widget.extend({
|
|||||||
animation.start(true, $target);
|
animation.start(true, $target);
|
||||||
|
|
||||||
self.call_for_all_snippets($target, function (editor, $snippet) {
|
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.create_snippet_editor($target);
|
||||||
self.cover_target($target.data('overlay'), $target);
|
self.cover_target($target.data('overlay'), $target);
|
||||||
@@ -640,12 +640,10 @@ var BuildingBlock = Widget.extend({
|
|||||||
var self = this;
|
var self = this;
|
||||||
$snippet.add(globalSelector.all($snippet)).each(function () {
|
$snippet.add(globalSelector.all($snippet)).each(function () {
|
||||||
var $snippet = $(this);
|
var $snippet = $(this);
|
||||||
setTimeout(function () {
|
self.create_snippet_editor($snippet);
|
||||||
self.create_snippet_editor($snippet);
|
if ($snippet.data("snippet-editor")) {
|
||||||
if ($snippet.data("snippet-editor")) {
|
callback.call(self, $snippet.data("snippet-editor"), $snippet);
|
||||||
callback.call(self, $snippet.data("snippet-editor"), $snippet);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -918,17 +916,25 @@ var Editor = Class.extend({
|
|||||||
},
|
},
|
||||||
_drag_and_drop_stop: function () {
|
_drag_and_drop_stop: function () {
|
||||||
var self = this;
|
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 next = this.$target.last()[0].nextSibling;
|
||||||
var $parent = this.$target.parent();
|
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");
|
this.$overlay.removeClass("hidden");
|
||||||
$("body").removeClass('move-important');
|
$("body").removeClass('move-important');
|
||||||
$('.oe_drop_zone').droppable('destroy').remove();
|
$clone.remove();
|
||||||
$(".oe_drop_clone, .oe_drop_to_remove").remove();
|
$(".oe_drop_to_remove").remove();
|
||||||
|
|
||||||
if (this.dropped) {
|
if (this.dropped) {
|
||||||
this.buildingBlock.parent.rte.historyRecordUndo(this.$target);
|
this.buildingBlock.parent.rte.historyRecordUndo(this.$target);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class website_account(http.Controller):
|
|||||||
'country_id': post.pop('country_id'),
|
'country_id': post.pop('country_id'),
|
||||||
'state_id': post.pop('state_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)
|
partner.sudo().write(post)
|
||||||
if redirect:
|
if redirect:
|
||||||
return request.redirect(redirect)
|
return request.redirect(redirect)
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -233,15 +233,15 @@ connections to the secure port
|
|||||||
|
|
||||||
.. warning::
|
.. 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
|
you must disable the HTTPS configuration for the route ``/pos/web`` to avoid
|
||||||
mix-content errors.
|
mixed-content errors.
|
||||||
|
|
||||||
Configuration sample
|
Configuration sample
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
* redirect http requests to https
|
* redirect http requests to https
|
||||||
* proxiing requests to odoo
|
* proxy requests to odoo
|
||||||
|
|
||||||
in ``/etc/odoo.conf`` set:
|
in ``/etc/odoo.conf`` set:
|
||||||
|
|
||||||
@@ -428,4 +428,4 @@ which will generate a 32 characters pseudorandom printable string.
|
|||||||
.. _use an SSH tunnel:
|
.. _use an SSH tunnel:
|
||||||
http://www.postgresql.org/docs/9.3/static/ssh-tunnels.html
|
http://www.postgresql.org/docs/9.3/static/ssh-tunnels.html
|
||||||
.. _WSGI: http://wsgi.readthedocs.org/
|
.. _WSGI: http://wsgi.readthedocs.org/
|
||||||
.. _POSBox: https://www.odoo.com/page/point-of-sale-hardware#part_2
|
.. _POSBox: https://www.odoo.com/page/point-of-sale-hardware#part_2
|
||||||
|
|||||||
Reference in New Issue
Block a user