From 0d22a34fa93ebf39bb4338527e95cd2bbc3f69e0 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 12 Aug 2014 14:13:44 +0200 Subject: [PATCH 1/6] [FIX] portal_claim: create claim with no partner_id If partner_id is False, do not try to name_get This fix is related to the rev 095be21ab17f7f731877d61c99b48b51119ff39a --- addons/portal_claim/portal_claim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/portal_claim/portal_claim.py b/addons/portal_claim/portal_claim.py index d7c9c1af6ca..7eb30888d2a 100644 --- a/addons/portal_claim/portal_claim.py +++ b/addons/portal_claim/portal_claim.py @@ -29,7 +29,7 @@ class crm_claim(base_stage, osv.osv): def default_get(self, cr, uid, fields, context=None): res = super(crm_claim, self).default_get(cr, uid, fields, context=context) - if isinstance(res.get('partner_id'), (int, long)): + if type(res.get('partner_id')) in (int, long): # Special case for portal users, as they are not allowed to call name_get on res.partner # We save this call for the web client by returning it in default get res['partner_id'] = self.pool['res.partner'].name_get( From 7a50b3b057e17b689d945870449a2adde2b444bb Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 12 Aug 2014 16:08:30 +0200 Subject: [PATCH 2/6] [FIX] web: missing self initialisation The self is needed in the _value() method below, opw 608878 --- addons/web/static/src/js/search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 30b381d8738..c09661f430d 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -466,6 +466,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea * Sets up search view's view-wide auto-completion widget */ setup_global_completion: function () { + var self = this; var autocomplete = this.$el.autocomplete({ source: this.proxy('complete_global_search'), select: this.proxy('select_completion'), From b2f1c764cd8f89ac6eeaec21c1827df6c4e817b9 Mon Sep 17 00:00:00 2001 From: Ruchir Shukla Date: Sat, 21 Jun 2014 11:48:42 +0530 Subject: [PATCH 3/6] [FIX] account_anglo_saxon: avoid duplication of price difference lines When computing the price difference lines, in move_line_get of account_anglo_saxon, we loop on the result of super call for each lines (n * n times) to compute the price difference. The product_id was used to match the returned line and the original invoice line. This was wrong as we could get several lines with the same product_id (and then get n * n price difference lines). This patch adds the line id to the result of move_line_get (from account) so that account_anglo_saxon can filter more efficiently and only get one price difference per invoice line. Fixes #704 --- addons/account/account_invoice.py | 3 +-- addons/account_anglo_saxon/invoice.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 00d0b0d57a0..7677c212781 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1568,8 +1568,7 @@ class account_invoice_line(osv.osv): company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id for line in inv.invoice_line: mres = self.move_line_get_item(cr, uid, line, context) - if not mres: - continue + mres['invl_id'] = line.id res.append(mres) tax_code_found= False for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, diff --git a/addons/account_anglo_saxon/invoice.py b/addons/account_anglo_saxon/invoice.py index 0530abf1386..3b859472774 100644 --- a/addons/account_anglo_saxon/invoice.py +++ b/addons/account_anglo_saxon/invoice.py @@ -119,7 +119,7 @@ class account_invoice_line(osv.osv): account_prec = decimal_precision.precision_get(cr, uid, 'Account') # calculate and write down the possible price difference between invoice price and product price for line in res: - if a == line['account_id'] and i_line.product_id.id == line['product_id']: + if line.get('invl_id', 0) == i_line.id and a == line['account_id']: uom = i_line.product_id.uos_id or i_line.product_id.uom_id standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id) if inv.currency_id.id != company_currency: From 60ab6f111ec4720b451dc532604f4fb34c2119ed Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 12 Aug 2014 17:45:05 +0200 Subject: [PATCH 4/6] [FIX] web: on switch form (from list & kanban) do not load record if empty dataset --- addons/web/static/src/js/view_list.js | 2 +- addons/web_kanban/static/src/js/kanban.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 54f7946a9a3..52124d5f896 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -511,7 +511,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi self.dataset.index = 0; } } else if (self.dataset.index >= self.records.length) { - self.dataset.index = 0; + self.dataset.index = self.records.length ? 0 : null; } self.compute_aggregates(); diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 91bbf9ceeed..63bfc769e14 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -290,6 +290,8 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset); if (!_.isEmpty(self.dataset.ids) && (self.dataset.index === null || self.dataset.index >= self.dataset.ids.length)) { self.dataset.index = 0; + } else if (_.isEmpty(self.dataset.ids)){ + self.dataset.index = null; } self.do_add_groups([kgroup]).done(function() { if (_.isEmpty(records)) { From fa76ae952bf0c7263c837bbdd8bda13ded0c12e8 Mon Sep 17 00:00:00 2001 From: Rashmin Lumbhani Date: Tue, 5 Aug 2014 14:08:52 +0530 Subject: [PATCH 5/6] [FIX] fleet: creation of suppliers is now correct --- addons/fleet/fleet_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index c8929d2b492..b1a2a9ff1c5 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -433,7 +433,7 @@ - + @@ -641,7 +641,7 @@ - + @@ -743,7 +743,7 @@ - + From 591326c54e8e5cf9acf3fcaaef8f76b0cbb6062c Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 13 Aug 2014 10:20:03 +0200 Subject: [PATCH 6/6] [FIX] pos: the widget.pos.cashier is not always defined --- addons/point_of_sale/static/src/xml/pos.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 85cf5cecc85..1afd0fe4359 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -631,7 +631,7 @@

Phone:
- User:
+ User:
Shop: