From de6066ae970f2832d1aa547139725def43d0af11 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Tue, 16 Oct 2012 11:42:41 +0530 Subject: [PATCH 001/147] [IMP] base_calendar : The onchange on the duration must be the same on start date, in order to set the end_date if we change the start date. bzr revid: mdi@tinyerp.com-20121016061241-chm3hipucc44kmdm --- addons/base_calendar/crm_meeting_view.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 4df0a8a22b2..79a3b6d1c78 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -89,7 +89,8 @@ - + From 27ea8ab7a43354d28893320fba0f326e4c07b972 Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Tue, 16 Oct 2012 12:08:47 +0530 Subject: [PATCH 003/147] [IMP]hr_timesheet_invoice:renamed buttons Close to Contract Finished and Cancel to Cancel Contract bzr revid: ssu@tinyerp.com-20121016063847-vpwt26fwme7reryx --- addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index b752ade8da0..d47bf3b1252 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -19,10 +19,10 @@
From 976a3eb276a70c3a945429d450468626e9adf22f Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Tue, 16 Oct 2012 12:54:28 +0530 Subject: [PATCH 004/147] [FIX] account_analytic_default : TypeError: The model 'stock.picking' specifies an unexisting parent class 'stock.picking'. You may need to add a dependency on the parent class' module. bzr revid: mdi@tinyerp.com-20121016072428-srbvx9037iz40e5c --- addons/account_analytic_default/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_analytic_default/__openerp__.py b/addons/account_analytic_default/__openerp__.py index 213d055f8de..0af606821ce 100644 --- a/addons/account_analytic_default/__openerp__.py +++ b/addons/account_analytic_default/__openerp__.py @@ -38,7 +38,7 @@ Allows to automatically select analytic accounts based on criterions: 'author': 'OpenERP SA', 'website': 'http://www.openerp.com', 'images': ['images/analytic_defaults.jpeg'], - 'depends': ['sale'], + 'depends': ['sale_stock'], 'data': [ 'security/ir.model.access.csv', 'security/account_analytic_default_security.xml', From a7ee26e706b89058b320d4a56e9eaf72e54eeb42 Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Tue, 16 Oct 2012 14:43:28 +0530 Subject: [PATCH 005/147] [IMP]crm_claim:removed Next Stage and Previous stage buttons bzr revid: ssu@tinyerp.com-20121016091328-n0ugjw3uqlcpkehs --- addons/crm_claim/crm_claim_view.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index 9643a56bfe2..1f6ef54ad10 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -107,12 +107,6 @@ states="draft,pending" /> From 4d9907ada9b65d52eb038efc0629e23260298b58 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Mon, 22 Oct 2012 19:03:54 +0530 Subject: [PATCH 060/147] [IMP] remove graph view mode in bank statement & coda statement bzr revid: fka@tinyerp.com-20121022133354-03g0z7se5tv4ngb1 --- .../account_bank_statement_view.xml | 2 +- addons/l10n_be_coda/l10n_be_coda_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_bank_statement_extensions/account_bank_statement_view.xml b/addons/account_bank_statement_extensions/account_bank_statement_view.xml index 9164c00373f..3d5560856a3 100644 --- a/addons/account_bank_statement_extensions/account_bank_statement_view.xml +++ b/addons/account_bank_statement_extensions/account_bank_statement_view.xml @@ -148,7 +148,7 @@ Bank Statement Lines account.bank.statement.line form - tree,graph,form + tree,form {'block_statement_line_delete' : 1} diff --git a/addons/l10n_be_coda/l10n_be_coda_view.xml b/addons/l10n_be_coda/l10n_be_coda_view.xml index 21db77466a0..d5067e7951a 100644 --- a/addons/l10n_be_coda/l10n_be_coda_view.xml +++ b/addons/l10n_be_coda/l10n_be_coda_view.xml @@ -473,7 +473,7 @@ CODA Statement Lines coda.bank.statement.line form - tree,graph,form + tree,form {'block_statement_line_delete' : 1} From 6239433a002dc17d72e2e9c9d0eae61507825027 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 23 Oct 2012 11:04:12 +0530 Subject: [PATCH 061/147] [IMP]improve code bzr revid: sgo@tinyerp.com-20121023053412-gpoxqj3jp55m65wu --- .../product_visible_discount/product_visible_discount.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/product_visible_discount/product_visible_discount.py b/addons/product_visible_discount/product_visible_discount.py index 48e3c4a8283..008c1f313a6 100644 --- a/addons/product_visible_discount/product_visible_discount.py +++ b/addons/product_visible_discount/product_visible_discount.py @@ -111,9 +111,11 @@ class account_invoice_line(osv.osv): if res_dict.get('item_id',False) and res_dict['item_id'].get(pricelist,False): item = res_dict['item_id'].get(pricelist,False) - item_base = item_obj.read(cr, uid, [item], ['base'])[0]['base'] - if item_base > 0: - field_name = price_type_obj.browse(cr, uid, item_base).field + item_read = item_obj.read(cr, uid, [item], ['base']) + if item_read: + item_base = item_read[0]['base'] + if item_base > 0: + field_name = price_type_obj.browse(cr, uid, item_base).field product = product_obj.browse(cr, uid, product_id, context) product_read = product_obj.read(cr, uid, product_id, [field_name], context=context) From 7f64cbd875e22d8feb1555cf886c00bb3163c072 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Tue, 23 Oct 2012 11:52:30 +0530 Subject: [PATCH 062/147] [IMP] remove date_start_date function field bzr revid: fka@tinyerp.com-20121023062230-l6941b0lt7qx4wzu --- addons/mrp_operations/mrp_operations.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 9f6671c3b2b..ffe0305d5f1 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -50,17 +50,6 @@ class stock_move(osv.osv): stock_move() class mrp_production_workcenter_line(osv.osv): - def _get_date_date(self, cr, uid, ids, field_name, arg, context=None): - """ Finds starting date. - @return: Dictionary of values. - """ - res={} - for op in self.browse(cr, uid, ids, context=context): - if op.date_start: - res[op.id] = op.date_start[:10] - else: - res[op.id]=False - return res def _get_date_end(self, cr, uid, ids, field_name, arg, context=None): """ Finds ending date. @@ -92,7 +81,6 @@ class mrp_production_workcenter_line(osv.osv): "* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' state.\n" \ "* When the user cancels the work order it will be set in 'Canceled' state.\n" \ "* When order is completely processed that time it is set in 'Finished' state."), - 'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'), 'date_planned': fields.datetime('Scheduled Date', select=True), 'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'), 'date_start': fields.datetime('Start Date'), From 1435e6faeb1fea4d5d973d5d06f4b78ec2622f0b Mon Sep 17 00:00:00 2001 From: Hardik Date: Tue, 23 Oct 2012 13:01:50 +0530 Subject: [PATCH 063/147] [IMP]Diagram view pager is working and display in header bzr revid: hsa@tinyerp.com-20121023073150-ozao4l0wca96cgmp --- addons/web_diagram/static/src/js/diagram.js | 75 ++++++++++++------- .../static/src/xml/base_diagram.xml | 13 ++-- 2 files changed, 55 insertions(+), 33 deletions(-) diff --git a/addons/web_diagram/static/src/js/diagram.js b/addons/web_diagram/static/src/js/diagram.js index d5a6e78f862..a85dff23032 100644 --- a/addons/web_diagram/static/src/js/diagram.js +++ b/addons/web_diagram/static/src/js/diagram.js @@ -22,6 +22,7 @@ instance.web.DiagramView = instance.web.View.extend({ this.context = {}; this.ids = this.dataset.ids; this.on('view_loaded', self, self.load_diagram); + this.on('pager_action_executed', self, self.pager_action_trigger); }, start: function() { var self = this; @@ -59,12 +60,7 @@ instance.web.DiagramView = instance.web.View.extend({ self.$el.find('.oe_diagram_header').append(html_label); }) - this.$el.find('div.oe_diagram_pager button[data-pager-action]').click(function() { - var action = $(this).data('pager-action'); - self.execute_pager_action(action); - }); - - this.do_update_pager(); + this.init_pager(); // New Node,Edge this.$el.find('#new_node.oe_diagram_button_new').click(function(){self.add_node();}); @@ -366,36 +362,61 @@ instance.web.DiagramView = instance.web.View.extend({ form_controller.fields[self.connectors.attrs.destination].dirty = true; }); }, - - execute_pager_action: function(action) { - switch (action) { - case 'first': - this.dataset.index = 0; - break; - case 'previous': - this.dataset.previous(); - break; - case 'next': - this.dataset.next(); - break; - case 'last': - this.dataset.index = this.dataset.ids.length - 1; - break; + do_hide: function () { + if (this.$pager) { + this.$pager.hide(); } + this._super(); + }, + init_pager: function() { + var self = this; + if (this.$pager) + this.$pager.remove(); + + this.$pager = $(QWeb.render("DiagramView.pager", {'widget':self})).hide(); + if (this.options.$pager) { + this.$pager.appendTo(this.options.$pager); + } else { + this.$el.find('.oe_diagram_pager').replaceWith(this.$pager); + } + this.$pager.on('click','a[data-pager-action]',function() { + var action = $(this).data('pager-action'); + self.execute_pager_action(action); + }); + this.do_update_pager(); + }, + pager_action_trigger: function(){ var loaded = this.dataset.read_index(_.keys(this.fields_view.fields)) .pipe(this.on_diagram_loaded); this.do_update_pager(); return loaded; }, + execute_pager_action: function(action) { + switch (action) { + case 'first': + this.dataset.index = 0; + break; + case 'previous': + this.dataset.previous(); + break; + case 'next': + this.dataset.next(); + break; + case 'last': + this.dataset.index = this.dataset.ids.length - 1; + break; + } + this.trigger('pager_action_executed'); + + }, do_update_pager: function(hide_index) { - var $pager = this.$el.find('div.oe_diagram_pager'); - var index = hide_index ? '-' : this.dataset.index + 1; - if(!this.dataset.count) { - this.dataset.count = this.dataset.ids.length; + this.$pager.toggle(this.dataset.ids.length > 1); + if (hide_index) { + $(".oe_diagram_pager_state", this.$pager).html(""); + } else { + $(".oe_diagram_pager_state", this.$pager).html(_.str.sprintf(_t("%d / %d"), this.dataset.index + 1, this.dataset.ids.length)); } - $pager.find('span.oe_pager_index').html(index); - $pager.find('span.oe_pager_count').html(this.dataset.count); }, do_show: function() { diff --git a/addons/web_diagram/static/src/xml/base_diagram.xml b/addons/web_diagram/static/src/xml/base_diagram.xml index 388092b3d23..54b06aafb27 100644 --- a/addons/web_diagram/static/src/xml/base_diagram.xml +++ b/addons/web_diagram/static/src/xml/base_diagram.xml @@ -1,18 +1,19 @@