From 630f3d566f4d8bdec55f05345b8b79f4089490df Mon Sep 17 00:00:00 2001 From: oihane Date: Tue, 19 Apr 2016 15:36:50 +0200 Subject: [PATCH 01/26] [FIX] hr_timesheet_invoice: fully qualify grouped fields in SQL view Avoids name collisions when custom columns are involved. Closes #11743 --- addons/hr_timesheet_invoice/report/report_analytic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/report/report_analytic.py b/addons/hr_timesheet_invoice/report/report_analytic.py index 02d164dd884..d6f66eeef48 100644 --- a/addons/hr_timesheet_invoice/report/report_analytic.py +++ b/addons/hr_timesheet_invoice/report/report_analytic.py @@ -101,7 +101,7 @@ class report_account_analytic_line_to_invoice(osv.osv): WHERE (invoice_id IS NULL) and (to_invoice IS NOT NULL) GROUP BY - to_char(l.date, 'YYYY'), to_char(l.date,'MM'), product_id, product_uom_id, account_id + to_char(l.date, 'YYYY'), to_char(l.date,'MM'), l.product_id, l.product_uom_id, l.account_id ) """) From e21de5013d2a11c84b9af3ac95961dd09b2bd020 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 21 Apr 2016 08:29:58 +0200 Subject: [PATCH 02/26] [FIX] membership: update membership state daily This is a complement to commit 6d4a78a2a. The 'invoiced' status should be removed automatically once the membership is expired. opw-672259 --- addons/membership/membership.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/membership/membership.py b/addons/membership/membership.py index 992632bdf6f..f25ac7f047e 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -202,7 +202,7 @@ class Partner(osv.osv): return list_partner def _cron_update_membership(self, cr, uid, context=None): - partner_ids = self.search(cr, uid, [('membership_state', '=', 'paid')], context=context) + partner_ids = self.search(cr, uid, [('membership_state', 'in', ['invoiced', 'paid'])], context=context) if partner_ids: self._store_set_values(cr, uid, partner_ids, ['membership_state'], context=context) From d951a7d5eecadfa15758a103e2ba1971468b24c1 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 21 Apr 2016 11:24:49 +0200 Subject: [PATCH 03/26] [FIX] stock_account: stock history view The stock history doesn't take into account internal moves. For example, in the following situation: - Receive 1000 products to Internal Warehouse 1 - Move these 1000 products to Internal Warehouse 2 The 1000 products are still recorded on the Internal Warehouse 1. opw-672277 --- addons/stock_account/wizard/stock_valuation_history.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py index fad5a454454..1bbe5a81968 100644 --- a/addons/stock_account/wizard/stock_valuation_history.py +++ b/addons/stock_account/wizard/stock_valuation_history.py @@ -155,8 +155,7 @@ class stock_history(osv.osv): product_template ON product_template.id = product_product.product_tmpl_id WHERE quant.qty>0 AND stock_move.state = 'done' AND dest_location.usage in ('internal', 'transit') AND ( - (source_location.company_id is null and dest_location.company_id is not null) or - (source_location.company_id is not null and dest_location.company_id is null) or + not (source_location.company_id is null and dest_location.company_id is null) or source_location.company_id != dest_location.company_id or source_location.usage not in ('internal', 'transit')) ) UNION ALL @@ -187,8 +186,7 @@ class stock_history(osv.osv): product_template ON product_template.id = product_product.product_tmpl_id WHERE quant.qty>0 AND stock_move.state = 'done' AND source_location.usage in ('internal', 'transit') AND ( - (dest_location.company_id is null and source_location.company_id is not null) or - (dest_location.company_id is not null and source_location.company_id is null) or + not (dest_location.company_id is null and source_location.company_id is null) or dest_location.company_id != source_location.company_id or dest_location.usage not in ('internal', 'transit')) )) From db699e86b46e1ba2e3ef9e6150f1303a87b73ae7 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 21 Apr 2016 14:15:34 +0200 Subject: [PATCH 04/26] [FIX] mail: Missing translation `Send a message to the group` The above string was not translated, when creating a new discussion group, in the group message input placeholder. opw-673712 --- addons/mail/mail_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 6259887a1e5..14cfb38afd5 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -153,7 +153,7 @@ class mail_group(osv.Model): 'thread_level': 1, 'header_description': self._generate_header_description(cr, uid, group, context=context), 'view_mailbox': True, - 'compose_placeholder': 'Send a message to the group', + 'compose_placeholder': _('Send a message to the group'), } cobj = self.pool.get('ir.actions.client') newref = cobj.copy(cr, SUPERUSER_ID, ref[1], default={'params': str(params), 'name': vals['name']}, context=context) From 7f05692cb9d28968ff1b14b7542d24f1de1944b5 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 21 Apr 2016 10:50:44 +0200 Subject: [PATCH 05/26] [FIX] account_asset: compute depreciation board From af61494 Allow to compute the depreciation when the asset is in state: draft --- addons/account_asset/account_asset_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_asset/account_asset_view.xml b/addons/account_asset/account_asset_view.xml index facf309bb36..d7e0d608488 100644 --- a/addons/account_asset/account_asset_view.xml +++ b/addons/account_asset/account_asset_view.xml @@ -161,7 +161,7 @@ -