diff --git a/addons/auth_ldap/users_ldap.py b/addons/auth_ldap/users_ldap.py
index c9de7c5f15f..c7506b9cd55 100644
--- a/addons/auth_ldap/users_ldap.py
+++ b/addons/auth_ldap/users_ldap.py
@@ -84,7 +84,7 @@ class CompanyLDAP(osv.osv):
_logger.warning('Could not format LDAP filter. Your filter should contain one \'%s\'.')
return False
try:
- results = self.query(conf, filter)
+ results = self.query(conf, filter.encode('utf-8'))
# Get rid of (None, attrs) for searchResultReference replies
results = [i for i in results if i[0]]
diff --git a/addons/l10n_be/i18n_extra/nl_BE.po b/addons/l10n_be/i18n_extra/nl_BE.po
index 4516f76832a..d40cd32f598 100644
--- a/addons/l10n_be/i18n_extra/nl_BE.po
+++ b/addons/l10n_be/i18n_extra/nl_BE.po
@@ -701,7 +701,7 @@ msgstr "R.S.Z. 4de kwartaal"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4540
msgid "ONSS. Arriérés"
-msgstr ""
+msgstr "Achterstallige bijdragen RSZ"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4553
@@ -879,7 +879,7 @@ msgstr "Waardeverminderingen op voorraden"
#. module: l10n_be
#: model:account.fiscal.position.template,name:l10n_be.fiscal_position_template_4
msgid "Régime Cocontractant"
-msgstr ""
+msgstr "Medecontractant"
#. module: l10n_be
#: model:account.fiscal.position.template,name:l10n_be.fiscal_position_template_2
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js
index 0398b179859..9ca3870c7c3 100644
--- a/addons/mail/static/src/js/chat_manager.js
+++ b/addons/mail/static/src/js/chat_manager.js
@@ -128,7 +128,8 @@ function make_message (data) {
subtype_description: data.subtype_description,
is_author: data.author_id && data.author_id[0] === session.partner_id,
is_note: data.is_note,
- is_system_notification: data.message_type === 'notification' && data.model === 'mail.channel',
+ is_system_notification: (data.message_type === 'notification' && data.model === 'mail.channel')
+ || data.info === 'transient_message',
attachment_ids: data.attachment_ids || [],
subject: data.subject,
email_from: data.email_from,
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index cc88d62c6bc..c1ccbfd7020 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -185,9 +185,7 @@ class SaleOrder(models.Model):
"""
Trigger the change of fiscal position when the shipping address is modified.
"""
- fiscal_position = self.env['account.fiscal.position'].get_fiscal_position(self.partner_id.id, self.partner_shipping_id.id)
- if fiscal_position:
- self.fiscal_position_id = fiscal_position
+ self.fiscal_position_id = self.env['account.fiscal.position'].get_fiscal_position(self.partner_id.id, self.partner_shipping_id.id)
return {}
@api.multi
@@ -919,7 +917,8 @@ class MailComposeMessage(models.TransientModel):
order = self.env['sale.order'].browse([self._context['default_res_id']])
if order.state == 'draft':
order.state = 'sent'
- return super(MailComposeMessage, self.with_context(mail_post_autofollow=True)).send_mail(auto_commit=auto_commit)
+ self = self.with_context(mail_post_autofollow=True)
+ return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit)
class AccountInvoice(models.Model):
diff --git a/addons/stock_account/product_view.xml b/addons/stock_account/product_view.xml
index 3c6b8072702..ddcc6bbe4be 100644
--- a/addons/stock_account/product_view.xml
+++ b/addons/stock_account/product_view.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/addons/stock_account/stock_account.py b/addons/stock_account/stock_account.py
index 1b59afdc74b..0f927b43561 100644
--- a/addons/stock_account/stock_account.py
+++ b/addons/stock_account/stock_account.py
@@ -88,7 +88,8 @@ class account_invoice(osv.osv):
'account_id':dacc,
'product_id':i_line.product_id.id,
'uom_id':i_line.uom_id.id,
- 'account_analytic_id': False,
+ 'account_analytic_id': i_line.account_analytic_id.id,
+ 'analytic_tag_ids': i_line.analytic_tag_ids.ids and [(6, 0, i_line.analytic_tag_ids.ids)] or False,
},
{
@@ -100,7 +101,8 @@ class account_invoice(osv.osv):
'account_id':cacc,
'product_id':i_line.product_id.id,
'uom_id':i_line.uom_id.id,
- 'account_analytic_id': False,
+ 'account_analytic_id': i_line.account_analytic_id.id,
+ 'analytic_tag_ids': i_line.analytic_tag_ids.ids and [(6, 0, i_line.analytic_tag_ids.ids)] or False,
},
]
return []
diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py
index b9a0c48bcf4..7a91f35c9a7 100644
--- a/addons/stock_account/wizard/stock_valuation_history.py
+++ b/addons/stock_account/wizard/stock_valuation_history.py
@@ -56,11 +56,11 @@ class stock_history(osv.osv):
for ids in group_lines.values():
for product_id in ids:
line_ids.add(product_id)
- line_ids = list(line_ids)
lines_rec = {}
if line_ids:
- cr.execute('SELECT id, product_id, price_unit_on_quant, company_id, quantity FROM stock_history WHERE id in %s', (tuple(line_ids),))
- lines_rec = cr.dictfetchall()
+ move_ids = tuple(abs(line_id) for line_id in line_ids)
+ cr.execute('SELECT id, product_id, price_unit_on_quant, company_id, quantity FROM stock_history WHERE move_id in %s', (move_ids,))
+ lines_rec = tuple(rec for rec in cr.dictfetchall() if rec['id'] in line_ids)
lines_dict = dict((line['id'], line) for line in lines_rec)
product_ids = list(set(line_rec['product_id'] for line_rec in lines_rec))
products_rec = self.pool['product.product'].read(cr, uid, product_ids, ['cost_method', 'id'], context=context)
diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py
index ac8d43fae84..312b4670fd7 100644
--- a/addons/website_quote/controllers/main.py
+++ b/addons/website_quote/controllers/main.py
@@ -13,10 +13,11 @@ from openerp.addons.website_mail.controllers.main import _message_post_helper
class sale_quote(http.Controller):
- @http.route([
- "/quote/",
- "/quote//"
- ], type='http', auth="public", website=True)
+ @http.route("/quote/", type='http', auth="user", website=True)
+ def view_user(self, *args, **kwargs):
+ return self.view(*args, **kwargs)
+
+ @http.route("/quote//", type='http', auth="public", website=True)
def view(self, order_id, pdf=None, token=None, message=False, **post):
# use SUPERUSER_ID allow to access/view order for public user
# only if he knows the private token
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py
index 7cb0beeeed2..95af149ff60 100644
--- a/addons/website_sale/controllers/main.py
+++ b/addons/website_sale/controllers/main.py
@@ -574,11 +574,8 @@ class WebsiteSale(http.Controller):
order.onchange_partner_id()
elif mode[1] == 'shipping':
order.partner_shipping_id = partner_id
- order.onchange_partner_shipping_id()
- order.order_line._compute_tax_id()
order.message_partner_ids = [(4, partner_id), (3, request.website.partner_id.id)]
-
if not errors:
return request.redirect(kw.get('callback') or '/shop/checkout')
@@ -622,6 +619,9 @@ class WebsiteSale(http.Controller):
if redirection:
return redirection
+
+ order.onchange_partner_shipping_id()
+ order.order_line._compute_tax_id()
request.session['sale_last_order_id'] = order.id
request.website.sale_get_order(update_pricelist=True)
extra_step = request.env.ref('website_sale.extra_info_option')