[MERGE] forward port branch 10.0 up to cb1cfadda2

This commit is contained in:
Christophe Simonis
2017-10-09 12:44:22 +02:00
21 changed files with 186 additions and 26 deletions
+1 -1
View File
@@ -1472,7 +1472,7 @@ class Meeting(models.Model):
@api.multi
def read(self, fields=None, load='_classic_read'):
fields2 = fields and fields[:] or None
EXTRAFIELDS = ('privacy', 'user_id', 'duration', 'allday', 'start', 'start_date', 'start_datetime', 'rrule')
EXTRAFIELDS = ('privacy', 'user_id', 'duration', 'allday', 'start', 'rrule')
for f in EXTRAFIELDS:
if fields and (f not in fields):
fields2.append(f)
+14
View File
@@ -23,6 +23,20 @@ class TestCalendar(TransactionCase):
'name': 'Technical Presentation'
})
def test_calender_simple_event(self):
m = self.CalendarEvent.create({
'name': "Test compute",
'start': '2017-07-12 14:30:00',
'allday': False,
'stop': '2017-07-12 15:00:00',
})
self.assertEqual(
(m.start_datetime, m.stop_datetime),
(u'2017-07-12 14:30:00', u'2017-07-12 15:00:00'),
"Sanity check"
)
def test_calender_event(self):
# Now I will set recurrence for this event to occur monday and friday of week
data = {
+1 -1
View File
@@ -32,7 +32,7 @@
<field name="applicability">accounts</field>
</record>
<record id="account_tag_8" model="account.account.tag">
<field name="name">Algemen kosten</field>
<field name="name">Algemene kosten</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_9" model="account.account.tag">
+3 -3
View File
@@ -116,7 +116,7 @@
</div>
</div>
<notebook>
<page string="Settings">
<page name="settings" string="Settings">
<group>
<field name="user_id" string="Project Manager"
attrs="{'readonly':[('active','=',False)]}"/>
@@ -132,7 +132,7 @@
</group>
</group>
</page>
<page string="Emails" attrs="{'invisible': [('alias_domain', '=', False)]}">
<page name="emails" string="Emails" attrs="{'invisible': [('alias_domain', '=', False)]}">
<group name="group_alias">
<label for="alias_name" string="Email Alias"/>
<div name="alias_def">
@@ -391,7 +391,7 @@ action = model.activate_sample_project()
<field name="description" type="html"/>
<div class="oe_clear"/>
</page>
<page string="Extra Info">
<page name="extra_info" string="Extra Info">
<group>
<group>
<field name="sequence" groups="base.group_no_one"/>
+3 -3
View File
@@ -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}
@@ -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;
}
@@ -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:
@@ -338,4 +338,19 @@
</t>
</template>
<template id="not_subscribed" name="Email address was not subscribed">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<div class="container">
<p>
The address <t t-esc="partner_id.email"/> is already
unsubscribed or was never subscribed to the mailing
list, you may want to check that the address was
correct.
</p>
</div>
</div>
</t>
</template>
</odoo>
+21
View File
@@ -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
+14
View File
@@ -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
+16
View File
@@ -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
+4 -1
View File
@@ -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
+3 -1
View File
@@ -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
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
+1
View File
@@ -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
+15
View File
@@ -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
+11
View File
@@ -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
+12
View File
@@ -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
+11
View File
@@ -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
+11
View File
@@ -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
@@ -79,6 +79,7 @@
<field name="name">IDR</field>
<field name="symbol">Rp</field>
<field name="rounding">0.01</field>
<field name="position">before</field>
<field name="active" eval="False"/>
</record>
+16 -11
View File
@@ -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):