From 9778533d7ee241541deca9614cd5e8660f75607c Mon Sep 17 00:00:00 2001
From: Dhruti Shastri
Date: Wed, 6 Feb 2013 11:48:32 +0530
Subject: [PATCH 01/47] [res_country] : Create country without code or remove
country code raise error
bzr revid: dhs@tinyerp.com-20130206061832-r9s9m9oco6uwdg4j
---
openerp/addons/base/res/res_country.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py
index 6ed4e76fa78..29d6c8ab3b7 100644
--- a/openerp/addons/base/res/res_country.py
+++ b/openerp/addons/base/res/res_country.py
@@ -71,13 +71,13 @@ addresses belonging to this country.\n\nYou can use the python-style string pate
name_search = location_name_search
def create(self, cursor, user, vals, context=None):
- if vals.get('code'):
+ if vals.get('code',False):
vals['code'] = vals['code'].upper()
return super(Country, self).create(cursor, user, vals,
context=context)
def write(self, cursor, user, ids, vals, context=None):
- if 'code' in vals:
+ if vals.get('code',False):
vals['code'] = vals['code'].upper()
return super(Country, self).write(cursor, user, ids, vals,
context=context)
From 2e3ec5e2e92b76703eecb76d31c085157aba5b98 Mon Sep 17 00:00:00 2001
From: Mohammed Shekha
Date: Wed, 3 Jul 2013 18:42:23 +0530
Subject: [PATCH 02/47] [FIX]Fixed the issue of last element of grouped row
removed, due to which grouped total information also got lost.
bzr revid: msh@openerp.com-20130703131223-bwu6hl8v5y5sjt5w
---
addons/web/static/src/js/view_list.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 74c2fc47aee..a9f110eac28 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -1280,7 +1280,8 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
}
},
close: function () {
- this.$row.children().last().empty();
+ this.$row.children().last().find('button').remove();
+ this.$row.children().last().find('span').remove();
this.records.reset();
},
/**
From 7ecff57509ec7d1e17760341f82c6c0011f097ac Mon Sep 17 00:00:00 2001
From: "Pinakin Nayi (OpenERP)"
Date: Fri, 6 Sep 2013 16:12:51 +0530
Subject: [PATCH 03/47] [FIX]res_user : replace field to show latest connection
in tree view
bzr revid: pna@tinyerp.com-20130906104251-lf0584j6q5hm2sfm
---
openerp/addons/base/res/res_users_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openerp/addons/base/res/res_users_view.xml b/openerp/addons/base/res/res_users_view.xml
index 7e83b43179f..5708dbca21e 100644
--- a/openerp/addons/base/res/res_users_view.xml
+++ b/openerp/addons/base/res/res_users_view.xml
@@ -194,7 +194,7 @@
-
+
From f07e01f491c38a278c844b25775bd477fd704d32 Mon Sep 17 00:00:00 2001
From: Denis Ledoux
Date: Fri, 25 Oct 2013 17:38:29 +0200
Subject: [PATCH 04/47] [ADD]mail: The announcement bar (blue bar) to inform
customers
bzr revid: dle@openerp.com-20131025153829-xu6mee27a4hajnk3
---
addons/mail/__openerp__.py | 2 ++
addons/mail/static/src/js/announcement.js | 21 +++++++++++++++++++++
addons/mail/static/src/js/mail.js | 1 +
addons/mail/static/src/xml/announcement.xml | 13 +++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 addons/mail/static/src/js/announcement.js
create mode 100644 addons/mail/static/src/xml/announcement.xml
diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py
index 63cd0888986..2939f9a8bb4 100644
--- a/addons/mail/__openerp__.py
+++ b/addons/mail/__openerp__.py
@@ -87,10 +87,12 @@ Main Features
'static/src/js/mail.js',
'static/src/js/mail_followers.js',
'static/src/js/many2many_tags_email.js',
+ 'static/src/js/announcement.js',
],
'qweb': [
'static/src/xml/mail.xml',
'static/src/xml/mail_followers.xml',
+ 'static/src/xml/announcement.xml',
],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/static/src/js/announcement.js b/addons/mail/static/src/js/announcement.js
new file mode 100644
index 00000000000..7d16a4a1621
--- /dev/null
+++ b/addons/mail/static/src/js/announcement.js
@@ -0,0 +1,21 @@
+openerp_announcement = function(instance) {
+ var _t = instance.web._t;
+ instance.web.WebClient.include({
+ show_application: function() {
+ var self = this;
+ this._super();
+ var config_parameter = new instance.web.Model('ir.config_parameter');
+ return config_parameter.call('get_param', ['database.uuid', false]).then(function(result) {
+ var head = $('head');
+ head.append($('')
+ .attr({
+ rel : 'stylesheet',
+ type: 'text/css',
+ href: 'http://127.0.0.1.xip.io:8369/openerp_enterprise/'+result+'.css',
+ media: 'all',
+ })
+ );
+ });
+ },
+ });
+};
\ No newline at end of file
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 63581560810..96b2184ece9 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -6,6 +6,7 @@ openerp.mail = function (session) {
openerp_mail_followers(session, mail); // import mail_followers.js
openerp_FieldMany2ManyTagsEmail(session); // import manyy2many_tags_email.js
+ openerp_announcement(session);
/**
* ------------------------------------------------------------
diff --git a/addons/mail/static/src/xml/announcement.xml b/addons/mail/static/src/xml/announcement.xml
new file mode 100644
index 00000000000..cda0569d7ee
--- /dev/null
+++ b/addons/mail/static/src/xml/announcement.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From eba79e46a53f0977b08af108c1fb2f0ad5421ee9 Mon Sep 17 00:00:00 2001
From: Christophe Simonis
Date: Mon, 2 Dec 2013 12:45:16 +0100
Subject: [PATCH 05/47] [FIX] mail: correct announcement bar
bzr revid: chs@openerp.com-20131202114516-u0u44l3xbkk1zcbx
---
addons/mail/__openerp__.py | 1 +
addons/mail/static/src/css/announcement.css | 3 +
addons/mail/static/src/js/announcement.js | 65 +++++++++++++++------
addons/mail/static/src/xml/announcement.xml | 22 +++----
4 files changed, 62 insertions(+), 29 deletions(-)
create mode 100644 addons/mail/static/src/css/announcement.css
diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py
index 2939f9a8bb4..47a77e0d9cb 100644
--- a/addons/mail/__openerp__.py
+++ b/addons/mail/__openerp__.py
@@ -81,6 +81,7 @@ Main Features
'css': [
'static/src/css/mail.css',
'static/src/css/mail_group.css',
+ 'static/src/css/announcement.css',
],
'js': [
'static/lib/jquery.expander/jquery.expander.js',
diff --git a/addons/mail/static/src/css/announcement.css b/addons/mail/static/src/css/announcement.css
new file mode 100644
index 00000000000..5d2a0ecba44
--- /dev/null
+++ b/addons/mail/static/src/css/announcement.css
@@ -0,0 +1,3 @@
+.openerp .annoucement_bar {
+ display: none;
+}
diff --git a/addons/mail/static/src/js/announcement.js b/addons/mail/static/src/js/announcement.js
index 7d16a4a1621..e05d959dede 100644
--- a/addons/mail/static/src/js/announcement.js
+++ b/addons/mail/static/src/js/announcement.js
@@ -1,21 +1,50 @@
openerp_announcement = function(instance) {
- var _t = instance.web._t;
- instance.web.WebClient.include({
- show_application: function() {
- var self = this;
- this._super();
- var config_parameter = new instance.web.Model('ir.config_parameter');
- return config_parameter.call('get_param', ['database.uuid', false]).then(function(result) {
- var head = $('head');
- head.append($('')
- .attr({
- rel : 'stylesheet',
- type: 'text/css',
- href: 'http://127.0.0.1.xip.io:8369/openerp_enterprise/'+result+'.css',
- media: 'all',
- })
- );
- });
+ instance.web.WebClient.include({
+ show_application: function() {
+ return $.when(this._super.apply(this, arguments)).then(this.proxy('show_annoucement_bar'));
},
+ _ab_location: function(dbuuid) {
+ return _.str.sprintf('https://services.openerp.com/openerp-enterprise/ab/css/%s.css', dbuuid);
+ },
+ show_annoucement_bar: function() {
+ if (this.session.get_cookie('ab') === 'c') {
+ return;
+ }
+ var self = this;
+ var config_parameter = new instance.web.Model('ir.config_parameter');
+ var $bar = this.$el.find('.announcement_bar');
+ return config_parameter.call('get_param', ['database.uuid', false]).then(function(dbuuid) {
+ if (!dbuuid) {
+ return;
+ }
+ var $css = $('').attr({
+ rel : 'stylesheet',
+ type: 'text/css',
+ media: 'all',
+ href: self._ab_location(dbuuid)
+ });
+ $css.on('load', function() {
+ var close = function() {
+ var data = window.getComputedStyle($bar.find('.data')[0], ':before').content || "'{}'";
+ var delim = data[0];
+ data = data.slice(1, data.length - 1).replace(new RegExp('\\\\'+delim, 'g'), delim);
+ try {
+ data = JSON.parse(data);
+ } catch(_e) {
+ data = {};
+ }
+ var ttl = data.close_ttl || 24*60*60;
+ self.session.set_cookie('ab', 'c', ttl);
+
+ $bar.slideUp('slow');
+ };
+ $bar.on('dblclick', close);
+ $bar.find('.close').on('click', close);
+ self.trigger('ab_loaded', $bar);
+ });
+
+ $('head').append($css);
+ });
+ }
});
-};
\ No newline at end of file
+};
diff --git a/addons/mail/static/src/xml/announcement.xml b/addons/mail/static/src/xml/announcement.xml
index cda0569d7ee..1eabb5ebc6b 100644
--- a/addons/mail/static/src/xml/announcement.xml
+++ b/addons/mail/static/src/xml/announcement.xml
@@ -1,13 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
From b3391cd7fef94c4e82b4330db37213c08740d055 Mon Sep 17 00:00:00 2001
From: "Mohammed Shekha (OpenERP)"
Date: Tue, 3 Dec 2013 18:08:56 +0530
Subject: [PATCH 06/47] [FIX]Web: Fixed the issue of immediate update of
many2one field when many2one object name has been changed from follow button
popup, reloaded the record from database forcefull to update dataaset, do not
call form-blur when follow button is clicked, also do not evict record when
record is still not created.
bzr revid: msh@openerp.com-20131203123856-gce4li1igo9k1mak
---
addons/web/static/src/js/data.js | 9 +++++++++
addons/web/static/src/js/view_form.js | 7 +++++++
2 files changed, 16 insertions(+)
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js
index d497cf25343..e1290deac02 100644
--- a/addons/web/static/src/js/data.js
+++ b/addons/web/static/src/js/data.js
@@ -920,6 +920,15 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
* @param {Object} id record to remove from the BDS's cache
*/
evict_record: function (id) {
+ // Don't evict records which haven't yet been saved: there is no more
+ // recent data on the server (and there potentially isn't any data),
+ // and this breaks the assumptions of other methods (that the data
+ // for new and altered records is both in the cache and in the to_write
+ // or to_create collection)
+ if (_(this.to_create.concat(this.to_write)).find(function (record) {
+ return record.id === id; })) {
+ return;
+ }
for(var i=0, len=this.cache.length; i
Date: Thu, 5 Dec 2013 13:11:18 +0100
Subject: [PATCH 07/47] [IMP] Performance: by-pass call to _apply_ir_rules for
user admin
bzr revid: cto@openerp.com-20131205121118-0f9087y2huo7y44l
---
openerp/osv/orm.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py
index 9e6ee64d87f..306a2d50951 100644
--- a/openerp/osv/orm.py
+++ b/openerp/osv/orm.py
@@ -4711,6 +4711,9 @@ class BaseModel(object):
:param query: the current query object
"""
+ if uid == SUPERUSER_ID:
+ return
+
def apply_rule(added_clause, added_params, added_tables, parent_model=None, child_object=None):
""" :param string parent_model: string of the parent model
:param model child_object: model object, base of the rule application
From 025657653c9c4a60f9545228af7ea6ff79273831 Mon Sep 17 00:00:00 2001
From: Cecile Tonglet
Date: Fri, 6 Dec 2013 11:20:51 +0100
Subject: [PATCH 08/47] [FIX] field email_from in crm.lead form view should
have a widget email
bzr revid: cto@openerp.com-20131206102051-cls1gh78ze2olst9
---
addons/crm/crm_lead_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 642e9ef6585..7c087ebd5a8 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -412,7 +412,7 @@
on_change="onchange_partner_id(partner_id, email_from)"
string="Customer"
context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
-
+
From 2e197cbb98a14bb96302136cee9ecab75a68159f Mon Sep 17 00:00:00 2001
From: Cecile Tonglet
Date: Mon, 9 Dec 2013 15:11:11 +0100
Subject: [PATCH 09/47] [IMP] Batch for the computation of function's stored
values is now customizable
bzr revid: cto@openerp.com-20131209141111-tbg9x1h8l6neu0ml
---
openerp/osv/orm.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py
index 9e6ee64d87f..5c9c7802863 100644
--- a/openerp/osv/orm.py
+++ b/openerp/osv/orm.py
@@ -79,6 +79,9 @@ from openerp.tools import SKIPPED_ELEMENT_TYPES
regex_order = re.compile('^(([a-z0-9_]+|"[a-z0-9_]+")( *desc| *asc)?( *, *|))+$', re.I)
regex_object_name = re.compile(r'^[a-z0-9_.]+$')
+# TODO for trunk, raise the value to 1000
+AUTOINIT_RECALCULATE_STORED_FIELDS = 40
+
def transfer_field_to_modifiers(field, modifiers):
default_values = {}
state_exceptions = {}
@@ -2794,8 +2797,8 @@ class BaseModel(object):
cr.execute('select id from '+self._table)
ids_lst = map(lambda x: x[0], cr.fetchall())
while ids_lst:
- iids = ids_lst[:40]
- ids_lst = ids_lst[40:]
+ iids = ids_lst[:AUTOINIT_RECALCULATE_STORED_FIELDS]
+ ids_lst = ids_lst[AUTOINIT_RECALCULATE_STORED_FIELDS:]
res = f.get(cr, self, iids, k, SUPERUSER_ID, {})
for key, val in res.items():
if f._multi:
From 68aac8e85515f69b98492fd4c20a62004086595a Mon Sep 17 00:00:00 2001
From: Michel Meyer
Date: Mon, 9 Dec 2013 16:35:19 +0100
Subject: [PATCH 10/47] [FIX] events handling ordering courtesy of Michel Meyer
lead to errors during the validation of rows in list o2ms.
See https://bugs.launchpad.net/openerp-web/+bug/1182101/comments/20
for an extensive description of the events and issue.
bzr revid: xmo@openerp.com-20131209153519-n05bdx15t75dh7gf
---
addons/web/static/src/js/view_form.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 080cd6f70aa..3893626520f 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -3822,7 +3822,6 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
GroupsType: instance.web.form.One2ManyGroups,
ListType: instance.web.form.One2ManyList
}));
- this.on('edit:before', this, this.proxy('_before_edit'));
this.on('edit:after', this, this.proxy('_after_edit'));
this.on('save:before cancel:before', this, this.proxy('_before_unedit'));
@@ -3943,11 +3942,10 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
});
},
- _before_edit: function () {
+ _after_edit: function () {
this.__ignore_blur = false;
this.editor.form.on('blurred', this, this._on_form_blur);
- },
- _after_edit: function () {
+
// The form's blur thing may be jiggered during the edition setup,
// potentially leading to the o2m instasaving the row. Cancel any
// blurring triggered the edition startup here
From 3b328aaab4d6b1f1ad6416e299b760b1658730fd Mon Sep 17 00:00:00 2001
From: Cecile Tonglet
Date: Mon, 9 Dec 2013 16:48:57 +0100
Subject: [PATCH 11/47] [FIX] Trigger stored field recalculation for inherited
records
The create() method implicitly creates record on objects of the _inherits.
Therefore, in order to make the trigger on linked field works, we should
include all the _inherits values (field that makes the link to the rel
record) because they are created implicitly.
bzr revid: cto@openerp.com-20131209154857-788f94w0kh6ef5pp
---
openerp/osv/orm.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py
index 7ecf4afc6cd..5f7403ee223 100644
--- a/openerp/osv/orm.py
+++ b/openerp/osv/orm.py
@@ -4487,7 +4487,9 @@ class BaseModel(object):
self._validate(cr, user, [id_new], context)
if not context.get('no_store_function', False):
- result += self._store_get_values(cr, user, [id_new], vals.keys(), context)
+ result += self._store_get_values(cr, user, [id_new],
+ list(set(vals.keys() + self._inherits.values())),
+ context)
result.sort()
done = []
for order, object, ids, fields2 in result:
From f8b889e1db02e7b807812b276825a964520eced9 Mon Sep 17 00:00:00 2001
From: Christophe Simonis
Date: Mon, 9 Dec 2013 20:24:00 +0100
Subject: [PATCH 12/47] [IMP] mail: announcement bar only for screen
bzr revid: chs@openerp.com-20131209192400-01jpkaofq1arqekz
---
addons/mail/static/src/js/announcement.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mail/static/src/js/announcement.js b/addons/mail/static/src/js/announcement.js
index e05d959dede..b7a2839ac43 100644
--- a/addons/mail/static/src/js/announcement.js
+++ b/addons/mail/static/src/js/announcement.js
@@ -20,7 +20,7 @@ openerp_announcement = function(instance) {
var $css = $('').attr({
rel : 'stylesheet',
type: 'text/css',
- media: 'all',
+ media: 'screen',
href: self._ab_location(dbuuid)
});
$css.on('load', function() {
From 5520d73d5fc062bdef2e32dba02a79aa831d1f04 Mon Sep 17 00:00:00 2001
From: Christophe Simonis
Date: Mon, 9 Dec 2013 20:24:50 +0100
Subject: [PATCH 13/47] [IMP] mail: announcement bar: no dblclick
bzr revid: chs@openerp.com-20131209192450-zacfq6i0xli7vjju
---
addons/mail/static/src/js/announcement.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/addons/mail/static/src/js/announcement.js b/addons/mail/static/src/js/announcement.js
index b7a2839ac43..f61cf534010 100644
--- a/addons/mail/static/src/js/announcement.js
+++ b/addons/mail/static/src/js/announcement.js
@@ -38,7 +38,6 @@ openerp_announcement = function(instance) {
$bar.slideUp('slow');
};
- $bar.on('dblclick', close);
$bar.find('.close').on('click', close);
self.trigger('ab_loaded', $bar);
});
From c8e3fe44d81820a392938ed27a8c2890ba059275 Mon Sep 17 00:00:00 2001
From: Antony Lesuisse
Date: Tue, 10 Dec 2013 00:25:10 +0100
Subject: [PATCH 14/47] [FIX] web_linkedin dependencies
bzr revid: al@openerp.com-20131209232510-2ibdkr3846ksb75y
---
addons/web_linkedin/__openerp__.py | 2 +-
addons/web_linkedin/web_linkedin.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/addons/web_linkedin/__openerp__.py b/addons/web_linkedin/__openerp__.py
index 6ce78cfca47..508ca240780 100644
--- a/addons/web_linkedin/__openerp__.py
+++ b/addons/web_linkedin/__openerp__.py
@@ -10,7 +10,7 @@ OpenERP Web LinkedIn module.
This module provides the Integration of the LinkedIn with OpenERP.
""",
'data': ['web_linkedin_view.xml'],
- 'depends' : ['crm'],
+ 'depends' : ['web','crm'],
'js': ['static/src/js/*.js'],
'css': ['static/src/css/*.css'],
'qweb': ['static/src/xml/*.xml'],
diff --git a/addons/web_linkedin/web_linkedin.py b/addons/web_linkedin/web_linkedin.py
index 92adb30d3dd..bacfaa2a573 100644
--- a/addons/web_linkedin/web_linkedin.py
+++ b/addons/web_linkedin/web_linkedin.py
@@ -24,6 +24,7 @@ import urllib2
from urlparse import urlparse, urlunparse
import openerp
+import openerp.addons.web
from openerp.osv import fields, osv
class Binary(openerp.addons.web.http.Controller):
@@ -91,4 +92,4 @@ class web_linkedin_fields(osv.Model):
'linkedin_url': fields.char(string="LinkedIn url", size=100, store=True),
'linkedin_public_url': fields.function(_get_url, type='text', string="LinkedIn url",
help="This url is set automatically when you join the partner with a LinkedIn account."),
- }
\ No newline at end of file
+ }
From 029c866b8c68a7eb15a04ee1e42fac7c69889aa4 Mon Sep 17 00:00:00 2001
From: Xavier Morel
Date: Tue, 10 Dec 2013 10:30:55 +0100
Subject: [PATCH 15/47] [FIX] issue when tabbing too much at end of editable
list row
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Tabbing is intercepted by keydown_TAB, which — if the current cell is
the last active field of the row — will then call _next:476. _next
then calls save_edition:300 which "takes a lock" (more precisely
serializes access to its body) and within its body checks if an
edition is active (:303) and returns immediately if not (:304).
The problem here is when a second tab event arrives during the
potentially extremely long save_edition body (since for toplevel lists
it needs to perform a complete RPC call): the overall state of the
list has not changed so the second event *also* goes into _next, then
into save_edition. There it's serialized with the ongoing call and
thus inactive until said ongoing call's termination, and reaches the
body after the current edition has been wound down. As a result, the
body of _next (:408) gets the resolution of ``$.when()``, which is
``null`` and the first condition blows up.
There are 3 possible ways to fix this:
* adding a check in keydown_TAB's handler to see whether a _next call
is ongoing. This requires adding a state flag to the object and does
not protect (or cooperate with) _next calls from outside this
specific handler, unless they are modified in turn.
* alter save_edition to *fail* in case there's no ongoing edition:
this part was originally in ensure_saved which does not care whether
a save was necessary or not and does not propagate save information,
so ``$.when()`` made sense. In save_edition, there are really 3
different outcomes: the save succeeded, the save failed (or
potentially part of save's postprocessing failed, for the current
implementation) and the save was unnecessary. But deferred only
provide 1 bit of state (success or failure), so the last state has
to be merged into either success or failure.
Both make sense, to an extent. Changing from one to the other (as
necessary here) could break existing code and have more extensive
effects than expected.
* the simplest and least far-raging change is to just alter the
save_edition().then handler to ignore cases where save_edition()
results in no saveinfo, this can be assumed to be a
bailed-out/unnecessary save call.
For simplicity, the 3rd solution was picked here although with more
extensive tests &al I'd have preferred trying out 2nd.
lp bug: https://launchpad.net/bugs/1253899 fixed
bzr revid: xmo@openerp.com-20131210093055-207fevqc1npy7fwr
---
addons/web/static/src/js/view_list_editable.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index 512fc4ff373..f00296eec40 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -477,6 +477,7 @@ openerp.web.list_editable = function (instance) {
next_record = next_record || 'succ';
var self = this;
return this.save_edition().then(function (saveInfo) {
+ if (!saveInfo) { return null; }
if (saveInfo.created) {
return self.start_edition();
}
From f32b87e14d7b1c587389eaabde676060e54b6fb3 Mon Sep 17 00:00:00 2001
From: Martin Trigaux
Date: Tue, 10 Dec 2013 12:24:44 +0100
Subject: [PATCH 16/47] [FIX] css: avoid tabs in row below to move when
selected (opw 601379)
bzr revid: mat@openerp.com-20131210112444-pk9yh8bke1z7eerr
---
addons/web/static/src/css/base.css | 4 ++++
addons/web/static/src/css/base.sass | 3 +++
2 files changed, 7 insertions(+)
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index edd4d4869a5..fabb8503b34 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -623,6 +623,10 @@
display: block;
color: gray;
}
+.openerp .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active {
+ border-bottom: none;
+ padding-bottom: 1px;
+}
.openerp .oe_notebook > li.ui-tabs-active > a {
color: #4c4c4c;
}
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index 4814e64c590..c54cd2920c0 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -561,6 +561,9 @@ $sheet-padding: 16px
text-decoration: none
background-color: #eee
border-color: #eee #eee #ddd
+ .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active
+ border-bottom: none
+ padding-bottom: 1px
.oe_notebook > li.ui-state-active > a, .oe_notebook > li.ui-state-active > a:hover
background-color: #ffffff
border: 1px solid #ddd
From 9322b677aa7848ab6ece42786f46137ff7eea05c Mon Sep 17 00:00:00 2001
From: Xavier Morel
Date: Tue, 10 Dec 2013 13:47:55 +0100
Subject: [PATCH 17/47] [FIX] weird behavior when drag&dropping a row during
edition in editable listview
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When dropping, would simultanously stop the edition and try a write
(so 2 writes on the same record) and generally screw up the state of
all the things, ending up with an empty row and a weird (and
incorrect) warning.
This can be fixed by preventing resequencing during the creation or
edition of a record (row) inline.
For simplicity, implemented by looking up .ui-sortable descendants —
there are no utility methods for handling that and, aside from the
class, there's no good way to know if sortability was enabled on a
list body or not (as far as I can see, jquery-ui's sortable has no API
to query that) — and using jquery-ui's sortable API for enabling and
disabling sortable on the fly.
lp bug: https://launchpad.net/bugs/1257753 fixed
bzr revid: xmo@openerp.com-20131210124755-ugr3ehf744qoh1o5
---
addons/web/static/src/js/view_list_editable.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index f00296eec40..f2fd8974d81 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -50,8 +50,10 @@ openerp.web.list_editable = function (instance) {
});
this.on('edit:after', this, function () {
self.$el.add(self.$buttons).addClass('oe_editing');
+ self.$('.ui-sortable').sortable('disable');
});
this.on('save:after cancel:after', this, function () {
+ self.$('.ui-sortable').sortable('enable');
self.$el.add(self.$buttons).removeClass('oe_editing');
});
},
From 75548727ec2d676d1a64e2ce6567b097a17cc0e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Tue, 10 Dec 2013 14:38:30 +0100
Subject: [PATCH 18/47] [FIX] mass_mailing: fixed label for template choice
when creating a new wave of mass mailing
bzr revid: tde@openerp.com-20131210133830-rhm6t1unz6urrxxj
---
addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml b/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml
index e307bdd8909..d320520cbd2 100644
--- a/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml
+++ b/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml
@@ -42,7 +42,7 @@
-
+
Date: Tue, 10 Dec 2013 14:39:34 +0100
Subject: [PATCH 19/47] [FIX] mass_mailing: fixed model used for the mass
mailing itself when creating a new wave. It was receiving active_model aka
mass.mailing.create instead of the correct target model (ex res.partner when
mailing partners). Also updated a field string to be clearer.
bzr revid: tde@openerp.com-20131210133934-xtydu43fkh7htxdg
---
addons/mass_mailing/wizard/mail_mass_mailing_create_segment.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.py b/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.py
index 9ea0d8aa1c5..4359d6c3e7b 100644
--- a/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.py
+++ b/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.py
@@ -36,7 +36,7 @@ class MailMassMailingCreate(osv.TransientModel):
required=True,
),
'model_id': fields.many2one(
- 'ir.model', 'Document',
+ 'ir.model', 'Document Type',
required=True,
help='Document on which the mass mailing will run. This must be a '
'valid OpenERP model.',
@@ -116,6 +116,7 @@ class MailMassMailingCreate(osv.TransientModel):
'default_template_id': wizard.template_id.id,
'default_use_mass_mailing_campaign': True,
'default_use_active_domain': True,
+ 'default_model': wizard.model_id.model,
'default_active_domain': wizard.domain,
'default_mass_mailing_campaign_id': wizard.mass_mailing_campaign_id.id,
'default_mass_mailing_id': wizard.mass_mailing_id.id,
From 7f7e698febb7813bbd38bab6920fd0f12ced5ed5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Tue, 10 Dec 2013 15:16:46 +0100
Subject: [PATCH 20/47] [FIX] mass_mailing: wave creation wizard: fixed closing
button jumping after setting the wave name
bzr revid: tde@openerp.com-20131210141646-17y49b7xvckepogz
---
.../mass_mailing/wizard/mail_mass_mailing_create_segment.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml b/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml
index d320520cbd2..ac313dea78b 100644
--- a/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml
+++ b/addons/mass_mailing/wizard/mail_mass_mailing_create_segment.xml
@@ -55,8 +55,7 @@
-
+
Please choose the name of the mailing.
From 989a0d78902885b8faa73f3ddbf72e43c8655f13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Tue, 10 Dec 2013 15:17:04 +0100
Subject: [PATCH 21/47] [IMP] mass_mailing: added a link to create a wave
directly from the kanban view
bzr revid: tde@openerp.com-20131210141704-u9t6zlfypmi1wba3
---
addons/mass_mailing/mass_mailing_view.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/addons/mass_mailing/mass_mailing_view.xml b/addons/mass_mailing/mass_mailing_view.xml
index f0c27f42a4a..c9594179a72 100644
--- a/addons/mass_mailing/mass_mailing_view.xml
+++ b/addons/mass_mailing/mass_mailing_view.xml
@@ -252,6 +252,9 @@