From 7d57771833bf2c2b2bf3b5f3ba5e15918d88c977 Mon Sep 17 00:00:00 2001 From: "xrg@hellug.gr" <> Date: Fri, 3 Sep 2010 00:04:51 +0300 Subject: [PATCH 01/17] [FIX] base_module_quality: log, fix workflow test When no wkf_ids are located for the module, search() must be skipped and have instead an empty list of activities. Otherwise, all the activities for all modules would be selected, breaking the test bzr revid: xrg@hellug.gr-20100902210451-30eaz5vdtplhjlgr --- addons/base_module_quality/base_module_quality.py | 5 +++++ .../workflow_test/workflow_test.py | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index c19bd37f97f..148adefdcd8 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -26,6 +26,7 @@ import tools from tools import config from tools.translate import _ from osv import osv, fields +import logging class abstract_quality_check(object): ''' @@ -80,6 +81,7 @@ class abstract_quality_check(object): #This variable used to give message if test result is good or not self.message = '' + self.log = logging.getLogger('module.quality') #The tests have to subscribe itselfs in this list, that contains #all the test that have to be performed. @@ -111,9 +113,11 @@ class abstract_quality_check(object): model_data = pool.get('ir.model.data').browse(cr, uid, ids2) for model in model_data: model_list.append(model.res_id) + self.log.debug('get_objects() model_list: %s', ','.join(model_list)) obj_list = [] for mod in pool.get('ir.model').browse(cr, uid, model_list): obj_list.append(str(mod.model)) + self.log.debug('get_objects() obj_list: %s', ','.join(obj_list)) return obj_list def get_model_ids(self, cr, uid, models=[]): @@ -121,6 +125,7 @@ class abstract_quality_check(object): if not models: return [] pool = pooler.get_pool(cr.dbname) + self.log.debug('get_model_ids([%s])', ', '.join(models)) return pool.get('ir.model').search(cr, uid, [('model', 'in', models)]) def get_ids(self, cr, uid, object_list): diff --git a/addons/base_module_quality/workflow_test/workflow_test.py b/addons/base_module_quality/workflow_test/workflow_test.py index f92107e8fbd..11f7bcf12c3 100644 --- a/addons/base_module_quality/workflow_test/workflow_test.py +++ b/addons/base_module_quality/workflow_test/workflow_test.py @@ -74,9 +74,14 @@ class quality_test(base_module_quality.abstract_quality_check): wkf_ids = map(lambda x:x['id'], wkfs) if not wkf_ids: result_dict[module_name] = [module_name, 'No workflow defined on module'] - #Activity of workflow checking... - activity_ids = wkf_activity_obj.search(cr, uid, [('wkf_id', 'in', wkf_ids)]) - activities = wkf_activity_obj.browse(cr, uid, activity_ids) + activity_ids = [] + activities = [] + else: + #Activity of workflow checking... + activity_ids = wkf_activity_obj.search(cr, uid, [('wkf_id', 'in', wkf_ids)]) + activities = wkf_activity_obj.browse(cr, uid, activity_ids) + self.log.debug("quality test: wkf_ids = %r", wkf_ids) + self.log.debug("quality test: activity_ids = %r", activity_ids) for activity in activities: if activity.flow_start: activity_chk[activity.wkf_id.osv]['start'] = 'ok' From ede4ce4399ca020775485effeb0e3feec9115017 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Fri, 3 Sep 2010 11:40:45 +0530 Subject: [PATCH 02/17] [MOD] account,account_payment,account_followup : replace maturity date by due date bzr revid: vir@tinyerp.com-20100903061045-np3lrhr0tcscgj7m --- addons/account/account.py | 2 +- addons/account/account_move_line.py | 2 +- addons/account/data/account_data2.xml | 4 ++-- addons/account/report/overdue.rml | 2 +- addons/account_followup/report/report_followp_print.rml | 2 +- addons/account_followup/wizard/account_followup_print.py | 2 +- addons/account_payment/account_payment.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 1276f2b640f..08725e0cc5e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2039,7 +2039,7 @@ class account_model_line(osv.osv): 'currency_id': fields.many2one('res.currency', 'Currency'), 'partner_id': fields.many2one('res.partner', 'Partner'), - 'date_maturity': fields.selection([('today','Date of the day'), ('partner','Partner Payment Term')], 'Maturity date', help="The maturity date of the generated entries for this model. You can choose between the creation date or the creation date of the entries plus the partner payment terms."), + 'date_maturity': fields.selection([('today','Date of the day'), ('partner','Partner Payment Term')], 'Due date', help="The due date of the generated entries for this model. You can choose between the creation date or the creation date of the entries plus the partner payment terms."), 'date': fields.selection([('today','Date of the day'), ('partner','Partner Payment Term')], 'Current Date', required=True, help="The date of the generated entries"), } _defaults = { diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index cf17c76deff..7be8cffa508 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -439,7 +439,7 @@ class account_move_line(osv.osv): 'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"), 'partner_id': fields.many2one('res.partner', 'Partner'), - 'date_maturity': fields.date('Maturity date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."), + 'date_maturity': fields.date('Due date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."), 'date': fields.related('move_id','date', string='Effective date', type='date', required=True, store={ 'account.move': (_get_move_lines, ['date'], 20) diff --git a/addons/account/data/account_data2.xml b/addons/account/data/account_data2.xml index 336e8c1ab56..51f7ebaed43 100644 --- a/addons/account/data/account_data2.xml +++ b/addons/account/data/account_data2.xml @@ -295,7 +295,7 @@ - Maturity Date + Due Date date_maturity @@ -393,7 +393,7 @@ - Maturity Date + Due Date date_maturity diff --git a/addons/account/report/overdue.rml b/addons/account/report/overdue.rml index e8e1a7dc84c..3218f84b4a0 100644 --- a/addons/account/report/overdue.rml +++ b/addons/account/report/overdue.rml @@ -147,7 +147,7 @@ Ref - Maturity date + Due date Due diff --git a/addons/account_followup/report/report_followp_print.rml b/addons/account_followup/report/report_followp_print.rml index 97aaa377c1e..b12e6308fd0 100644 --- a/addons/account_followup/report/report_followp_print.rml +++ b/addons/account_followup/report/report_followp_print.rml @@ -136,7 +136,7 @@ Ref - Maturity Date + Due Date Amount In Currency diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index a37b13cf126..b89ad76d0ee 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -209,7 +209,7 @@ class account_followup_print_all(osv.osv_memory): subtotal_maturity = 0.0 balance = 0.0 l = '--------------------------------------------------------------------------------------------------------------------------' - head = l+ '\n' + 'Date'.rjust(10) + '\t' + 'Description'.rjust(10) + '\t' + 'Ref'.rjust(10) + '\t' + 'Maturity date'.rjust(10) + '\t' + 'Due'.rjust(10) + '\t' + 'Paid'.rjust(10) + '\t' + 'Maturity'.rjust(10) + '\t' + 'Litigation'.rjust(10) + '\n' + l + head = l+ '\n' + 'Date'.rjust(10) + '\t' + 'Description'.rjust(10) + '\t' + 'Ref'.rjust(10) + '\t' + 'Due date'.rjust(10) + '\t' + 'Due'.rjust(10) + '\t' + 'Paid'.rjust(10) + '\t' + 'Maturity'.rjust(10) + '\t' + 'Litigation'.rjust(10) + '\n' + l for i in data_lines: maturity = 0.00 if i.date_maturity < time.strftime('%Y-%m-%d') and (i.debit - i.credit): diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py index b36dc0be306..cd3d30e46a8 100644 --- a/addons/account_payment/account_payment.py +++ b/addons/account_payment/account_payment.py @@ -319,7 +319,7 @@ class payment_line(osv.osv): help='Payment amount in the company currency'), 'ml_date_created': fields.function(_get_ml_created_date, string="Effective Date", method=True, type='date', help="Invoice Effective Date"), - 'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Maturity Date'), + 'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Due Date'), 'ml_inv_ref': fields.function(_get_ml_inv_ref, method=True, type='many2one', relation='account.invoice', string='Invoice Ref.'), 'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text", help='Address of the Main Partner'), 'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text", help='Address of the Ordering Customer.'), From 9b36d9ba73bbe8505b0eb078aa742bf25f2099be Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Fri, 3 Sep 2010 11:47:18 +0530 Subject: [PATCH 03/17] [IMP] Usability Improvements in extended group bzr revid: vir@tinyerp.com-20100903061718-h0jptgsymym4w2sk --- addons/account/partner_view.xml | 4 ++-- addons/base_setup/base_setup_installer.xml | 2 +- addons/base_setup/base_setup_todo.xml | 8 ++++---- addons/base_setup/installer.py | 12 ++++++++++++ addons/crm/crm_installer_view.xml | 1 + addons/crm/crm_opportunity_menu.xml | 1 + addons/crm/crm_opportunity_view.xml | 2 +- addons/hr/hr_department_view.xml | 2 +- addons/hr/hr_installer.xml | 4 ++-- addons/hr/hr_view.xml | 11 +++++------ addons/mrp/mrp_view.xml | 3 ++- addons/project/project_installer.xml | 4 ++-- addons/sale/sale_view.xml | 8 ++++---- addons/stock/stock_view.xml | 4 ++-- 14 files changed, 40 insertions(+), 26 deletions(-) diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 7f3c344ebff..2b5fc927dff 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -76,13 +76,13 @@ - + - + diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml index cdaf66100ac..ceeebd2e8eb 100644 --- a/addons/base_setup/base_setup_installer.xml +++ b/addons/base_setup/base_setup_installer.xml @@ -28,7 +28,7 @@ - + diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml index a4b4b2bda23..59543200076 100644 --- a/addons/base_setup/base_setup_todo.xml +++ b/addons/base_setup/base_setup_todo.xml @@ -36,10 +36,10 @@ - - - - + + + + diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py index 2886857a45d..edfbb573911 100644 --- a/addons/base_setup/installer.py +++ b/addons/base_setup/installer.py @@ -104,6 +104,18 @@ class base_setup_installer(osv.osv_memory): return ['document_ftp'] return None + def _if_misc_tools(self, cr, uid, ids, context=None): + interface = self.pool.get('res.users').browse(cr, uid, uid, context=context).view + if interface == 'simple' or interface =='extended' : + return ['lunch','idea','survey'] + return None + + def _if_account(self, cr, uid, ids, context=None): + if self.pool.get('res.users').browse(cr, uid, uid, context=context)\ + .view == 'simple': + return ['account_voucher'] + return None + def onchange_moduleselection(self, cr, uid, ids, *args): closed, total = self.get_current_progress(cr, uid) diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index 0b5b87ff485..855e2a6a125 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -61,6 +61,7 @@ 3 + diff --git a/addons/crm/crm_opportunity_menu.xml b/addons/crm/crm_opportunity_menu.xml index 282dc78bb8c..0bfb5f35efc 100644 --- a/addons/crm/crm_opportunity_menu.xml +++ b/addons/crm/crm_opportunity_menu.xml @@ -5,6 +5,7 @@