From fa57ce878ec6b3499e7fce9f06626c4bbcca7c10 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 17 Jun 2015 11:53:58 +0200 Subject: [PATCH 1/4] [FIX] account: wrong domain for UoM This allows to reset correctly the domain of UoM if the product is not set. Without this patch, the domain used is the domain of the previous product in the list. opw-642074 --- addons/account/account_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 53b3136b075..52babde17af 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1482,9 +1482,9 @@ class account_invoice_line(osv.osv): raise osv.except_osv(_('No Partner Defined!'),_("You must first select a partner!") ) if not product: if type in ('in_invoice', 'in_refund'): - return {'value': {}, 'domain':{'product_uom':[]}} + return {'value': {}, 'domain':{'uos_id':[]}} else: - return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}} + return {'value': {'price_unit': 0.0}, 'domain':{'uos_id':[]}} part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context) product_uom_obj = self.pool.get('product.uom') fpos_obj = self.pool.get('account.fiscal.position') From 7d3a4ab1b16a9025a66befc34b1e628c8bef07aa Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 17 Jun 2015 14:27:46 +0200 Subject: [PATCH 2/4] [FIX] l10n_be: sequence number of VAT Intracom report doesn't depend on company Solves a traceback if the company's user is not the company with id = 1. opw-642359 --- addons/l10n_be/l10n_be_sequence.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_be/l10n_be_sequence.xml b/addons/l10n_be/l10n_be_sequence.xml index 1c11d5b48af..6210d362774 100644 --- a/addons/l10n_be/l10n_be_sequence.xml +++ b/addons/l10n_be/l10n_be_sequence.xml @@ -14,6 +14,7 @@ Declarantnum declarantnum 5 + From d0e39720e3aaa5a1cf67bd9fa5470ceaeaf97cac Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Tue, 16 Jun 2015 15:15:13 +0200 Subject: [PATCH 3/4] [FIX] base_calendar: Make exp_report() signature correspond to the one in web_services --- addons/base_calendar/base_calendar.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 64053bba712..ca67114e851 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1826,7 +1826,7 @@ ir_model() class virtual_report_spool(web_services.report_spool): - def exp_report(self, db, uid, object, ids, data=None, context=None): + def exp_report(self, db, uid, object, ids, datas=None, context=None): """ Export Report @param self: The object pointer @@ -1837,13 +1837,13 @@ class virtual_report_spool(web_services.report_spool): if object == 'printscreen.list': return super(virtual_report_spool, self).exp_report(db, uid, \ - object, ids, data, context) + object, ids, datas, context) new_ids = [] for id in ids: new_ids.append(base_calendar_id2real_id(id)) - if data.get('id', False): - data['id'] = base_calendar_id2real_id(data['id']) - return super(virtual_report_spool, self).exp_report(db, uid, object, new_ids, data, context) + if datas.get('id', False): + datas['id'] = base_calendar_id2real_id(datas['id']) + return super(virtual_report_spool, self).exp_report(db, uid, object, new_ids, datas, context) virtual_report_spool() From e8e3f7572788cc0d5901148002d53b8ec751c1d8 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 18 Jun 2015 19:18:03 +0200 Subject: [PATCH 4/4] [FIX] workers: process signals during graceful shutdown to allow force shutdown Required after e17844c946879cdc3d4569da8a1e52ebeb8f8963 which enabled graceful shutdown of workers, including the cron worker. The latter may typically be busy on long-running tasks that will not be aborted by a simple graceful shutdown request. A typical shutdown sequence initiated by a daemon manager such as start-stop-daemon will involve multiple SIGTERM signals to ensure the process really stops in a timely manner. This was not possible after e17844c946879cdc3d4569da8a1e52ebeb8f8963 if any cron worker was busy. --- openerp/service/workers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openerp/service/workers.py b/openerp/service/workers.py index 9264ef12996..b275f5cd8cd 100644 --- a/openerp/service/workers.py +++ b/openerp/service/workers.py @@ -186,6 +186,11 @@ class Multicorn(object): for pid in self.workers.keys(): self.worker_kill(pid, signal.SIGINT) while self.workers and time.time() < limit: + try: + self.process_signals() + except KeyboardInterrupt: + _logger.info("Forced shutdown.") + break self.process_zombie() time.sleep(0.1) else: