diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index 499748f3692..c6f8d809ec8 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -526,7 +526,7 @@ class AccountInvoice(models.Model):
self.date_due = self.date_due or self.date_invoice
else:
pterm = self.payment_term_id
- pterm_list = pterm.with_context(currency_id=self.currency_id.id).compute(value=1, date_ref=date_invoice)[0]
+ pterm_list = pterm.with_context(currency_id=self.company_id.currency_id.id).compute(value=1, date_ref=date_invoice)[0]
self.date_due = max(line[0] for line in pterm_list)
@api.multi
@@ -831,7 +831,7 @@ class AccountInvoice(models.Model):
name = inv.name or '/'
if inv.payment_term_id:
- totlines = inv.with_context(ctx).payment_term_id.with_context(currency_id=inv.currency_id.id).compute(total, date_invoice)[0]
+ totlines = inv.with_context(ctx).payment_term_id.with_context(currency_id=company_currency.id).compute(total, date_invoice)[0]
res_amount_currency = total_currency
ctx['date'] = date_invoice
for i, t in enumerate(totlines):
diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml
index 846a86724b2..df68e8f45d3 100644
--- a/addons/account/security/account_security.xml
+++ b/addons/account/security/account_security.xml
@@ -85,6 +85,13 @@
['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+
+ Invoice Analysis multi-company
+
+
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+
+
Account fiscal Mapping company rule
diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py
index a9909a58893..2dc00149bc1 100644
--- a/addons/hr_expense/models/hr_expense.py
+++ b/addons/hr_expense/models/hr_expense.py
@@ -233,7 +233,7 @@ class HrExpense(models.Model):
#convert eml into an osv-valid format
lines = map(lambda x: (0, 0, expense._prepare_move_line(x)), move_lines)
- move.write({'line_ids': lines})
+ move.with_context(dont_create_taxes=True).write({'line_ids': lines})
expense.sheet_id.write({'account_move_id': move.id})
move.post()
if expense.payment_mode == 'company_account':
diff --git a/addons/im_livechat/static/src/js/im_livechat.js b/addons/im_livechat/static/src/js/im_livechat.js
index df9cd99b7d7..878f5e268b6 100644
--- a/addons/im_livechat/static/src/js/im_livechat.js
+++ b/addons/im_livechat/static/src/js/im_livechat.js
@@ -32,6 +32,7 @@ var LivechatButton = Widget.extend({
this.channel = null;
this.chat_window = null;
this.messages = [];
+ this.server_url = server_url;
},
willStart: function () {
@@ -203,10 +204,11 @@ var LivechatButton = Widget.extend({
this.options.default_username;
// Compute the avatar_url
+ msg.avatar_src = this.server_url;
if (msg.author_id && msg.author_id[0]) {
- msg.avatar_src = "/web/image/res.partner/" + msg.author_id[0] + "/image_small";
+ msg.avatar_src += "/web/image/res.partner/" + msg.author_id[0] + "/image_small";
} else {
- msg.avatar_src = "/mail/static/src/img/smiley/avatar.jpg";
+ msg.avatar_src += "/mail/static/src/img/smiley/avatar.jpg";
}
if (options && options.prepend) {
diff --git a/addons/l10n_gt/data/l10n_gt_chart_data.xml b/addons/l10n_gt/data/l10n_gt_chart_data.xml
index 1d116ec8191..3feecab930b 100644
--- a/addons/l10n_gt/data/l10n_gt_chart_data.xml
+++ b/addons/l10n_gt/data/l10n_gt_chart_data.xml
@@ -12,7 +12,7 @@
Plantilla de cuentas de Guatemala (sencilla)
1.0.01.0
1.0.02.0
- 6
+ 9
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index bc4f2a2fd2e..80ea86b9be9 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -675,6 +675,8 @@ exports.PosModel = Backbone.Model.extend({
flushed.always(function(ids){
pushed.resolve();
});
+
+ return flushed;
});
return pushed;
},
@@ -775,6 +777,11 @@ exports.PosModel = Backbone.Model.extend({
var self = this;
var timeout = typeof options.timeout === 'number' ? options.timeout : 7500 * orders.length;
+ // Keep the order ids that are about to be sent to the
+ // backend. In between create_from_ui and the success callback
+ // new orders may have been added to it.
+ var order_ids_to_sync = _.pluck(orders, 'id');
+
// we try to send the order. shadow prevents a spinner if it takes too long. (unless we are sending an invoice,
// then we want to notify the user that we are waiting on something )
var posOrderModel = new Model('pos.order');
@@ -789,8 +796,8 @@ exports.PosModel = Backbone.Model.extend({
timeout: timeout
}
).then(function (server_ids) {
- _.each(orders, function (order) {
- self.db.remove_order(order.id);
+ _.each(order_ids_to_sync, function (order_id) {
+ self.db.remove_order(order_id);
});
self.set('failed',false);
return server_ids;
diff --git a/addons/project/data/project_data.xml b/addons/project/data/project_data.xml
index 1f4148b7377..0df41ea8881 100644
--- a/addons/project/data/project_data.xml
+++ b/addons/project/data/project_data.xml
@@ -106,7 +106,7 @@
-
+
Start here to discover Odoo
followers
@@ -120,25 +120,25 @@
-
+
1
New
-
+
2
Basic
-
+
3
Advanced
-
+
1
0
@@ -150,7 +150,7 @@
-
+
2
0
@@ -161,7 +161,7 @@
-
+
3
0
@@ -172,7 +172,7 @@
-
+
4
0
@@ -183,7 +183,7 @@
-
+
0
@@ -193,7 +193,7 @@
-
+
Converse with your customers and colleagues
project.task
@@ -203,12 +203,12 @@
-
+
NeedAssistance
-
+
3
0
@@ -221,7 +221,7 @@
-
+
4
0
@@ -233,7 +233,7 @@
-
+
5
0
@@ -244,7 +244,7 @@
-
+
0
@@ -254,7 +254,7 @@
Click on the bar in the upper right corner
-
+
planner_icon.png
planner_icon.png
@@ -262,7 +262,7 @@
-
+
How to open the implementation guide ?
project.task
@@ -273,11 +273,11 @@
-
+
-
+
0
@@ -287,7 +287,7 @@
Click on the gear icon on the column, to archive the stage, with all the tasks in it. You can also archive one card only, by clicking on the button in the task form view.
-
+
0
@@ -297,7 +297,7 @@
Click on the last column to create a stage. The name depends on the process. For example, in a customer service process, a stage name may be 'Backlog', 'Waiting Customer Feedback' or 'Done'.
-
+
0
@@ -307,7 +307,7 @@
-
+
0
@@ -317,7 +317,7 @@
In the chatter, sending an email with an attachment will display the picture on the card. When there are several image attachments, you can choose which one you want to display.
-
+
bird.jpg
bird.jpg
@@ -326,7 +326,7 @@
-
+
How to open the planner?
project.task
@@ -336,7 +336,7 @@
-
+
diff --git a/addons/report/controllers/main.py b/addons/report/controllers/main.py
index aad5d3a23ea..0b00a0ab45f 100644
--- a/addons/report/controllers/main.py
+++ b/addons/report/controllers/main.py
@@ -51,7 +51,7 @@ class ReportController(Controller):
#------------------------------------------------------
# Misc. route utils
#------------------------------------------------------
- @route(['/report/barcode', '/report/barcode//'], type='http', auth="user")
+ @route(['/report/barcode', '/report/barcode//'], type='http', auth="public")
def report_barcode(self, type, value, width=600, height=100, humanreadable=0):
"""Contoller able to render barcode images thanks to reportlab.
Samples:
diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py
index 1738bb54216..cee32361ba4 100644
--- a/addons/stock/models/product.py
+++ b/addons/stock/models/product.py
@@ -13,7 +13,7 @@ OPERATORS = {
'>': py_operator.gt,
'<=': py_operator.le,
'>=': py_operator.ge,
- '==': py_operator.eq,
+ '=': py_operator.eq,
'!=': py_operator.ne
}
@@ -260,9 +260,6 @@ class Product(models.Model):
if not isinstance(value, (float, int)):
raise UserError('Invalid domain right operand')
- if operator == '=':
- operator = '=='
-
# TODO: Still optimization possible when searching virtual quantities
ids = []
for product in self.search([]):
@@ -272,7 +269,7 @@ class Product(models.Model):
def _search_qty_available(self, operator, value):
# TDE FIXME: should probably clean the search methods
- if value == 0.0 and operator in ('==', '>=', '<='):
+ if value == 0.0 and operator in ('=', '>=', '<='):
return self._search_product_quantity(operator, value, 'qty_available')
product_ids = self._search_qty_available_new(operator, value, self._context.get('lot_id'), self._context.get('owner_id'), self._context.get('package_id'))
return [('id', 'in', product_ids)]
diff --git a/addons/stock/wizard/stock_change_product_qty.py b/addons/stock/wizard/stock_change_product_qty.py
index a51ea171128..39caa0ff069 100644
--- a/addons/stock/wizard/stock_change_product_qty.py
+++ b/addons/stock/wizard/stock_change_product_qty.py
@@ -36,7 +36,7 @@ class ProductChangeQuantity(models.TransientModel):
def onchange_location_id(self):
# TDE FIXME: should'nt we use context / location ?
if self.location_id and self.product_id:
- availability = self.product_id._product_available()
+ availability = self.product_id.with_context(compute_child=False)._product_available()
self.new_quantity = availability[self.product_id.id]['qty_available']
@api.onchange('product_id')
diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js
index 77c0f059354..2293f2dac6f 100644
--- a/addons/web/static/src/js/views/pivot_view.js
+++ b/addons/web/static/src/js/views/pivot_view.js
@@ -186,7 +186,7 @@ var PivotView = View.extend({
this.initial_row_groupby = context.pivot_row_groupby || this.initial_row_groupby;
this.initial_col_groupby = context.pivot_col_groupby || this.initial_col_groupby;
}
- this.main_row.groupbys = group_by.length ? group_by : this.initial_row_groupby.slice(0);
+ this.main_row.groupbys = group_by.length ? group_by : (context.pivot_row_groupby || this.initial_row_groupby.slice(0));
this.main_col.groupbys = context.pivot_column_groupby || this.initial_col_groupby.slice(0);
this.active_measures = context.pivot_measures || this.active_measures;
@@ -206,6 +206,10 @@ var PivotView = View.extend({
this.do_push_state({});
return this.data_loaded.done(function () {
self.display_table();
+ self.$buttons.find('.o_pivot_measures_list li').removeClass('selected');
+ self.active_measures.forEach(function (measure) {
+ self.$buttons.find('li[data-field="' + measure + '"]').addClass('selected');
+ });
_super();
});
},
diff --git a/addons/web_editor/static/src/js/translator.js b/addons/web_editor/static/src/js/translator.js
index 4fd9825567f..bc431f3ba55 100644
--- a/addons/web_editor/static/src/js/translator.js
+++ b/addons/web_editor/static/src/js/translator.js
@@ -177,6 +177,10 @@ var Translate = Widget.extend({
},
rte_changed: function (node) {
var $node = $(node);
+ $node.find("p").each(function () { // remove element which might have been inserted because of copy-paste
+ var $p = $(this);
+ $p.after($p.html()).remove();
+ });
var trans = this.getTranlationObject($node[0]);
$node.toggleClass('o_dirty', trans.value !== $node.html().replace(/[ \t\n\r]+/, ' '));
},
diff --git a/doc/cla/corporate/nubark.md b/doc/cla/corporate/nubark.md
new file mode 100644
index 00000000000..a570c6f3ddc
--- /dev/null
+++ b/doc/cla/corporate/nubark.md
@@ -0,0 +1,15 @@
+Colombia, 2017-01-21
+
+Nubark 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,
+
+Esteban Echeverry eecheverry@nubark.com https://github.com/nubark
+
+List of contributors:
+
+Esteban Echeverry eecheverry@nubark.com https://github.com/tebanep
diff --git a/doc/cla/individual/hendrikw25.md b/doc/cla/individual/hendrikw25.md
new file mode 100644
index 00000000000..27d6bf3fccb
--- /dev/null
+++ b/doc/cla/individual/hendrikw25.md
@@ -0,0 +1,11 @@
+Indonesia, 2017-01-25
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Hendrik hendrikwidjaja25@gmail.com https://github.com/hendrikw25