Fabien Meghazi (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-update-jquery-and-company-fme into 
lp:openobject-addons.

Requested reviews:
  Xavier (Open ERP) (xmo)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-update-jquery-and-company-fme/+merge/133066

See lp:~openerp-dev/openerp-web/trunk-update-jquery-and-company-fme into 
lp:openerp-web
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-update-jquery-and-company-fme/+merge/133066
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-update-jquery-and-company-fme.
=== modified file 'account/static/src/js/account_move_reconciliation.js'
--- account/static/src/js/account_move_reconciliation.js	2012-10-22 10:41:44 +0000
+++ account/static/src/js/account_move_reconciliation.js	2012-11-06 14:00:30 +0000
@@ -48,7 +48,7 @@
             this.last_group_by = group_by;
             this.old_search = _.bind(this._super, this);
             var mod = new instance.web.Model("account.move.line", context, domain);
-            return mod.call("list_partners_to_reconcile", []).pipe(function(result) {
+            return mod.call("list_partners_to_reconcile", []).then(function(result) {
                 var current = self.current_partner !== null ? self.partners[self.current_partner][0] : null;
                 self.partners = result;
                 var index = _.find(_.range(self.partners.length), function(el) {
@@ -74,7 +74,7 @@
                 return fct();
             } else {
                 return new instance.web.Model("res.partner").call("read",
-                    [self.partners[self.current_partner][0], ["last_reconciliation_date"]]).pipe(function(res) {
+                    [self.partners[self.current_partner][0], ["last_reconciliation_date"]]).then(function(res) {
                     self.last_reconciliation_date = 
                         instance.web.format_value(res.last_reconciliation_date, {"type": "datetime"}, _t("Never"));
                     return fct();
@@ -92,7 +92,7 @@
                 return false;
             }
 
-            new instance.web.Model("ir.model.data").call("get_object_reference", ["account", "action_view_account_move_line_reconcile"]).pipe(function(result) {
+            new instance.web.Model("ir.model.data").call("get_object_reference", ["account", "action_view_account_move_line_reconcile"]).then(function(result) {
                 var additional_context = _.extend({
                     active_id: ids[0],
                     active_ids: ids,
@@ -101,7 +101,7 @@
                 return self.rpc("/web/action/load", {
                     action_id: result[1],
                     context: additional_context
-                }).then(function (result) {
+                }).done(function (result) {
                     result.context = _.extend(result.context || {}, additional_context);
                     result.flags = result.flags || {};
                     result.flags.new_window = true;
@@ -116,7 +116,7 @@
         mark_as_reconciled: function() {
             var self = this;
             var id = self.partners[self.current_partner][0];
-            new instance.web.Model("res.partner").call("mark_as_reconciled", [[id]]).pipe(function() {
+            new instance.web.Model("res.partner").call("mark_as_reconciled", [[id]]).then(function() {
                 self.do_search(self.last_domain, self.last_context, self.last_group_by);
             });
         },

=== modified file 'auth_anonymous/static/src/js/auth_anonymous.js'
--- auth_anonymous/static/src/js/auth_anonymous.js	2012-08-24 18:27:43 +0000
+++ auth_anonymous/static/src/js/auth_anonymous.js	2012-11-06 14:00:30 +0000
@@ -3,7 +3,7 @@
     instance.web.Login.include({
         start: function() {
             var self = this;
-            return $.when(this._super()).pipe(function() {
+            return $.when(this._super()).then(function() {
                 var dblist = self._db_list || [];
                 if (!self.session.session_is_valid() && dblist.length === 1) {
                     self.remember_credentials = false;

=== modified file 'auth_oauth/static/src/js/auth_oauth.js'
--- auth_oauth/static/src/js/auth_oauth.js	2012-09-27 12:34:29 +0000
+++ auth_oauth/static/src/js/auth_oauth.js	2012-11-06 14:00:30 +0000
@@ -12,7 +12,7 @@
             } else if(this.params.oauth_error === 2) {
                 this.do_warn("Authentication error","");
             }
-            return d.then(this.do_oauth_load).fail(function() {
+            return d.done(this.do_oauth_load).fail(function() {
                 self.do_oauth_load([]);
             });
         },
@@ -23,7 +23,7 @@
         do_oauth_load: function() {
             var db = this.$("form [name=db]").val();
             if (db) {
-                this.rpc("/auth_oauth/list_providers", { dbname: db }).then(this.on_oauth_loaded);
+                this.rpc("/auth_oauth/list_providers", { dbname: db }).done(this.on_oauth_loaded);
             }
         },
         on_oauth_loaded: function(result) {

=== modified file 'auth_openid/static/src/js/auth_openid.js'
--- auth_openid/static/src/js/auth_openid.js	2012-10-03 12:34:12 +0000
+++ auth_openid/static/src/js/auth_openid.js	2012-11-06 14:00:30 +0000
@@ -69,7 +69,7 @@
     _check_error: function() {
         var self = this;
         if (this.params.loginerror !== undefined) {
-            this.rpc('/auth_openid/login/status', {}).then(function(result) {
+            this.rpc('/auth_openid/login/status', {}).done(function(result) {
                 if (_.contains(['success', 'failure'], result.status) && result.message) {
                     self.do_warn('Invalid OpenID Login', result.message);
                 }
@@ -106,7 +106,7 @@
 
     do_openid_login: function(db, openid_url) {
         var self = this;
-        this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}).then(function(result) {
+        this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}).done(function(result) {
             if (result.error) {
                 self.do_warn(result.title, result.error);
                 return;

=== modified file 'base_import/static/src/js/import.js'
--- base_import/static/src/js/import.js	2012-11-06 08:43:53 +0000
+++ base_import/static/src/js/import.js	2012-11-06 14:00:30 +0000
@@ -139,7 +139,7 @@
                 this._super(),
                 this.Import.call('create', [{
                     'res_model': this.res_model
-                }]).then(function (id) {
+                }]).done(function (id) {
                     self.id = id;
                     self.$('input[name=import_id]').val(id);
                 })
@@ -200,7 +200,7 @@
                 !this.$('input.oe_import_has_header').prop('checked'));
             this.Import.call(
                 'parse_preview', [this.id, this.import_options()])
-                .then(function (result) {
+                .done(function (result) {
                     var signal = result.error ? 'preview_failed' : 'preview_succeeded';
                     self[signal](result);
                 });
@@ -341,11 +341,11 @@
         },
         onvalidate: function () {
             return this.call_import({ dryrun: true })
-                .then(this.proxy('validated'));
+                .done(this.proxy('validated'));
         },
         onimport: function () {
             var self = this;
-            return this.call_import({ dryrun: false }).then(function (message) {
+            return this.call_import({ dryrun: false }).done(function (message) {
                 if (!_.any(message, function (message) {
                         return message.type === 'error' })) {
                     self['import_succeeded']();

=== modified file 'board/static/src/js/dashboard.js'
--- board/static/src/js/dashboard.js	2012-10-15 13:33:34 +0000
+++ board/static/src/js/dashboard.js	2012-11-06 14:00:30 +0000
@@ -46,7 +46,7 @@
                 delete(action.attrs.colspan);
                 var action_id = _.str.toNumber(action.attrs.name);
                 if (!_.isNaN(action_id)) {
-                    self.rpc('/web/action/load', {action_id: action_id}).then(function(result) {
+                    self.rpc('/web/action/load', {action_id: action_id}).done(function(result) {
                         self.on_load_action(result, column_index + '_' + action_index, action.attrs);
                     });
                 }
@@ -81,7 +81,7 @@
         this.rpc('/web/view/undo_custom', {
             view_id: this.view.fields_view.view_id,
             reset: true
-        }).then(this.do_reload);
+        }).done(this.do_reload);
     },
     on_change_layout: function() {
         var self = this;
@@ -242,7 +242,7 @@
             };
             var list = am.inner_widget.views.list;
             if (list) {
-                list.deferred.then(function() {
+                list.deferred.done(function() {
                     $(list.controller.groups).off('row_link').on('row_link', function(e, id) {
                         new_form_action(id);
                     });
@@ -250,7 +250,7 @@
             }
             var kanban = am.inner_widget.views.kanban;
             if (kanban) {
-                kanban.deferred.then(function() {
+                kanban.deferred.done(function() {
                     kanban.controller.open_record = function(id, editable) {
                         new_form_action(id, editable);
                     };
@@ -335,7 +335,7 @@
                 e.preventDefault();
                 self.add_dashboard();
             });
-        return this.load_data().then(this.proxy("render_data"));
+        return this.load_data().done(this.proxy("render_data"));
     },
     load_data:function(){
         var board = new instance.web.Model('board.board');
@@ -347,7 +347,7 @@
         return new instance.web.Model('ir.model.data')
                 .query(['res_id'])
                 .filter([['name','=','menu_reporting_dashboard']])
-                .first().pipe(function (result) {
+                .first().then(function (result) {
             var menu = _(dashboard_menu).chain()
                 .pluck('children')
                 .flatten(true)
@@ -382,7 +382,7 @@
             domain: domain,
             view_mode: view_parent.active_view,
             name: this.$el.find("input").val()
-        }).then(function(r) {
+        }).done(function(r) {
             if (r === false) {
                 self.do_warn("Could not add filter to dashboard");
             } else {

=== modified file 'edi/static/src/js/edi.js'
--- edi/static/src/js/edi.js	2012-10-15 13:33:34 +0000
+++ edi/static/src/js/edi.js	2012-11-06 14:00:30 +0000
@@ -15,7 +15,7 @@
         this._super();
         var self = this;
         var param = {"db": self.db, "token": self.token};
-        return self.rpc('/edi/get_edi_document', param).then(this.on_document_loaded, this.on_document_failed);
+        return self.rpc('/edi/get_edi_document', param).done(this.on_document_loaded).fail(this.on_document_failed);
     },
     on_document_loaded: function(docs){
         this.doc = docs[0];
@@ -108,7 +108,7 @@
 });
 
 openerp.edi.edi_view = function (db, token) {
-    openerp.session.session_bind().then(function () {
+    openerp.session.session_bind().done(function () {
         new openerp.edi.EdiView(null,db,token).appendTo($("body").addClass('openerp'));
     });
 }
@@ -149,11 +149,11 @@
     },
 
     do_import: function() {
-        this.rpc('/edi/import_edi_url', {url: this.url}).then(this.on_imported, this.on_imported_error);
+        this.rpc('/edi/import_edi_url', {url: this.url}).done(this.on_imported).fail(this.on_imported_error);
     },
     on_imported: function(response) {
         if ('action' in response) {
-            this.rpc("/web/session/save_session_action", {the_action: response.action}).then(function(key) {
+            this.rpc("/web/session/save_session_action", {the_action: response.action}).done(function(key) {
                 window.location = "/#sa="+encodeURIComponent(key);
             });
         }
@@ -188,7 +188,7 @@
 });
 
 openerp.edi.edi_import = function (url) {
-    openerp.session.session_bind().then(function () {
+    openerp.session.session_bind().done(function () {
         new openerp.edi.EdiImport(null,url).appendTo($("body").addClass('openerp'));
     });
 }

=== modified file 'google_docs/static/src/js/gdocs.js'
--- google_docs/static/src/js/gdocs.js	2012-11-01 09:20:13 +0000
+++ google_docs/static/src/js/gdocs.js	2012-11-06 14:00:30 +0000
@@ -16,9 +16,9 @@
             var view = self.getParent();
             var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
             if( !_.isEmpty(ids) ){
-                view.sidebar_context().then(function (context) {
+                view.sidebar_context().done(function (context) {
                     var ds = new instance.web.DataSet(this, 'ir.attachment', context);
-                    ds.call('google_doc_get', [view.dataset.model, ids, context]).then(function(r) {
+                    ds.call('google_doc_get', [view.dataset.model, ids, context]).done(function(r) {
                         if (r == 'False') {
                             var params = {
                                 error: response,

=== modified file 'hr_attendance/static/src/js/attendance.js'
--- hr_attendance/static/src/js/attendance.js	2012-09-24 05:17:24 +0000
+++ hr_attendance/static/src/js/attendance.js	2012-11-06 14:00:30 +0000
@@ -57,7 +57,7 @@
             var employee = new instance.web.DataSetSearch(self, 'hr.employee', self.session.user_context, [
                 ['user_id', '=', self.session.uid]
             ]);
-            return employee.read_slice(['id', 'name', 'state', 'last_sign', 'attendance_access']).pipe(function (res) {
+            return employee.read_slice(['id', 'name', 'state', 'last_sign', 'attendance_access']).then(function (res) {
                 if (_.isEmpty(res) )
                     return;
                 if (res[0].attendance_access == false){
@@ -75,7 +75,7 @@
         do_update: function () {
             this._super();
             var self = this;
-            this.update_promise = this.update_promise.then(function () {
+            this.update_promise = this.update_promise.done(function () {
                 if (self.attendanceslider)
                     return;
                 self.attendanceslider = new instance.hr_attendance.AttendanceSlider(self);

=== modified file 'hr_recruitment/static/src/js/hr_recruitment.js'
--- hr_recruitment/static/src/js/hr_recruitment.js	2012-08-24 18:27:43 +0000
+++ hr_recruitment/static/src/js/hr_recruitment.js	2012-11-06 14:00:30 +0000
@@ -16,7 +16,7 @@
 
             // Find their matching names
             var dataset = new openerp.web.DataSetSearch(self, 'hr.applicant_category', self.session.context, [['id', 'in', _.uniq(categ_ids)]]);
-            dataset.read_slice(['id', 'name']).then(function(result) {
+            dataset.read_slice(['id', 'name']).done(function(result) {
                 _.each(result, function(v, k) {
                     // Set the proper value in the DOM and display the element
                     self.$el.find('span[data-categ_id=' + v.id + ']').text(v.name);

=== modified file 'hr_timesheet_sheet/static/src/js/timesheet.js'
--- hr_timesheet_sheet/static/src/js/timesheet.js	2012-10-26 09:55:11 +0000
+++ hr_timesheet_sheet/static/src/js/timesheet.js	2012-11-06 14:00:30 +0000
@@ -46,7 +46,7 @@
             var commands = this.field_manager.get_field_value("timesheet_ids");
             this.res_o2m_drop.add(new instance.web.Model(this.view.model).call("resolve_2many_commands", ["timesheet_ids", commands, [], 
                     new instance.web.CompoundContext()]))
-                .then(function(result) {
+                .done(function(result) {
                 self.querying = true;
                 self.set({sheets: result});
                 self.querying = false;
@@ -57,7 +57,7 @@
             if (self.querying)
                 return;
             self.updating = true;
-            self.field_manager.set_values({timesheet_ids: self.get("sheets")}).then(function() {
+            self.field_manager.set_values({timesheet_ids: self.get("sheets")}).done(function() {
                 self.updating = false;
             });
         },
@@ -85,7 +85,7 @@
             var default_get;
             return this.render_drop.add(new instance.web.Model("hr.analytic.timesheet").call("default_get", [
                 ['account_id','general_account_id', 'journal_id','date','name','user_id','product_id','product_uom_id','to_invoice','amount','unit_amount'],
-                new instance.web.CompoundContext({'user_id': self.get('user_id')})]).pipe(function(result) {
+                new instance.web.CompoundContext({'user_id': self.get('user_id')})]).then(function(result) {
                 default_get = result;
                 // calculating dates
                 dates = [];
@@ -108,7 +108,7 @@
                 var account_ids = _.map(_.keys(accounts), function(el) { return el === "false" ? false : Number(el) });
 
                 return new instance.web.Model("hr.analytic.timesheet").call("multi_on_change_account_id", [[], account_ids,
-                    new instance.web.CompoundContext({'user_id': self.get('user_id')})]).pipe(function(accounts_defaults) {
+                    new instance.web.CompoundContext({'user_id': self.get('user_id')})]).then(function(accounts_defaults) {
                     accounts = _(accounts).chain().map(function(lines, account_id) {
                         account_defaults = _.extend({}, default_get, accounts_defaults[account_id]);
                         // group by days
@@ -136,7 +136,7 @@
 
                     // we need the name_get of the analytic accounts
                     return new instance.web.Model("account.analytic.account").call("name_get", [_.pluck(accounts, "account"),
-                        new instance.web.CompoundContext()]).pipe(function(result) {
+                        new instance.web.CompoundContext()]).then(function(result) {
                         account_names = {};
                         _.each(result, function(el) {
                             account_names[el[0]] = el[1];
@@ -146,7 +146,7 @@
                         });
                     });;
                 });
-            })).pipe(function(result) {
+            })).then(function(result) {
                 // we put all the gathered data in self, then we render
                 self.dates = dates;
                 self.accounts = accounts;
@@ -222,7 +222,7 @@
                     return;
                 }
                 var ops = self.generate_o2m_value();
-                new instance.web.Model("hr.analytic.timesheet").call("on_change_account_id", [[], id]).pipe(function(res) {
+                new instance.web.Model("hr.analytic.timesheet").call("on_change_account_id", [[], id]).then(function(res) {
                     var def = _.extend({}, self.default_get, res.value, {
                         name: self.description_line,
                         unit_amount: 0,

=== modified file 'mail/static/src/js/mail.js'
--- mail/static/src/js/mail.js	2012-11-05 13:01:30 +0000
+++ mail/static/src/js/mail.js	2012-11-06 14:00:30 +0000
@@ -356,7 +356,7 @@
                         this.context.default_parent_id, 
                         attachments,
                         this.parent_thread.context
-                    ]).then(function (record) {
+                    ]).done(function (record) {
                         var thread = self.parent_thread;
                         // create object and attach to the thread object
                         thread.message_fetch(false, false, [record], function (arg, data) {
@@ -744,7 +744,7 @@
             }
 
             // if this message is read, all childs message display is read
-            this.ds_notification.call('set_message_read', [ [this.id].concat( this.get_child_ids() ) , this.to_read, this.context]).pipe(function () {
+            this.ds_notification.call('set_message_read', [ [this.id].concat( this.get_child_ids() ) , this.to_read, this.context]).then(function () {
                 self.$el.removeClass(self.to_read ? 'oe_msg_unread':'oe_msg_read').addClass(self.to_read ? 'oe_msg_read':'oe_msg_unread');
                 self.to_read = !self.to_read;
             });
@@ -801,7 +801,7 @@
         on_vote: function (event) {
             event.stopPropagation();
             var self=this;
-            return this.ds_message.call('vote_toggle', [[self.id]]).pipe(function (vote) {
+            return this.ds_message.call('vote_toggle', [[self.id]]).then(function (vote) {
                 self.has_voted = vote;
                 self.vote_nb += self.has_voted ? 1 : -1;
                 self.display_vote();
@@ -826,7 +826,7 @@
             event.stopPropagation();
             var self=this;
             var button = self.$('.oe_star:first');
-            return this.ds_message.call('favorite_toggle', [[self.id]]).pipe(function (star) {
+            return this.ds_message.call('favorite_toggle', [[self.id]]).then(function (star) {
                 self.is_favorite=star;
                 if (self.is_favorite) {
                     button.addClass('oe_starred');
@@ -1111,7 +1111,7 @@
             var thread_level = this.options.display_indented_thread > this.thread_level ? this.options.display_indented_thread - this.thread_level : 0;
 
             return this.ds_message.call('message_read', [ids, fetch_domain, message_loaded_ids, thread_level, fetch_context, this.context.default_parent_id || undefined])
-                .then(callback ? _.bind(callback, this, arguments) : this.proxy('switch_new_message'));
+                .done(callback ? _.bind(callback, this, arguments) : this.proxy('switch_new_message'));
         },
 
         /**
@@ -1580,7 +1580,7 @@
         load_searchview: function (defaults, hidden) {
             var self = this;
             this.searchview = new session.web.SearchView(this, this.ds_msg, false, defaults || {}, hidden || false);
-            return this.searchview.appendTo(this.$('.oe_view_manager_view_search')).then(function () {
+            return this.searchview.appendTo(this.$('.oe_view_manager_view_search')).done(function () {
                 self.searchview.on('search_data', self, self.do_searchview_search);
             });
         },
@@ -1598,7 +1598,7 @@
                 domains: domains || [],
                 contexts: contexts || [],
                 group_by_seq: groupbys || []
-            }).then(function (results) {
+            }).done(function (results) {
                 self.search_results['context'] = results.context;
                 self.search_results['domain'] = results.domain;
                 self.root.destroy();

=== modified file 'mail/static/src/js/mail_followers.js'
--- mail/static/src/js/mail_followers.js	2012-10-29 11:21:17 +0000
+++ mail/static/src/js/mail_followers.js	2012-11-06 14:00:30 +0000
@@ -85,7 +85,7 @@
 
         read_value: function () {
             var self = this;
-            return this.ds_model.read_ids([this.view.datarecord.id], ['message_follower_ids']).pipe(function (results) {
+            return this.ds_model.read_ids([this.view.datarecord.id], ['message_follower_ids']).then(function (results) {
                 self.set_value(results[0].message_follower_ids);
             });
         },
@@ -98,9 +98,9 @@
         fetch_followers: function (value_) {
             this.value = value_ || {};
             return this.ds_follow.call('read', [this.value, ['name', 'user_ids']])
-                .pipe(this.proxy('display_followers'), this.proxy('fetch_generic'))
-                .pipe(this.proxy('display_buttons'))
-                .pipe(this.proxy('fetch_subtypes'));
+                .then(this.proxy('display_followers'), this.proxy('fetch_generic'))
+                .then(this.proxy('display_buttons'))
+                .then(this.proxy('fetch_subtypes'));
         },
 
         /** Read on res.partner failed: fall back on a generic case
@@ -109,10 +109,10 @@
         fetch_generic: function (error, event) {
             var self = this;
             event.preventDefault();
-            return this.ds_users.call('read', [this.session.uid, ['partner_id']]).pipe(function (results) {
+            return this.ds_users.call('read', [this.session.uid, ['partner_id']]).then(function (results) {
                 var pid = results['partner_id'][0];
                 self.message_is_follower = (_.indexOf(self.get('value'), pid) != -1);
-            }).pipe(self.proxy('display_generic'));
+            }).then(self.proxy('display_generic'));
         },
         _format_followers: function(count){
             // TDE note: why redefining _t ?
@@ -179,7 +179,7 @@
             var subtype_list_ul = this.$('.oe_subtype_list').empty();
             if (! this.message_is_follower) return;
             var context = new session.web.CompoundContext(this.build_context(), {});
-            this.ds_model.call('message_get_subscription_data', [[this.view.datarecord.id], context]).pipe(this.proxy('display_subtypes'));
+            this.ds_model.call('message_get_subscription_data', [[this.view.datarecord.id], context]).then(this.proxy('display_subtypes'));
         },
 
         /** Display subtypes: {'name': default, followed} */
@@ -206,7 +206,7 @@
                 $(record).attr('checked',false);
             });
             var context = new session.web.CompoundContext(this.build_context(), {});
-            return this.ds_model.call('message_unsubscribe_users', [[this.view.datarecord.id], [this.session.uid], context]).pipe(this.proxy('read_value'));
+            return this.ds_model.call('message_unsubscribe_users', [[this.view.datarecord.id], [this.session.uid], context]).then(this.proxy('read_value'));
         },
 
         do_update_subscription: function (event) {
@@ -221,7 +221,7 @@
 
             var context = new session.web.CompoundContext(this.build_context(), {});
             return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], this.message_is_follower ? checklist:undefined, context])
-                .pipe(this.proxy('read_value'));
+                .then(this.proxy('read_value'));
         },
     });
 };

=== modified file 'pad/static/src/js/pad.js'
--- pad/static/src/js/pad.js	2012-11-02 09:40:35 +0000
+++ pad/static/src/js/pad.js	2012-11-06 14:00:30 +0000
@@ -12,7 +12,7 @@
                         model: self.view.model,
                         field_name: self.name,
                         object_id: self.view.datarecord.id
-                    }}).then(function(data) {
+                    }}).done(function(data) {
                     if(data&&data.url){
                         _super(data.url);
                         self.renderElement();

=== modified file 'point_of_sale/static/src/js/devices.js'
--- point_of_sale/static/src/js/devices.js	2012-10-15 13:33:34 +0000
+++ point_of_sale/static/src/js/devices.js	2012-11-06 14:00:30 +0000
@@ -37,12 +37,11 @@
                 callbacks[i](params);
             }
 
-            this.connection.rpc('/pos/'+name, params || {}).then(function(result){
-                        ret.resolve(result);
-                    },
-                    function(error){
-                        ret.reject(error);
-                    });
+            this.connection.rpc('/pos/' + name, params || {}).done(function(result) {
+                ret.resolve(result);
+            }).fail(function(error) {
+                ret.reject(error);
+            });
             return ret;
         },
 
@@ -96,7 +95,7 @@
                 return this.weight;
             }else{
                 this.message('weighting_read_kg',{})
-                    .then(function(weight){
+                    .done(function(weight){
                         if(self.weighting && !self.bypass_proxy){
                             self.weight = weight;
                         }

=== modified file 'point_of_sale/static/src/js/models.js'
--- point_of_sale/static/src/js/models.js	2012-11-05 10:43:57 +0000
+++ point_of_sale/static/src/js/models.js	2012-11-06 14:00:30 +0000
@@ -59,10 +59,10 @@
             // Any change on this data made on the server is thus not reflected on the point of sale until it is relaunched. 
             // when all the data has loaded, we compute some stuff, and declare the Pos ready to be used. 
             $.when(this.load_server_data())
-                .then(function(){ 
+                .done(function(){
                     //self.log_loaded_data(); //Uncomment if you want to log the data to the console for easier debugging
                     self.ready.resolve();
-                },function(){
+                }).fail(function(){
                     //we failed to load some backend data, or the backend was badly configured.
                     //the error messages will be displayed in PosWidget
                     self.ready.reject();
@@ -78,7 +78,7 @@
             var self = this;
 
             var loaded = self.fetch('res.users',['name','company_id'],[['id','=',this.session.uid]]) 
-                .pipe(function(users){
+                .then(function(users){
                     self.set('user',users[0]);
 
                     return self.fetch('res.company',
@@ -93,19 +93,19 @@
                         'partner_id',
                     ],
                     [['id','=',users[0].company_id[0]]]);
-                }).pipe(function(companies){
+                }).then(function(companies){
                     self.set('company',companies[0]);
 
                     return self.fetch('res.partner',['contact_address'],[['id','=',companies[0].partner_id[0]]]);
-                }).pipe(function(company_partners){
+                }).then(function(company_partners){
                     self.get('company').contact_address = company_partners[0].contact_address;
 
                     return self.fetch('res.currency',['symbol','position'],[['id','=',self.get('company').currency_id[0]]]);
-                }).pipe(function(currencies){
+                }).then(function(currencies){
                     self.set('currency',currencies[0]);
 
                     return self.fetch('product.uom', null, null);
-                }).pipe(function(units){
+                }).then(function(units){
                     self.set('units',units);
                     var units_by_id = {};
                     for(var i = 0, len = units.length; i < len; i++){
@@ -114,15 +114,15 @@
                     self.set('units_by_id',units_by_id);
                     
                     return self.fetch('product.packaging', null, null);
-                }).pipe(function(packagings){
+                }).then(function(packagings){
                     self.set('product.packaging',packagings);
 
                     return self.fetch('res.users', ['name','ean13'], [['ean13', '!=', false]]);
-                }).pipe(function(users){
+                }).then(function(users){
                     self.set('user_list',users);
 
                     return self.fetch('account.tax', ['amount', 'price_include', 'type']);
-                }).pipe(function(taxes){
+                }).then(function(taxes){
                     self.set('taxes', taxes);
 
                     return self.fetch(
@@ -130,7 +130,7 @@
                         ['id', 'journal_ids','name','user_id','config_id','start_at','stop_at'],
                         [['state', '=', 'opened'], ['user_id', '=', self.session.uid]]
                     );
-                }).pipe(function(sessions){
+                }).then(function(sessions){
                     self.set('pos_session', sessions[0]);
 
                     return self.fetch(
@@ -141,7 +141,7 @@
                          'iface_print_via_proxy','iface_cashdrawer','state','sequence_id','session_ids'],
                         [['id','=', self.get('pos_session').config_id[0]]]
                     );
-                }).pipe(function(configs){
+                }).then(function(configs){
                     var pos_config = configs[0];
                     self.set('pos_config', pos_config);
                     self.iface_electronic_scale    =  !!pos_config.iface_electronic_scale;  
@@ -151,15 +151,15 @@
                     self.iface_cashdrawer          =  !!pos_config.iface_cashdrawer;
 
                     return self.fetch('sale.shop',[],[['id','=',pos_config.shop_id[0]]]);
-                }).pipe(function(shops){
+                }).then(function(shops){
                     self.set('shop',shops[0]);
 
                     return self.fetch('product.packaging',['ean','product_id']);
-                }).pipe(function(packagings){
+                }).then(function(packagings){
                     self.db.add_packagings(packagings);
 
                     return self.fetch('pos.category', ['id','name','parent_id','child_id','image'])
-                }).pipe(function(categories){
+                }).then(function(categories){
                     self.db.add_categories(categories);
 
                     return self.fetch(
@@ -169,7 +169,7 @@
                         [['pos_categ_id','!=', false],['sale_ok','=',true]],
                         {pricelist: self.get('shop').pricelist_id[0]} // context for price
                     );
-                }).pipe(function(products){
+                }).then(function(products){
                     self.db.add_products(products);
 
                     return self.fetch(
@@ -177,14 +177,14 @@
                         ['account_id','currency','journal_id','state','name','user_id','pos_session_id'],
                         [['state','=','open'],['pos_session_id', '=', self.get('pos_session').id]]
                     );
-                }).pipe(function(bank_statements){
+                }).then(function(bank_statements){
                     var journals = new Array();
                     _.each(bank_statements,function(statement) {
                         journals.push(statement.journal_id[0])
                     });
                     self.set('bank_statements', bank_statements);
                     return self.fetch('account.journal', undefined, [['id','in', journals]]);
-                }).pipe(function(journals){
+                }).then(function(journals){
                     self.set('journals',journals);
 
                     // associate the bank statements with their journals. 

=== modified file 'point_of_sale/static/src/js/screens.js'
--- point_of_sale/static/src/js/screens.js	2012-10-29 05:17:32 +0000
+++ point_of_sale/static/src/js/screens.js	2012-11-06 14:00:30 +0000
@@ -557,7 +557,7 @@
                 setTimeout(function(){
                     var def = job.fun();
                     if(def){
-                        def.then(run); 
+                        def.done(run);
                     }else{
                         run();
                     }
@@ -615,7 +615,7 @@
                 var def = new $.Deferred();
                 console.log("START");
                 self.pos.proxy.payment_request(self.pos.get('selectedOrder').getDueLeft())
-                    .then(function(ack){
+                    .done(function(ack){
                         if(ack === 'ok'){
                             self.queue.schedule(self.update);
                         }else if(ack.indexOf('error') === 0){
@@ -638,7 +638,7 @@
                     return def.resolve();
                 }
                 self.pos.proxy.payment_status()
-                    .then(function(status){
+                    .done(function(status){
                         if(status.status === 'paid'){
 
                             var currentOrder = self.pos.get('selectedOrder');

=== modified file 'point_of_sale/static/src/js/widgets.js'
--- point_of_sale/static/src/js/widgets.js	2012-11-05 10:43:57 +0000
+++ point_of_sale/static/src/js/widgets.js	2012-11-06 14:00:30 +0000
@@ -806,7 +806,7 @@
       
         start: function() {
             var self = this;
-            return self.pos.ready.then(function() {
+            return self.pos.ready.done(function() {
                 self.build_currency_template();
                 self.renderElement();
                 
@@ -845,7 +845,7 @@
                 self.$('.loader').animate({opacity:0},1500,'swing',function(){self.$('.loader').hide();});
                 self.$('.loader img').hide();
 
-            },function(){   // error when loading models data from the backend
+            }).fail(function(){   // error when loading models data from the backend
                 self.$('.loader img').hide();
                 return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_pos_session_opening']], ['res_id'])
                     .pipe( _.bind(function(res){

=== modified file 'process/static/src/js/process.js'
--- process/static/src/js/process.js	2012-10-23 01:03:03 +0000
+++ process/static/src/js/process.js	2012-11-06 14:00:30 +0000
@@ -20,7 +20,7 @@
         if(this.active_view == 'form') {
             this.record_id = this.views[this.active_view].controller.datarecord.id;
         }
-        this.process_get_object().pipe(function(process) {
+        this.process_get_object().then(function(process) {
             if(process && process.length) {
                 if(process.length > 1) {
                     self.process_selection = process;
@@ -30,7 +30,7 @@
                 }
             }
             return $.Deferred().resolve();
-        }).pipe(function() {
+        }).then(function() {
             var def = $.Deferred();
             if(self.process_id) {
                 $.when(self.process_graph_get()).done(function(res) {
@@ -221,12 +221,12 @@
         var dataset = new instance.web.DataSet(this, 'ir.values', this.session.user_context);
         var action_manager = new instance.web.ActionManager(self);
         dataset.call('get',
-            ['action', 'tree_but_open',[['ir.ui.menu', id]], dataset.context]).then(function(res) {
+            ['action', 'tree_but_open',[['ir.ui.menu', id]], dataset.context]).done(function(res) {
                 var action = res[0][res[0].length - 1];
                 self.rpc("/web/action/load", {
                     action_id: action.id,
                     context: dataset.context
-                    }).then(function(result) {
+                    }).done(function(result) {
                         action_manager.replace(self.$el);
                         action_manager.do_action(result.result);
                     })

=== modified file 'project/static/src/js/project.js'
--- project/static/src/js/project.js	2012-10-31 05:47:41 +0000
+++ project/static/src/js/project.js	2012-11-06 14:00:30 +0000
@@ -16,7 +16,7 @@
 
             // Find their matching names
             var dataset = new openerp.web.DataSetSearch(self, 'res.users', self.session.context, [['id', 'in', _.uniq(members_ids)]]);
-            dataset.read_slice(['id', 'name']).then(function(result) {
+            dataset.read_slice(['id', 'name']).done(function(result) {
                 _.each(result, function(v, k) {
                     // Set the proper value in the DOM
                     self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tipsy({
@@ -41,7 +41,7 @@
 
             // Find their matching names
             var dataset = new openerp.web.DataSetSearch(self, 'project.category', self.session.context, [['id', 'in', _.uniq(categ_ids)]]);
-            dataset.read_slice(['id', 'name']).then(function(result) {
+            dataset.read_slice(['id', 'name']).done(function(result) {
                 _.each(result, function(v, k) {
                     // Set the proper value in the DOM and display the element
                     self.$el.find('span[data-categ_id=' + v.id + ']').text(v.name);

=== modified file 'share/static/src/js/share.js'
--- share/static/src/js/share.js	2012-10-15 13:33:34 +0000
+++ share/static/src/js/share.js	2012-11-06 14:00:30 +0000
@@ -15,7 +15,7 @@
         self.rpc('/web/session/eval_domain_and_context', {
             domains: [domain],
             contexts: [view.dataset.context]
-        }).then(function (result) {
+        }).done(function (result) {
             Share.create({
                 name: action.name,
                 record_name: rec_name,
@@ -24,8 +24,8 @@
                 user_type: user_type || 'embedded',
                 view_type: view.fields_view.type,
                 invite: invite || false,
-            }).then(function(share_id) {
-                var step1 = Share.call('go_step_1', [[share_id]]).then(function(result) {
+            }).done(function(share_id) {
+                var step1 = Share.call('go_step_1', [[share_id]]).done(function(result) {
                     var action = result;
                     self.do_action(action);
                 });
@@ -37,7 +37,7 @@
         if (!session.session.share_flag) {
             session.session.share_flag = $.Deferred(function() {
                 var func = new session.web.Model("share.wizard").get_func("has_share");
-                func(session.session.uid).pipe(function(res) {
+                func(session.session.uid).then(function(res) {
                     if(res) {
                         session.session.share_flag.resolve();
                     } else {

=== modified file 'web_linkedin/static/src/js/linkedin.js'
--- web_linkedin/static/src/js/linkedin.js	2012-09-25 16:01:06 +0000
+++ web_linkedin/static/src/js/linkedin.js	2012-11-06 14:00:30 +0000
@@ -14,7 +14,7 @@
         },
         test_linkedin: function() {
             var self = this;
-            return this.test_api_key().pipe(function() {
+            return this.test_api_key().then(function() {
                 if (self.linkedin_added)
                     return self.linkedin_def.promise();
                 var tag = document.createElement('script');
@@ -37,7 +37,7 @@
             if (this.api_key) {
                 return $.when();
             }
-            return new instance.web.Model("ir.config_parameter").call("get_param", ["web.linkedin.apikey"]).pipe(function(a) {
+            return new instance.web.Model("ir.config_parameter").call("get_param", ["web.linkedin.apikey"]).then(function(a) {
                 if (!!a) {
                     self.api_key = a;
                     return true;
@@ -69,13 +69,13 @@
         },
         search_linkedin: function() {
             var self = this;
-            this.display_dm.add(instance.web_linkedin.tester.test_linkedin()).then(function() {
+            this.display_dm.add(instance.web_linkedin.tester.test_linkedin()).done(function() {
                 var pop = new instance.web_linkedin.LinkedinPopup(self, self.get("value"));
                 pop.open();
                 pop.on("selected", this, function(entity) {
                     self.selected_entity(entity);
                 });
-            }, _.bind(this.linkedin_disabled, this));
+            }).fail(_.bind(this.linkedin_disabled, this));
         },
         linkedin_disabled: function() {
             instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning")), {
@@ -87,7 +87,7 @@
         },
         selected_entity: function(entity) {
             var self = this;
-            this.create_on_change(entity).then(function(to_change) {
+            this.create_on_change(entity).done(function(to_change) {
                 self.view.set_values(to_change);
             });
         },
@@ -101,7 +101,7 @@
                 to_change.image = false;
                 if (entity.logoUrl) {
                     defs.push(self.rpc('/web_linkedin/binary/url2binary',
-                                       {'url': entity.logoUrl}).pipe(function(data){
+                                       {'url': entity.logoUrl}).then(function(data){
                         to_change.image = data;
                     }));
                 }
@@ -120,7 +120,7 @@
                     }).error(function() {
                         children_def.reject();
                     });
-                defs.push(children_def.pipe(function(result) {
+                defs.push(children_def.then(function(result) {
                     result = _.reject(result.people.values || [], function(el) {
                         return ! el.formattedName;
                     });
@@ -128,7 +128,7 @@
                         el.__type = "people";
                         return self.create_on_change(el);
                     });
-                    return $.when.apply($, defs).pipe(function() {
+                    return $.when.apply($, defs).then(function() {
                         var p_to_change = _.toArray(arguments);
                         to_change.child_ids = p_to_change;
                     });
@@ -144,7 +144,7 @@
                 to_change.image = false;
                 if (entity.pictureUrl) {
                     defs.push(self.rpc('/web_linkedin/binary/url2binary',
-                                       {'url': entity.pictureUrl}).pipe(function(data){
+                                       {'url': entity.pictureUrl}).then(function(data){
                         to_change.image = data;
                     }));
                 }
@@ -163,7 +163,7 @@
                 to_change.linkedinUrl = entity.publicProfileUrl;
                 */
             }
-            return $.when.apply($, defs).pipe(function() {
+            return $.when.apply($, defs).then(function() {
                 return to_change;
             });
         },
@@ -186,7 +186,7 @@
             this._super();
             var self = this;
             this.on("authentified", this, this.authentified);
-            instance.web_linkedin.tester.test_authentication().then(function() {
+            instance.web_linkedin.tester.test_authentication().done(function() {
                 self.trigger("authentified");
             });
         },
@@ -200,7 +200,7 @@
                     encodeURI(this.text), this.limit)).result(function (result) {
                 cdef.resolve(result);
             });
-            var def = cdef.pipe(function(companies) {
+            var def = cdef.then(function(companies) {
                 var lst = companies.companies.values || [];
                 lst = _.first(lst, self.limit);
                 lst = _.map(lst, function(el) {
@@ -214,7 +214,7 @@
                 params({"keywords": this.text, "count": this.limit}).result(function(result) {
                 pdef.resolve(result);
             });
-            var def2 = pdef.pipe(function(people) {
+            var def2 = pdef.then(function(people) {
                 var plst = people.people.values || [];
                 plst = _.first(plst, self.limit);
                 plst = _.map(plst, function(el) {

=== modified file 'web_shortcuts/static/src/js/web_shortcuts.js'
--- web_shortcuts/static/src/js/web_shortcuts.js	2012-10-29 10:59:31 +0000
+++ web_shortcuts/static/src/js/web_shortcuts.js	2012-11-06 14:00:30 +0000
@@ -46,7 +46,7 @@
     load: function() {
         var self = this;
         this.$el.find('.oe_systray_shortcuts_items').empty();
-        return this.rpc('/web/shortcuts/list', {}).then(function(shortcuts) {
+        return this.rpc('/web/shortcuts/list', {}).done(function(shortcuts) {
             _.each(shortcuts, function(sc) {
                 self.trigger('display', sc);
             });
@@ -80,7 +80,7 @@
             id = $link.data('id');
         self.session.active_id = id;
         // TODO: Use do_action({menu_id: id, type: 'ir.actions.menu'})
-        self.rpc('/web/menu/action', {'menu_id': id}).then(function(ir_menu_data) {
+        self.rpc('/web/menu/action', {'menu_id': id}).done(function(ir_menu_data) {
             if (ir_menu_data.action.length){
                 instance.webclient.on_menu_action({action_id: ir_menu_data.action[0][2].id});
             }
@@ -96,7 +96,7 @@
     do_update: function() {
         var self = this;
         this._super.apply(this, arguments);
-        this.update_promise.then(function() {
+        this.update_promise.done(function() {
             if (self.shortcuts) {
                 self.shortcuts.trigger('load');
             } else {
@@ -110,7 +110,7 @@
 instance.web.ViewManagerAction.include({
     switch_mode: function (view_type, no_store) {
         var self = this;
-        this._super.apply(this, arguments).then(function() {
+        this._super.apply(this, arguments).done(function() {
             self.shortcut_check(self.views[view_type]);
         });
     },

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to