From 4ee77c60581e2928639cfb9ed82d31429b2e0f85 Mon Sep 17 00:00:00 2001 From: "Ravi Gadhia (OpenERP)" Date: Thu, 11 Oct 2012 17:35:34 +0530 Subject: [PATCH 01/44] [FIX]: get context value in one2many bzr revid: atp@tinyerp.com-20121011120534-bo57y7m667hshuz5 --- addons/web/static/src/js/view_form.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index afb5e258c0b..02dd5b1e0c7 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3608,7 +3608,12 @@ instance.web.form.One2ManyDataSet = instance.web.BufferedDataSet.extend({ get_context: function() { this.context = this.o2m.build_context([this.o2m.name]); return this.context; - } + }, + default_get: function(fields, options) { + if(!options) options = {} + _.extend(options, {'context':this.get_context()}) + return this._super(fields, options).then(this.on_default_get); + }, }); instance.web.form.One2ManyListView = instance.web.ListView.extend({ From 25ac221a0f6622a13d01d9b1ad14f4827adb2603 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Fri, 12 Oct 2012 12:00:04 +0530 Subject: [PATCH 02/44] [IMP] improve code bzr revid: rgaopenerp-20121012063004-cdgbq4w4pa1io9u2 --- addons/web/static/src/js/view_form.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 02dd5b1e0c7..d9254d2d724 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3609,11 +3609,11 @@ instance.web.form.One2ManyDataSet = instance.web.BufferedDataSet.extend({ this.context = this.o2m.build_context([this.o2m.name]); return this.context; }, - default_get: function(fields, options) { - if(!options) options = {} - _.extend(options, {'context':this.get_context()}) - return this._super(fields, options).then(this.on_default_get); - }, + default_get: function(fields, options) { + options = options || {}; + _.extend(options, {'context':this.get_context()}); + return this._super(fields, options).then(this.on_default_get); + }, }); instance.web.form.One2ManyListView = instance.web.ListView.extend({ From 2776f5b7e691da63f0a373ebdf8305fd60b73bb6 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 26 Oct 2012 08:51:43 +0200 Subject: [PATCH 03/44] [[FIX] country code not required bzr revid: fp@tinyerp.com-20121026065143-bnwzfum1zp8p3wrv --- openerp/addons/base/res/res_country.py | 2 +- openerp/addons/base/res/res_country_view.xml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openerp/addons/base/res/res_country.py b/openerp/addons/base/res/res_country.py index 35fb2a29ea7..98a3b769a11 100644 --- a/openerp/addons/base/res/res_country.py +++ b/openerp/addons/base/res/res_country.py @@ -47,7 +47,7 @@ class Country(osv.osv): help='The full name of the country.', required=True, translate=True), 'code': fields.char('Country Code', size=2, help='The ISO country code in two chars.\n' - 'You can use this field for quick search.', required=True), + 'You can use this field for quick search.'), 'address_format': fields.text('Address Format', help="""You can state here the usual format to use for the \ addresses belonging to this country.\n\nYou can use the python-style string patern with all the field of the address \ (for example, use '%(street)s' to display the field 'street') plus diff --git a/openerp/addons/base/res/res_country_view.xml b/openerp/addons/base/res/res_country_view.xml index 47b665426f9..8f64d330440 100644 --- a/openerp/addons/base/res/res_country_view.xml +++ b/openerp/addons/base/res/res_country_view.xml @@ -31,8 +31,7 @@ -