From 923835229cb92dad0a71a867c0bd0bf9993b1bf0 Mon Sep 17 00:00:00 2001 From: "pso (tiny)" Date: Fri, 26 Dec 2008 16:54:10 +0530 Subject: [PATCH 1/8] changes in process bzr revid: pso@tinyerp.com-20081226112410-2r283ngsvoh0a8od --- addons/account/__terp__.py | 2 +- .../process/customer_invoice_process.xml | 28 ++++++++- addons/account/process/statement_process.xml | 44 +------------ .../process/supplier_invoice_process.xml | 4 +- .../process/base_contact_process.xml | 1 + .../process/crm_configuration_process.xml | 5 +- addons/hr/process/hr_process.xml | 1 + .../hr_expense/process/hr_expense_process.xml | 1 + .../process/hr_holidays_process.xml | 1 + .../process/hr_timesheet_process.xml | 1 + .../process/hr_timesheet_sheet_process.xml | 1 + .../membership/process/membership_process.xml | 1 + addons/mrp/process/procurement_process.xml | 63 ++++++++++++++++++- .../mrp/process/service_product_process.xml | 32 +--------- .../mrp/process/stockable_product_process.xml | 30 +-------- addons/process/process.py | 5 +- addons/product/process/product_process.xml | 1 + addons/project/process/task_process.xml | 1 + addons/purchase/process/purchase_process.xml | 1 + addons/sale/process/sale_process.xml | 1 + 20 files changed, 113 insertions(+), 111 deletions(-) diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index 3d3905ed249..e5f77587fa7 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -59,9 +59,9 @@ "project/project_report.xml", "product_view.xml", "account_assert_test.xml", + "process/statement_process.xml", "process/customer_invoice_process.xml", "process/supplier_invoice_process.xml", - "process/statement_process.xml", ], "translations" : { "fr": "i18n/french_fr.csv" diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index c3fedd1826e..7af469d142f 100755 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -8,6 +8,7 @@ + @@ -61,13 +62,14 @@ - + + - + @@ -101,6 +103,19 @@ + + + + + + + + + + + + + @@ -102,36 +91,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml index 613aaaa4005..d20548f7eef 100755 --- a/addons/account/process/supplier_invoice_process.xml +++ b/addons/account/process/supplier_invoice_process.xml @@ -8,6 +8,7 @@ + @@ -51,10 +52,11 @@ - + + diff --git a/addons/base_contact/process/base_contact_process.xml b/addons/base_contact/process/base_contact_process.xml index 8f653a90e2f..182eb70ca0e 100755 --- a/addons/base_contact/process/base_contact_process.xml +++ b/addons/base_contact/process/base_contact_process.xml @@ -9,6 +9,7 @@ + - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -115,6 +140,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/mrp/process/service_product_process.xml b/addons/mrp/process/service_product_process.xml index abaa418331e..e7aacaaf044 100644 --- a/addons/mrp/process/service_product_process.xml +++ b/addons/mrp/process/service_product_process.xml @@ -8,6 +8,7 @@ + @@ -15,17 +16,6 @@ Process Node --> - - - - - - - - - - - @@ -41,7 +31,7 @@ - + @@ -64,24 +54,6 @@ Process Transition --> - - - - - - - - - - - - - - - - - - diff --git a/addons/mrp/process/stockable_product_process.xml b/addons/mrp/process/stockable_product_process.xml index 9c885d51942..92da99f635e 100644 --- a/addons/mrp/process/stockable_product_process.xml +++ b/addons/mrp/process/stockable_product_process.xml @@ -8,6 +8,7 @@ + @@ -15,17 +16,6 @@ Process Node --> - - - - - - - - - - - @@ -75,24 +65,6 @@ Process Transition --> - - - - - - - - - - - - - - - - - - diff --git a/addons/process/process.py b/addons/process/process.py index b1a6002dfd9..4eba1a44410 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -73,7 +73,6 @@ class process_process(osv.osv): res = pool.get('process.process').browse(cr, uid, res, context) for process in res: result.append((process.id, process.name)) - return result # else search process nodes @@ -87,7 +86,9 @@ class process_process(osv.osv): return result def graph_get(self, cr, uid, id, res_model, res_id, scale, context): - + if not res_model: + res_model = (self.browse(cr, uid, [id])[0]).model_id.model + pool = pooler.get_pool(cr.dbname) process = pool.get('process.process').browse(cr, uid, [id])[0] diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml index 4ff800ad0cc..c3564e09b1d 100755 --- a/addons/product/process/product_process.xml +++ b/addons/product/process/product_process.xml @@ -8,6 +8,7 @@ + diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml index 8dfc3a340d3..f713baad82e 100755 --- a/addons/project/process/task_process.xml +++ b/addons/project/process/task_process.xml @@ -8,6 +8,7 @@ + diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index 38a2fce7460..8893d0b9df8 100755 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -8,6 +8,7 @@ + diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index 46e13d1d6d2..5c98b95dd48 100755 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -8,6 +8,7 @@ + From df689dad23a05d272ecce06271cb04b757caff84 Mon Sep 17 00:00:00 2001 From: "pso (tiny)" Date: Mon, 29 Dec 2008 10:40:22 +0530 Subject: [PATCH 2/8] minor change bzr revid: pso@tinyerp.com-20081229051022-elqclazvlc1ib28p --- addons/auction/report/huissier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/auction/report/huissier.py b/addons/auction/report/huissier.py index e01063ba9c0..c97f0569e0f 100644 --- a/addons/auction/report/huissier.py +++ b/addons/auction/report/huissier.py @@ -49,7 +49,7 @@ class report_custom(report_rml): for l in lots: # l['id_cont'] = str(i) if l['obj_price']==0: - price_french = 'retiré' + price_french = 'retir�' else: price_french = int_to_text(int(l['obj_price'] or 0.0))+' eur' i+=1 From a16111269bf6bfd2ed9562a0fbc3fd3a786c1b75 Mon Sep 17 00:00:00 2001 From: "pso (tiny)" Date: Mon, 29 Dec 2008 11:10:16 +0530 Subject: [PATCH 3/8] minor change bzr revid: pso@tinyerp.com-20081229054016-azbat260fjvs5mpn --- addons/process/process.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/process/process.py b/addons/process/process.py index 8f88b0b92c5..ab4bf724da0 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -84,8 +84,6 @@ class process_process(osv.osv): return result def graph_get(self, cr, uid, id, res_model, res_id, scale, context): - if not res_model: - res_model = (self.browse(cr, uid, [id])[0]).model_id.model pool = pooler.get_pool(cr.dbname) From a4a6343ac7909446576ada24bd63262a2f53222e Mon Sep 17 00:00:00 2001 From: "pso (tiny)" Date: Mon, 29 Dec 2008 15:39:33 +0530 Subject: [PATCH 4/8] Add mrp operation process bzr revid: pso@tinyerp.com-20081229100933-p6rcs3zojcso0hxo --- addons/mrp_operations/__terp__.py | 3 +- addons/mrp_operations/mrp_operations.py | 4 +- .../process/mrp_operation_process.xml | 116 ++++++++++++++++++ 3 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 addons/mrp_operations/process/mrp_operation_process.xml diff --git a/addons/mrp_operations/__terp__.py b/addons/mrp_operations/__terp__.py index 9d3a61fac38..8044ecc2e26 100755 --- a/addons/mrp_operations/__terp__.py +++ b/addons/mrp_operations/__terp__.py @@ -55,7 +55,8 @@ "demo_xml" : ["mrp_operation_data.xml"], "update_xml" : [ "security/ir.model.access.csv", - "mrp_operations_workflow.xml","mrp_operations_view.xml","mrp_operations_report.xml" + "mrp_operations_workflow.xml","mrp_operations_view.xml","mrp_operations_report.xml", + "process/mrp_operation_process.xml" ], "active": False, "installable": True diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 72316aca8bd..0de73bad7e5 100755 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -47,14 +47,14 @@ class mrp_production_workcenter_line(osv.osv): 'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'), 'date_start': fields.datetime('Start Date'), 'date_finnished': fields.datetime('End Date'), - 'delay': fields.float('Delay',size=128,help="This is delay between operation start and stop in this workcenter",readonly=True), + 'delay': fields.char('Delay',size=128,help="This is delay between operation start and stop in this workcenter",readonly=True), 'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product'), 'qty':fields.related('production_id','product_qty',type='float',string='Qty'), 'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM'), } _defaults = { 'state': lambda *a: 'draft', - 'delay': lambda *a: 0.0 + 'delay': lambda *a: '0 Days 0 hrs and 0 mins' } def modify_production_order_state(self,cr,uid,ids,action): diff --git a/addons/mrp_operations/process/mrp_operation_process.xml b/addons/mrp_operations/process/mrp_operation_process.xml new file mode 100644 index 00000000000..013a629d3a7 --- /dev/null +++ b/addons/mrp_operations/process/mrp_operation_process.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 539d1537a881989dba91a4b4e3d5db850b377cd5 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 30 Dec 2008 14:12:40 +0530 Subject: [PATCH 5/8] base module quality bzr revid: mra@tinyerp.com-20081230084240-go6c5djrruln1dtw --- .../base_module_quality_wizard.xml | 20 +++++++++++----- .../speed_test/speed_test.py | 2 +- .../wizard/module_quality_check.py | 24 ++++++++++++++----- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index f85c19ab6f7..a61d1f4e980 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -7,21 +7,29 @@ Results of Quality Checks wizard.quality.check form + +
+ + + + + +
+
+
+ + Results of Quality Checks with detail + quality.check.detail + form
- - - - - -
diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py index 248a500fa9c..49b10185129 100644 --- a/addons/base_module_quality/speed_test/speed_test.py +++ b/addons/base_module_quality/speed_test/speed_test.py @@ -101,7 +101,7 @@ class quality_test(base_module_quality.abstract_quality_check): summary = """ ===Speed Test===: - This test checks the speed of the module. +This test checks the speed of the module. """+ "Score: " + str(self.score) + "/10\n" else: diff --git a/addons/base_module_quality/wizard/module_quality_check.py b/addons/base_module_quality/wizard/module_quality_check.py index c0640d9a078..8394377b867 100644 --- a/addons/base_module_quality/wizard/module_quality_check.py +++ b/addons/base_module_quality/wizard/module_quality_check.py @@ -76,11 +76,12 @@ class wiz_quality_check(osv.osv_memory): string_ret += val.result['summary'] string_detail += val.result['detail'] self.string_detail = string_detail - return string_ret + return "" def _check_detail(self, cr, uid, data, context={}): return self.string_detail + # def _general_info(self, cr, uid, data, context={}): # return self.general_info @@ -98,16 +99,27 @@ class wiz_quality_check(osv.osv_memory): #~ 'result': {'type':'form', 'arch':form_check, 'fields':fields_check, 'state':[('end','Cancel'),('do','Do Test')]} #~ }, _columns = { - 'general_info': fields.text('General Info', readonly="1",), - 'detail' : fields.text('Detail', readonly="1",), - 'verbose_detail' : fields.text('Verbose Detail', readonly="1",) +# 'general_info': fields.text('General Info', readonly="1",), +# 'detail' : fields.text('Detail', readonly="0",), + 'verbose_detail' : fields.one2many('quality.check.detail', 'quality_check', 'Verbose Detail', readonly="0",) } _defaults = { - 'general_info': _check, - 'detail': _check_detail +# 'general_info': _check, +# 'detail': _check_detail + 'verbose_detail': _check, } wiz_quality_check() +class quality_check_detail(osv.osv_memory): + _name = 'quality.check.detail' + _rec_name = 'quality_check' + _columns = { + 'quality_check': fields.many2one('wizard.quality.check', 'Quality'), + 'general_info': fields.text('General Info', readonly="1",), + 'detail' : fields.text('Detail', readonly="1",), + } +quality_check_detail() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From b707b13b0d0dbefd4170b0f5f2304050f0130ca2 Mon Sep 17 00:00:00 2001 From: "mga (Tiny/Axelor)" Date: Tue, 30 Dec 2008 14:21:16 +0530 Subject: [PATCH 6/8] change the author name for the wiki module bzr revid: mga@tinyerp.com-20081230085116-fr9j0rfr9x9rh96m --- addons/wiki/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/wiki/__terp__.py b/addons/wiki/__terp__.py index 2729cc25a51..547fe8d70e0 100644 --- a/addons/wiki/__terp__.py +++ b/addons/wiki/__terp__.py @@ -1,7 +1,7 @@ { "name" : "Document Management - Wiki", "version" : "1.0", - "author" : "Tiny", + "author" : "Tiny & Axelor", "description": """ The base module to manage documents(wiki) From cc664b259794dde6215dd94ef4ad19c3a6960425 Mon Sep 17 00:00:00 2001 From: "hda (Tiny)" Date: Tue, 30 Dec 2008 15:06:53 +0530 Subject: [PATCH 7/8] Bugfix bzr revid: hda@tinyerp.com-20081230093653-brupehbi02mdz0ie --- addons/point_of_sale/pos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index 18f37db8806..d11313bd4f0 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -822,7 +822,7 @@ class pos_order_line(osv.osv): product_id = self.pool.get('product.product').search(cr, uid, [('ean13','=', ean)]) if not product_id: - return false + return False # search price product product = self.pool.get('product.product').read(cr, uid, product_id) From 7afacab4f3a5221c68bae5c8b746aacc22ced6a1 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 30 Dec 2008 17:31:10 +0530 Subject: [PATCH 8/8] Ponderations system on quality module bzr revid: mra@tinyerp.com-20081230120110-nven6g8rirjgploi --- addons/base_module_quality/base_module_quality.py | 7 +++++++ .../base_module_quality/method_test/method_test.py | 3 ++- .../base_module_quality/pylint_test/pylint_test.py | 3 ++- addons/base_module_quality/speed_test/speed_test.py | 3 ++- .../wizard/module_quality_check.py | 12 ++++++++++-- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index 1a84f35b67a..fa83381c397 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -66,6 +66,10 @@ class abstract_quality_check(object): #False => the module can be uninstalled. self.bool_installed_only = True + + #This variable is use to make result of test should have more weight (Some tests are more critical than others) + self.ponderation = 0.0 + self.tests = [] self.list_folders = os.listdir(config['addons_path']+'/base_module_quality/') for item in self.list_folders: @@ -134,6 +138,9 @@ class abstract_quality_check(object): res_format['summary'] = data_list[0] return res_format + def add_quatation(self, x, y): + return x/y + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_quality/method_test/method_test.py b/addons/base_module_quality/method_test/method_test.py index 1da2e06ad97..3d7f2650fad 100644 --- a/addons/base_module_quality/method_test/method_test.py +++ b/addons/base_module_quality/method_test/method_test.py @@ -38,6 +38,7 @@ class quality_test(base_module_quality.abstract_quality_check): # #""" self.bool_installed_only = True + self.ponderation = 1.0 return None def run_test(self, cr, uid, module_path, module_state): @@ -84,7 +85,7 @@ class quality_test(base_module_quality.abstract_quality_check): This test checks if the module classes are raising exception when calling basic methods or no. -""" + "Score: " + str(self.score) + "/10\n" +""" #+ "Score: " + str(self.score) + "/10\n" else: summary =""" \n===Method Test===: diff --git a/addons/base_module_quality/pylint_test/pylint_test.py b/addons/base_module_quality/pylint_test/pylint_test.py index 333f73f50dc..2620fa3e9cc 100644 --- a/addons/base_module_quality/pylint_test/pylint_test.py +++ b/addons/base_module_quality/pylint_test/pylint_test.py @@ -38,6 +38,7 @@ class quality_test(base_module_quality.abstract_quality_check): # #""" self.bool_installed_only = False + self.ponderation = 1.0 return None def run_test(self, cr, uid, module_path, module_state): @@ -82,7 +83,7 @@ class quality_test(base_module_quality.abstract_quality_check): This test checks if the module satisfy the current coding standard used by OpenERP. -""" + "Score: " + str(self.score) + "/10\n" +""" #+ "Score: " + str(self.score) + "/10\n" else: summary =""" \n===Pylint Test===: diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py index 49b10185129..4e6fb43a2b1 100644 --- a/addons/base_module_quality/speed_test/speed_test.py +++ b/addons/base_module_quality/speed_test/speed_test.py @@ -42,6 +42,7 @@ class quality_test(base_module_quality.abstract_quality_check): # #""" self.bool_installed_only = True + self.ponderation = 1.0 return None def run_test(self, cr, uid, module_path, module_state): pool = pooler.get_pool(cr.dbname) @@ -103,7 +104,7 @@ class quality_test(base_module_quality.abstract_quality_check): This test checks the speed of the module. -"""+ "Score: " + str(self.score) + "/10\n" +"""#+ "Score: " + str(self.score) + "/10\n" else: summary =""" \n===Speed Test===: diff --git a/addons/base_module_quality/wizard/module_quality_check.py b/addons/base_module_quality/wizard/module_quality_check.py index 8394377b867..3bf863764ac 100644 --- a/addons/base_module_quality/wizard/module_quality_check.py +++ b/addons/base_module_quality/wizard/module_quality_check.py @@ -66,6 +66,9 @@ class wiz_quality_check(osv.osv_memory): list_folders = os.listdir(config['addons_path']+'/base_module_quality/') module_name = module_data[0].name abstract_obj = base_module_quality.abstract_quality_check() + score_sum = 0.0 + ponderation_sum = 0.0 + final_score = "" for test in abstract_obj.tests: ad = tools.config['addons_path'] if module_data[0].name == 'base': @@ -73,8 +76,13 @@ class wiz_quality_check(osv.osv_memory): module_path = os.path.join(ad, module_data[0].name) val = test.quality_test() val.run_test(cr, uid, str(module_path), str(module_data[0].state)) - string_ret += val.result['summary'] - string_detail += val.result['detail'] + string_ret += val.result['summary'] #summary tab + string_ret += "Score: " + str(val.score) + "/10\n" #val.score = val.score * val.ponderation ??? + string_detail += val.result['detail'] # detail tab + score_sum += (val.add_quatation(val.score, 10) * val.ponderation) + ponderation_sum += val.ponderation + final_score = str(score_sum / ponderation_sum * 100) + "%" + string_ret += "\n\nPonderation Result for module:" + final_score self.string_detail = string_detail return ""