@@ -391,7 +391,7 @@ action = model.activate_sample_project()
-
+
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py
index 00cb3c15efe..179a1730518 100644
--- a/addons/sale/models/sale.py
+++ b/addons/sale/models/sale.py
@@ -391,11 +391,11 @@ class SaleOrder(models.Model):
'state': 'draft',
'procurement_group_id': False,
})
- orders.mapped('order_line').mapped('procurement_ids').write({'sale_line_id': False})
+ return orders.mapped('order_line').mapped('procurement_ids').write({'sale_line_id': False})
@api.multi
def action_cancel(self):
- self.write({'state': 'cancel'})
+ return self.write({'state': 'cancel'})
@api.multi
def action_quotation_send(self):
@@ -445,7 +445,7 @@ class SaleOrder(models.Model):
@api.multi
def action_done(self):
- self.write({'state': 'done'})
+ return self.write({'state': 'done'})
def _prepare_procurement_group(self):
return {'name': self.name}
diff --git a/addons/web/static/src/js/views/search_menus.js b/addons/web/static/src/js/views/search_menus.js
index 427aebda39d..a8ce7274256 100644
--- a/addons/web/static/src/js/views/search_menus.js
+++ b/addons/web/static/src/js/views/search_menus.js
@@ -434,8 +434,8 @@ return Widget.extend({
if (!this._fields_def) {
this._fields_def = data_manager.load_fields(this.searchview.dataset).then(function (fields) {
var groupable_types = ['many2one', 'char', 'boolean', 'selection', 'date', 'datetime'];
- var filter_group_field = _.filter(fields, function(field, name) {
- if (field.store && _.contains(groupable_types, field.type)) {
+ var filter_group_field = _.filter(fields, function (field, name) {
+ if (field.sortable && _.contains(groupable_types, field.type)) {
field.name = name;
return field;
}
diff --git a/addons/website_mail_channel/controllers/main.py b/addons/website_mail_channel/controllers/main.py
index c9b3deb268e..4a9e2c449a8 100644
--- a/addons/website_mail_channel/controllers/main.py
+++ b/addons/website_mail_channel/controllers/main.py
@@ -6,7 +6,7 @@ import werkzeug
from datetime import datetime
from dateutil import relativedelta
-from odoo import http, fields, tools
+from odoo import http, fields, tools, _
from odoo.http import request
from odoo.addons.website.models.website import slug
@@ -228,8 +228,16 @@ class MailGroup(http.Controller):
def confirm_unsubscribe(self, channel, partner_id, token, **kw):
subscriber = request.env['mail.channel.partner'].search([('channel_id', '=', channel.id), ('partner_id', '=', partner_id)])
if not subscriber:
- # not registered, maybe already unsubsribed
- return request.render('website_mail_channel.invalid_token_subscription')
+ # FIXME: remove try/except in master
+ try:
+ return request.render(
+ 'website_mail_channel.not_subscribed', {
+ 'partner_id': partner_id
+ })
+ except ValueError:
+ return _("The address %s is already unsubscribed or was never subscribed to any mailing list") % (
+ partner_id.email
+ )
subscriber_token = channel._generate_action_token(partner_id, action='unsubscribe')
if token != subscriber_token:
diff --git a/addons/website_mail_channel/views/website_mail_channel_templates.xml b/addons/website_mail_channel/views/website_mail_channel_templates.xml
index 5ed8a25e9d6..e225d107b3c 100644
--- a/addons/website_mail_channel/views/website_mail_channel_templates.xml
+++ b/addons/website_mail_channel/views/website_mail_channel_templates.xml
@@ -338,4 +338,19 @@
+
+
+
+
+
+ The address is already
+ unsubscribed or was never subscribed to the mailing
+ list, you may want to check that the address was
+ correct.
+
+
+
+
+
+
diff --git a/doc/cla/corporate/equitania.md b/doc/cla/corporate/equitania.md
new file mode 100644
index 00000000000..8dedd6fd05c
--- /dev/null
+++ b/doc/cla/corporate/equitania.md
@@ -0,0 +1,21 @@
+Germany, 2017-09-11
+
+Equitania Software GmbH 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,
+
+Martin Schmid m.schmid@equitania.com https://github.com/eqms
+
+List of contributors:
+
+Julia Eberle j.eberle@equitania.de https://github.com/eqje
+Paul Exler p.exler@equitania.de https://github.com/eqpe
+Oliver Hercht o.hercht@equitania.de https://github.com/eqoh
+Johann Müller j.mueller@equitania.de https://github.com/eqjm
+Robin Prijatel r.prijatel@equitania.de https://github.com/eqrp
+Michal Sodomka m.sodomka@equitania.de https://github.com/eqmiso
+
diff --git a/doc/cla/corporate/quartile.md b/doc/cla/corporate/quartile.md
new file mode 100644
index 00000000000..b43892e1227
--- /dev/null
+++ b/doc/cla/corporate/quartile.md
@@ -0,0 +1,14 @@
+Hong Kong, 2017-09-18
+
+Quartile Limited 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,
+
+Yoshi Tashiro tashiro@quartile.co https://github.com/yostashiro
+
+List of contributors:
+
+Yoshi Tashiro tashiro@quartile.co https://github.com/yostashiro
+Tim Lai tl@quartile.co https://github.com/TimLai125
diff --git a/doc/cla/corporate/sewisoft.md b/doc/cla/corporate/sewisoft.md
new file mode 100644
index 00000000000..6b76b2feca1
--- /dev/null
+++ b/doc/cla/corporate/sewisoft.md
@@ -0,0 +1,16 @@
+Germany, 2017-07-25
+
+sewisoft UG 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,
+
+Günter Selbert guenter.selbert@sewisoft.de https://github.com/Guenzn
+
+List of contributors:
+
+Günter Selbert guenter.selbert@sewisoft.de https://github.com/Guenzn
+Stefan Wild stefan.wild@sewisoft.de https://github.com/wildi1
diff --git a/doc/cla/corporate/syleam.md b/doc/cla/corporate/syleam.md
index 75ac0025efe..7c2e09760d0 100644
--- a/doc/cla/corporate/syleam.md
+++ b/doc/cla/corporate/syleam.md
@@ -14,4 +14,7 @@ List of contributors:
Sébastien Lange sebastien.lange@syleam.fr https://github.com/alnslang
Sylvain Garancher sylvain.garancher@syleam.fr https://github.com/sylvain-garancher
-Alexandre Moreau alexandre.moreau@syleam.fr https://github.com/a-moreau
+Alexandre Moreau alexandre.moreau@syleam.fr https://github.com/a-moreau (Up to 2017-08-31)
+Christopher Tribbeck chris.tribbeck@syleam.fr https://github.com/ctribbeck
+Jérémy Cormier jeremy.cormier@syleam.fr https://github.com/Corbiezorq
+Samuel Piquet samuel.piquet@syleam.fr https://github.com/sa3m
diff --git a/doc/cla/corporate/tvtmarine-automation.md b/doc/cla/corporate/tvtmarine-automation.md
index 8b5b59d501b..de0906f0331 100644
--- a/doc/cla/corporate/tvtmarine-automation.md
+++ b/doc/cla/corporate/tvtmarine-automation.md
@@ -14,4 +14,6 @@ List of contributors:
David Tran david.tran@tvtmarine.com https://github.com/davidtranhp
Long Do dhlong.1209@gmail.com https://github.com/hoanglong87
-Hao Hoang hao.hoang@ma.tvtmarine.com https://github.com/hoanghao2001
\ No newline at end of file
+Hao Hoang hao.hoang@ma.tvtmarine.com https://github.com/hoanghao2001
+Tommy Tran tu.tran@tvtmarine.com https://github.com/tutran81
+Emily Ha emily.ha@tvtmarine.com https://github.com/emilyha
\ No newline at end of file
diff --git a/doc/cla/corporate/vauxoo.md b/doc/cla/corporate/vauxoo.md
index 096c835ef55..017ffe08bba 100644
--- a/doc/cla/corporate/vauxoo.md
+++ b/doc/cla/corporate/vauxoo.md
@@ -38,3 +38,4 @@ Gabriela Mogollon gmogollon@vauxoo.com https://github.com/GavyMG
Jesus Zapata jesus@vauxoo.com https://github.com/JesusZapata
Germana Oliveira germana@vauxoo.com https://github.com/goliveirab
Mariano Fernandez mariano@vauxoo.com https://github.com/Batuto
+Edgar Rivero edgar@vauxoo.com https://github.com/egrivero
diff --git a/doc/cla/corporate/xoe-corp.md b/doc/cla/corporate/xoe-corp.md
new file mode 100644
index 00000000000..ef449e25d72
--- /dev/null
+++ b/doc/cla/corporate/xoe-corp.md
@@ -0,0 +1,15 @@
+Colombia, 2016-04-20
+
+Xoe Corp SAS. 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,
+
+David Arnold dar@xoe.solutions https://github.com/blaggacao
+
+List of contributors:
+
+David Arnold dar@devco.co https://github.com/blaggacao
diff --git a/doc/cla/individual/bazemoreb.md b/doc/cla/individual/bazemoreb.md
new file mode 100644
index 00000000000..c800a883cee
--- /dev/null
+++ b/doc/cla/individual/bazemoreb.md
@@ -0,0 +1,11 @@
+USA, 2017-10-01
+
+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,
+
+Brandon Bazemore brandonb@audian.com https://github.com/bazemoreb
diff --git a/doc/cla/individual/blaggacao.md b/doc/cla/individual/blaggacao.md
new file mode 100644
index 00000000000..30b2fee69a0
--- /dev/null
+++ b/doc/cla/individual/blaggacao.md
@@ -0,0 +1,12 @@
+Colombia, 2017-09-01
+
+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,
+
+David Arnold dar@xoe.solutions https://github.com/blaggacao
+
diff --git a/doc/cla/individual/danger89.md b/doc/cla/individual/danger89.md
new file mode 100644
index 00000000000..11c9e89616c
--- /dev/null
+++ b/doc/cla/individual/danger89.md
@@ -0,0 +1,11 @@
+The Netherlands, 2017-10-02
+
+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,
+
+Melroy van den Berg webmaster1989@gmail.com https://github.com/danger89
diff --git a/doc/cla/individual/hansmi.md b/doc/cla/individual/hansmi.md
new file mode 100644
index 00000000000..ff479503083
--- /dev/null
+++ b/doc/cla/individual/hansmi.md
@@ -0,0 +1,11 @@
+Switzerland, 2017-09-15
+
+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,
+
+Michael Hanselmann public@hansmi.ch https://github.com/hansmi
diff --git a/odoo/addons/base/res/res_currency_data.xml b/odoo/addons/base/res/res_currency_data.xml
index 057a05f9442..a39d049ffe1 100644
--- a/odoo/addons/base/res/res_currency_data.xml
+++ b/odoo/addons/base/res/res_currency_data.xml
@@ -79,6 +79,7 @@
IDR
Rp
0.01
+ before
diff --git a/odoo/fields.py b/odoo/fields.py
index 20f238e19c1..a83697f10b5 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -53,18 +53,23 @@ def _check_value(value):
def copy_cache(records, env):
""" Recursively copy the cache of ``records`` to the environment ``env``. """
- todo, done = set(records), set()
+ src = records.env
+ todo = defaultdict(set) # {model_name: ids}
+ done = defaultdict(set) # {model_name: ids}
+ todo[records._name].update(records._ids)
while todo:
- record = todo.pop()
- if record not in done:
- done.add(record)
- target = record.with_env(env)
- for name in record._cache:
- field = record._fields[name]
- value = record[name]
- if isinstance(value, BaseModel):
- todo.update(value)
- target._cache[name] = field.convert_to_cache(value, target, validate=False)
+ model_name = next(iter(todo))
+ record_ids = todo.pop(model_name) - done[model_name]
+ done[model_name].update(record_ids)
+ for name, field in src[model_name]._fields.items():
+ src_cache = src.cache[field]
+ dst_cache = env.cache[field]
+ for record_id in record_ids:
+ if record_id in src_cache:
+ # copy the cached value as such
+ value = dst_cache[record_id] = src_cache[record_id]
+ if field.relational and isinstance(value, tuple):
+ todo[field.comodel_name].update(value)
def resolve_mro(model, name, predicate):