From 03e0e088d9a5f6b60800c1b86a33fcc1e4a6d077 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Mon, 8 Dec 2008 17:39:40 +0530 Subject: [PATCH 01/55] minor changed in hr_attendance bzr revid: solanki.priyesh@gmail.com-20081208120940-tcyki05qw4c3u86o --- addons/hr_attendance/hr_attendance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index dfa1e3a7635..68561933b0a 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -71,7 +71,8 @@ class hr_attendance(osv.osv): ''' % (id, id) cr.execute(sql) atts = cr.fetchall() - if not ((len(atts)==1 and atts[0][0] == 'sign_in') or (atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1])): + print "ATTS", atts + if not ((len(atts)==1 and atts[0][0] == 'sign_in')) or (atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1]): return False return True From 124bf12c4558934d1fd375965ff1d4679ff7aac0 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Wed, 10 Dec 2008 18:16:03 +0530 Subject: [PATCH 02/55] minor change bzr revid: solanki.priyesh@gmail.com-20081210124603-6suh2uqyh4931jq4 --- addons/product/__terp__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py index f345a77ede4..79c07240395 100644 --- a/addons/product/__terp__.py +++ b/addons/product/__terp__.py @@ -48,7 +48,8 @@ "update_xml" : [ "security/product_security.xml", "security/ir.model.access.csv", - "product_data.xml","product_report.xml", + "product_data.xml", + "product_report.xml", "product_view.xml", "pricelist_view.xml", "partner_view.xml", "product_wizard.xml", "process/product_process.xml" From ac68d17cc5c8b0063bc781a2dca1a495baf6f153 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Thu, 11 Dec 2008 17:20:52 +0530 Subject: [PATCH 03/55] minor change bzr revid: solanki.priyesh@gmail.com-20081211115052-oi8314q6m9kr5v8r --- addons/hr_attendance/hr_attendance.py | 3 +-- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py index 68561933b0a..dfa1e3a7635 100644 --- a/addons/hr_attendance/hr_attendance.py +++ b/addons/hr_attendance/hr_attendance.py @@ -71,8 +71,7 @@ class hr_attendance(osv.osv): ''' % (id, id) cr.execute(sql) atts = cr.fetchall() - print "ATTS", atts - if not ((len(atts)==1 and atts[0][0] == 'sign_in')) or (atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1]): + if not ((len(atts)==1 and atts[0][0] == 'sign_in') or (atts[0][0] != atts[1][0] and atts[0][1] != atts[1][1])): return False return True diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 114a4a72997..4c522f0c3e3 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -635,7 +635,7 @@ class hr_timesheet_sheet_sheet_account(osv.osv): 'sheet_id': fields.many2one('hr_timesheet_sheet.sheet', 'Sheet', readonly=True), 'total': fields.float('Total Time', digits=(16,2), readonly=True), 'invoice_rate': fields.many2one('hr_timesheet_invoice.factor', 'Invoice rate', readonly=True), - } + } def init(self, cr): cr.execute("""create or replace view hr_timesheet_sheet_sheet_account as ( From 098d05d60e178ec6173a62ee14415ae2b4310121 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Fri, 12 Dec 2008 12:49:17 +0530 Subject: [PATCH 04/55] minor change bzr revid: solanki.priyesh@gmail.com-20081212071917-xsy9rn0m77h57uyr --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 32c7ed49c27..0159e019572 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -329,7 +329,7 @@ calendar - + From 5dfc867c763b0533ad98f2858cc83083ba1199d3 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Wed, 17 Dec 2008 10:42:28 +0530 Subject: [PATCH 05/55] minor changes bzr revid: solanki.priyesh@gmail.com-20081217051228-wlc5dm63ewbr114o --- addons/base_module_publish/wizard/module_zip.py | 4 ++-- addons/base_module_publish/wizard/wizard_module_export.py | 2 +- addons/project/project.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/base_module_publish/wizard/module_zip.py b/addons/base_module_publish/wizard/module_zip.py index 4014927bf99..a6e64845988 100644 --- a/addons/base_module_publish/wizard/module_zip.py +++ b/addons/base_module_publish/wizard/module_zip.py @@ -42,7 +42,7 @@ def _zippy(archive, fromurl, path, src=True): else: exclude = ['py','pyo','pyc'] if (path.split('.')[-1] not in exclude) or (os.path.basename(path)=='__terp__.py'): - archive.write(os.path.join(fromurl, path), path) + archive.write(os.path.join(fromurl, path).encode(), path.encode()) return True def createzip(cr, uid, moduleid, context, b64enc=True, src=True): @@ -59,7 +59,7 @@ def createzip(cr, uid, moduleid, context, b64enc=True, src=True): if os.path.isdir(os.path.join(ad, module.name)): archname = StringIO.StringIO('wb') archive = PyZipFile(archname, "w", ZIP_DEFLATED) - archive.writepy(os.path.join(ad, module.name)) + archive.writepy(os.path.join(ad, module.name).encode()) _zippy(archive, ad, module.name, src=src) archive.close() val =archname.getvalue() diff --git a/addons/base_module_publish/wizard/wizard_module_export.py b/addons/base_module_publish/wizard/wizard_module_export.py index 0c8bf2f0266..64195741759 100644 --- a/addons/base_module_publish/wizard/wizard_module_export.py +++ b/addons/base_module_publish/wizard/wizard_module_export.py @@ -52,7 +52,7 @@ finish_fields = { class move_module_wizard(wizard.interface): def createzip(self, cr, uid, data, context): - return module_zip.createzip(cr, uid, data['id'], context, src=data['form']['include_src']) + return module_zip.createzip(cr, uid, data['id'], context, src=data['form']['include_src']) states = { 'init': { diff --git a/addons/project/project.py b/addons/project/project.py index 41e6750ecc3..d5d6f1ecd86 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -410,12 +410,12 @@ class project_work(osv.osv): _order = "date desc" def create(self, cr, uid, vals, *args, **kwargs): if 'task_id' in vals: - cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%s', (-vals.get('hours',0.0), vals['task_id'])) + cr.execute('update project_task set remaining_hours=remaining_hours+%.2s where id=%s', (-vals.get('hours',0.0), vals['task_id'])) return super(project_work,self).create(cr, uid, vals, *args, **kwargs) def write(self, cr, uid, ids,vals,context={}): for work in self.browse(cr, uid, ids, context): - cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2f) where id=%s', (-vals.get('hours',0.0), work.hours, work.task_id.id)) + cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2s) where id=%s', (-vals.get('hours',0.0), work.hours, work.task_id.id)) return super(project_work,self).write(cr, uid, ids, vals, context) def unlink(self, cr, uid, ids, *args, **kwargs): From 576216e8464e600cb498ae6413e101bbbc7690aa Mon Sep 17 00:00:00 2001 From: Priyesh Date: Wed, 17 Dec 2008 19:09:33 +0530 Subject: [PATCH 06/55] change in process bzr revid: solanki.priyesh@gmail.com-20081217133933-hfhl08mxoug5nnx7 --- .../process/customer_invoice_process.xml | 2 +- addons/account/process/statement_process.xml | 9 ++++--- .../process/supplier_invoice_process.xml | 2 +- .../board_crm_view.xml | 10 ++++---- addons/crm/crm.py | 1 + .../process/hr_timesheet_project_process.xml | 2 +- .../process/hr_timesheet_sheet_process.xml | 4 +-- addons/mrp/process/procurement_process.xml | 3 ++- addons/project/process/task_process.xml | 2 +- .../process/project_mrp_process.xml | 2 +- addons/purchase/process/purchase_process.xml | 25 +++++++++++++++++-- addons/sale/process/sale_process.xml | 1 + addons/sale_crm/process/sale_crm_process.xml | 1 + addons/stock/process/stock_process.xml | 24 ++---------------- 14 files changed, 47 insertions(+), 41 deletions(-) diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index be50089cc9d..581ca083ac9 100755 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -60,7 +60,7 @@ - + diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml index 9fa1bf6becb..d0105f76e03 100755 --- a/addons/account/process/statement_process.xml +++ b/addons/account/process/statement_process.xml @@ -16,7 +16,7 @@ --> - + @@ -27,7 +27,7 @@ - + @@ -38,7 +38,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -65,6 +65,7 @@ + diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml index ef335146fa9..be4892c0da9 100755 --- a/addons/account/process/supplier_invoice_process.xml +++ b/addons/account/process/supplier_invoice_process.xml @@ -38,7 +38,7 @@ - + diff --git a/addons/board_crm_configuration/board_crm_view.xml b/addons/board_crm_configuration/board_crm_view.xml index 6672e13b2b1..2508f15e1ef 100644 --- a/addons/board_crm_configuration/board_crm_view.xml +++ b/addons/board_crm_configuration/board_crm_view.xml @@ -22,7 +22,7 @@ form tree,form - [('section_id', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] @@ -30,7 +30,7 @@ form tree,form - [('section_id', '=', 'Meetings'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Meetings'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] form graph,tree,form - [('section_id', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] @@ -53,7 +53,7 @@ form graph,tree,form - [('section_id', '=', 'Opportunities'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Opportunities'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] @@ -61,7 +61,7 @@ form graph,tree,form - [('section_id','=','Jobs'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name','=','Jobs'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 7ba7c6d0337..b1451e7b90a 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -181,6 +181,7 @@ class crm_case_section(osv.osv): 'object': True }) return True + def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] diff --git a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml index c07d8deffcf..53dbc32e056 100755 --- a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml +++ b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml @@ -10,7 +10,7 @@ - + diff --git a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml index 1f467a1c2e2..f7fdf41a5cd 100755 --- a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml +++ b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml @@ -41,8 +41,9 @@ - + + @@ -72,7 +73,6 @@ - diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 9724c5c28f1..4818f33d5da 100755 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -154,6 +154,7 @@ + @@ -171,7 +172,7 @@ - + diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml index 945db0e3498..675437c8d81 100755 --- a/addons/project/process/task_process.xml +++ b/addons/project/process/task_process.xml @@ -64,7 +64,7 @@ - + diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml index d4d44f374e3..d187d5f3f37 100755 --- a/addons/project_mrp/process/project_mrp_process.xml +++ b/addons/project_mrp/process/project_mrp_process.xml @@ -22,7 +22,7 @@ - + diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index dae58ba269a..3dfbbf4cb83 100755 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -14,6 +14,18 @@ + + + + + + + + + + + + @@ -78,7 +90,7 @@ - + @@ -101,7 +113,7 @@ - + @@ -205,6 +217,15 @@ + + + + + + + + + diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index d371081d2c3..553c46bade6 100755 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -66,6 +66,7 @@ + diff --git a/addons/sale_crm/process/sale_crm_process.xml b/addons/sale_crm/process/sale_crm_process.xml index 6ea2f7e3ede..861d21672ac 100755 --- a/addons/sale_crm/process/sale_crm_process.xml +++ b/addons/sale_crm/process/sale_crm_process.xml @@ -22,6 +22,7 @@ + diff --git a/addons/stock/process/stock_process.xml b/addons/stock/process/stock_process.xml index 8dce029be20..aade7ce555a 100755 --- a/addons/stock/process/stock_process.xml +++ b/addons/stock/process/stock_process.xml @@ -1,23 +1,12 @@ - - - - - - - - - - - - + - + @@ -33,15 +22,6 @@ - - - - - - - - - \ No newline at end of file From cb7ab929d3a3782d00efcf649f3bb777217ae3f5 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Fri, 19 Dec 2008 10:33:35 +0530 Subject: [PATCH 07/55] changes in process bzr revid: solanki.priyesh@gmail.com-20081219050335-kcfiq14hpsmvopyw --- .../process/customer_invoice_process.xml | 3 +- .../process/supplier_invoice_process.xml | 22 ++++++- addons/hr/process/hr_process.xml | 18 ------ .../process/hr_timesheet_project_process.xml | 2 +- .../process/hr_timesheet_sheet_process.xml | 7 +- addons/mrp/process/procurement_process.xml | 64 +++++++++---------- addons/project/process/task_process.xml | 2 +- .../process/project_mrp_process.xml | 54 ++++++++-------- addons/purchase/process/purchase_process.xml | 30 +++++++-- addons/sale/process/sale_process.xml | 7 +- addons/stock/__terp__.py | 1 - addons/stock/process/stock_process.xml | 27 -------- 12 files changed, 115 insertions(+), 122 deletions(-) delete mode 100755 addons/stock/process/stock_process.xml diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index 581ca083ac9..c3fedd1826e 100755 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -18,11 +18,10 @@ - + - diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml index be4892c0da9..613aaaa4005 100755 --- a/addons/account/process/supplier_invoice_process.xml +++ b/addons/account/process/supplier_invoice_process.xml @@ -15,6 +15,17 @@ Process Node --> + + + + + + + + + + + @@ -45,7 +56,7 @@ - + @@ -95,6 +106,15 @@ Process Transition --> + + + + + + + + + diff --git a/addons/hr/process/hr_process.xml b/addons/hr/process/hr_process.xml index c1d85525b79..42c9fd022ab 100755 --- a/addons/hr/process/hr_process.xml +++ b/addons/hr/process/hr_process.xml @@ -15,15 +15,6 @@ Process Node --> - - - - - - - - - @@ -67,15 +58,6 @@ - - - - - - - - - diff --git a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml index 53dbc32e056..390e572c52b 100755 --- a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml +++ b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml @@ -66,7 +66,7 @@ - + diff --git a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml index f7fdf41a5cd..a664be5e1ee 100755 --- a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml +++ b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml @@ -129,9 +129,10 @@ - + + @@ -149,7 +150,7 @@ - + @@ -158,7 +159,7 @@ - + diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 4818f33d5da..39e599c27e2 100755 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -29,7 +29,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -79,8 +79,8 @@ - - + + @@ -91,18 +91,18 @@ - + - + - + @@ -113,7 +113,7 @@ - + @@ -125,10 +125,10 @@ - + - + @@ -136,7 +136,7 @@ - + @@ -216,7 +216,7 @@ - + @@ -229,67 +229,67 @@ - + - - + + - + - - + + - + - + - + - + - + - - + + - + - - + + - + - - + + diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml index 675437c8d81..8dfc3a340d3 100755 --- a/addons/project/process/task_process.xml +++ b/addons/project/process/task_process.xml @@ -65,7 +65,7 @@ - + diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml index d187d5f3f37..21c641dd8e4 100755 --- a/addons/project_mrp/process/project_mrp_process.xml +++ b/addons/project_mrp/process/project_mrp_process.xml @@ -21,15 +21,16 @@ - + - + + - + @@ -54,7 +55,6 @@ - @@ -63,39 +63,37 @@ - - - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index 3dfbbf4cb83..38a2fce7460 100755 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -18,10 +18,9 @@ - + - @@ -43,7 +42,7 @@ - + @@ -53,8 +52,8 @@ - - + + @@ -118,6 +117,18 @@ + + + + + + + + + + + + @@ -151,6 +162,15 @@ + + + + + + + + + diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index 553c46bade6..46e13d1d6d2 100755 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -33,6 +33,7 @@ + @@ -42,7 +43,7 @@ - + @@ -53,8 +54,8 @@ - - + + diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index dc09385b09f..1d012329503 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -42,7 +42,6 @@ "report_stock_view.xml", "security/stock_security.xml", "security/ir.model.access.csv", - "process/stock_process.xml" ], "active": False, "installable": True diff --git a/addons/stock/process/stock_process.xml b/addons/stock/process/stock_process.xml deleted file mode 100755 index aade7ce555a..00000000000 --- a/addons/stock/process/stock_process.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From cd49af64f17b4dc5248a22925042eb45ff3b6d10 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Fri, 19 Dec 2008 14:42:29 +0530 Subject: [PATCH 08/55] improvement in procurement process bzr revid: solanki.priyesh@gmail.com-20081219091229-eodw12wdqm9pa1hu --- addons/.project | 17 ++ addons/.pydevproject | 6 + addons/mrp/__terp__.py | 2 + addons/mrp/process/procurement_process.xml | 150 +----------------- .../mrp/process/service_product_process.xml | 95 +++++++++++ .../mrp/process/stockable_product_process.xml | 115 ++++++++++++++ .../process/project_mrp_process.xml | 2 +- 7 files changed, 241 insertions(+), 146 deletions(-) create mode 100644 addons/.project create mode 100644 addons/.pydevproject create mode 100644 addons/mrp/process/service_product_process.xml create mode 100644 addons/mrp/process/stockable_product_process.xml diff --git a/addons/.project b/addons/.project new file mode 100644 index 00000000000..ada2ccca54d --- /dev/null +++ b/addons/.project @@ -0,0 +1,17 @@ + + + addons-pso-process + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/addons/.pydevproject b/addons/.pydevproject new file mode 100644 index 00000000000..78259a9c3db --- /dev/null +++ b/addons/.pydevproject @@ -0,0 +1,6 @@ + + + + +python 2.4 + diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index 5ea266c3a0d..b8cb6a2d3da 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -64,6 +64,8 @@ "mrp_wizard.xml", "mrp_report.xml", "company_view.xml", + "process/stockable_product_process.xml", + "process/service_product_process.xml", "process/procurement_process.xml", ], "active": False, diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 39e599c27e2..a1c2429f917 100755 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -18,7 +18,7 @@ - + @@ -50,9 +50,10 @@ - + + @@ -61,93 +62,15 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -229,69 +152,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/mrp/process/service_product_process.xml b/addons/mrp/process/service_product_process.xml new file mode 100644 index 00000000000..abaa418331e --- /dev/null +++ b/addons/mrp/process/service_product_process.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/mrp/process/stockable_product_process.xml b/addons/mrp/process/stockable_product_process.xml new file mode 100644 index 00000000000..9c885d51942 --- /dev/null +++ b/addons/mrp/process/stockable_product_process.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml index 21c641dd8e4..7082deef237 100755 --- a/addons/project_mrp/process/project_mrp_process.xml +++ b/addons/project_mrp/process/project_mrp_process.xml @@ -36,7 +36,7 @@ - + From 50839dcb9338d184c8a0c34e1c23e13035790523 Mon Sep 17 00:00:00 2001 From: Priyesh Date: Mon, 22 Dec 2008 11:54:53 +0530 Subject: [PATCH 09/55] minor changes bzr revid: solanki.priyesh@gmail.com-20081222062453-tl19d4oiu1huu0xm --- addons/product/report/product_label.xsl | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/product/report/product_label.xsl b/addons/product/report/product_label.xsl index 2df7e8d3e2c..fcfe1d6e56f 100644 --- a/addons/product/report/product_label.xsl +++ b/addons/product/report/product_label.xsl @@ -70,7 +70,6 @@ - , From 5daa2f6a58fddaef074b1ab226264f727cfd43d2 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 23 Dec 2008 14:06:25 +0530 Subject: [PATCH 10/55] base module quality bzr revid: mra@tinyerp.com-20081223083625-50ecblg4n0ungj35 --- .../method_test/method_test.py | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/addons/base_module_quality/method_test/method_test.py b/addons/base_module_quality/method_test/method_test.py index 84f3f167247..c64ad468d2e 100644 --- a/addons/base_module_quality/method_test/method_test.py +++ b/addons/base_module_quality/method_test/method_test.py @@ -42,18 +42,20 @@ Method Test: return None def run_test(self, module_path, module_name=None, cr=None, uid=None): + model_list = [] pool = pooler.get_pool(cr.dbname) - ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module_name), ('model','=','ir.model')]) + model_obj = pool.get('ir.model.data') + ids2 = model_obj.search(cr, uid, [('module','=', module_name), ('model','=','ir.model')]) + model_data = model_obj.browse(cr, uid, ids2) + for model in model_data: + model_list.append(model.res_id) obj_list = [] - for mod in pool.get('ir.model.data').browse(cr, uid, ids2): - object_name = mod.name.split('_') - object_name.pop(0) - object_name = '.'.join(object_name) - obj_list.append(str(object_name)) - result={} + for mod in pool.get('ir.model').browse(cr, uid, model_list): + obj_list.append(str(mod.model)) + result = {} self.result += "Module Name:" + module_name + '\n' + '===============\n' for obj in obj_list: - temp=[] + temp = [] try: res = pool.get(obj).search(cr, uid, []) temp.append('Ok') @@ -70,11 +72,11 @@ Method Test: except: temp.append('Exception') result[obj] = temp - self.result+=("%-40s %-12s \t %-16s %-12s")%('Object Name'.ljust(40),'search','fields_view_get','read') - self.result+='\n' + self.result += ("%-40s %12s %16s %12s")%('Object Name'.ljust(40),'search','fields_view_get','read') + self.result += '\n' for res in result: - self.result+=("%-40s %-12s \t %-16s \t %-12s")%(res.ljust(40),result[res][0],result[res][1],result[res][2]) - self.result+="\n" + self.result += ("%-40s %12s %16s %12s")%(res.ljust(40),result[res][0],result[res][1],result[res][2]) + self.result += "\n" return None From 66e03f2f50e9ff7c5be5cc9b27d89a0996f28e7e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 23 Dec 2008 16:13:50 +0100 Subject: [PATCH 11/55] [FIX] RuntimeError in the cache system lp bug: https://launchpad.net/bugs/310918 fixed bzr revid: christophe@cobalt-20081223151350-aw44igucwyldnhwr --- bin/tools/misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 93b2d832430..993f4eb03f8 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -552,9 +552,9 @@ class cache(object): if time.time()-self.timeout > self.lasttime: self.lasttime = time.time() t = time.time()-self.timeout - for key in self.cache: - if self.cache[key][1] Date: Tue, 23 Dec 2008 16:58:47 +0100 Subject: [PATCH 12/55] improvement of base_module_quality: *changed signature of run_test() method, added cr and uid *switched wizard to osv_memory, to use text_wiki in the result window *improved method_test.py, added score computation, corrected self.bool_installed_only var, use text_wiki widget *implemented speed_test.py, first throw *improvement of base_module_quality/wizard/module_quality_check.py bzr revid: qdp@tinyerp.com-20081223155847-4qm6095jomgwvuju --- .../base_module_quality.py | 2 +- .../base_module_quality_wizard.xml | 26 +++++- .../method_test/method_test.py | 41 ++++++---- .../pylint_test/pylint_test.py | 2 +- .../speed_test/speed_test.py | 80 +++++++++++++++++-- .../wizard/module_quality_check.py | 67 +++++++++------- 6 files changed, 166 insertions(+), 52 deletions(-) diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index 2965ad41f16..195e345e8ef 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -49,7 +49,7 @@ class abstract_quality_check(object): ''' raise 'Not Implemented' - def run_test(self, module_path=""): + def run_test(self, cr, uid, module_path=""): ''' this method should do the test and fill the score, result and result_details var ''' diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index be0048feb80..df75c45715a 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -1,6 +1,28 @@ - + + + + Results of Quality Checks + wizard.quality.check + form + +
+ + + + +
+
-
\ No newline at end of file + + diff --git a/addons/base_module_quality/method_test/method_test.py b/addons/base_module_quality/method_test/method_test.py index c64ad468d2e..b89614331d2 100644 --- a/addons/base_module_quality/method_test/method_test.py +++ b/addons/base_module_quality/method_test/method_test.py @@ -31,52 +31,63 @@ class quality_test(base_module_quality.abstract_quality_check): def __init__(self): self.result = """ -Method Test: ------------- +===Method Test=== - This test checks if the class method has exception or not. +This test checks if the module classes are raising exception when calling basic methods or no. """ - self.bool_installed_only = False + self.bool_installed_only = True return None - def run_test(self, module_path, module_name=None, cr=None, uid=None): - model_list = [] + def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) - model_obj = pool.get('ir.model.data') - ids2 = model_obj.search(cr, uid, [('module','=', module_name), ('model','=','ir.model')]) - model_data = model_obj.browse(cr, uid, ids2) + module_name = module_path.split('/')[-1] + ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module_name), ('model','=','ir.model')]) + model_list = [] + model_data = pool.get('ir.model.data').browse(cr, uid, ids2) for model in model_data: model_list.append(model.res_id) obj_list = [] for mod in pool.get('ir.model').browse(cr, uid, model_list): obj_list.append(str(mod.model)) - result = {} - self.result += "Module Name:" + module_name + '\n' + '===============\n' + result={} + ok_count = 0 + ex_count = 0 + for obj in obj_list: temp = [] try: res = pool.get(obj).search(cr, uid, []) temp.append('Ok') + ok_count += 1 except: temp.append('Exception') + ex_count += 1 try: res1 = pool.get(obj).fields_view_get(cr, uid,) temp.append('Ok') + ok_count += 1 except: temp.append('Exception') + ex_count += 1 try: res2 = pool.get(obj).read(cr, uid, []) temp.append('Ok') + ok_count += 1 except: temp.append('Exception') + ex_count += 1 result[obj] = temp - self.result += ("%-40s %12s %16s %12s")%('Object Name'.ljust(40),'search','fields_view_get','read') - self.result += '\n' + self.result+=('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-16s \n! %-20s \n! %-16s ') % ('Object Name'.ljust(40), 'search()'.ljust(16), 'fields_view_get()'.ljust(20), 'read()'.ljust(16)) + for res in result: - self.result += ("%-40s %12s %16s %12s")%(res.ljust(40),result[res][0],result[res][1],result[res][2]) - self.result += "\n" + self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s ') % (res, result[res][0],result[res][1], result[res][2]) + + self.result += '\n|}' + print "RES", self.result + self.score = (ok_count + ex_count) and float(ok_count)/float(ok_count + ex_count) or 0.0 + return None diff --git a/addons/base_module_quality/pylint_test/pylint_test.py b/addons/base_module_quality/pylint_test/pylint_test.py index bb31eef5e3a..41c2529d29a 100644 --- a/addons/base_module_quality/pylint_test/pylint_test.py +++ b/addons/base_module_quality/pylint_test/pylint_test.py @@ -41,7 +41,7 @@ Pylint Test: self.bool_installed_only = False return None - def run_test(self, module_path): + def run_test(self, cr, uid, module_path): config_file_path = config['addons_path']+'/base_module_quality/pylint_test/pylint_test_config.txt' list_files = os.listdir(module_path) for i in list_files: diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py index 89479ddf18b..7858974dd00 100644 --- a/addons/base_module_quality/speed_test/speed_test.py +++ b/addons/base_module_quality/speed_test/speed_test.py @@ -24,6 +24,9 @@ import netsvc from osv import fields, osv import os from tools import config +import pooler +import time + from base_module_quality import base_module_quality @@ -32,19 +35,84 @@ class quality_test(base_module_quality.abstract_quality_check): def __init__(self): self.result = """ -Speed Test: ------------- - - This test checks the speed of the module +===Speed Test=== - to be continued... +This test checks the speed of the module. + """ self.bool_installed_only = True return None - def run_test(self, module_path): + def run_test(self, cr, uid, module_path): + pool = pooler.get_pool(cr.dbname) + module_name = module_path.split('/')[-1] + self.result+=('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s') % ('Object Name'.ljust(40), 'Size (S)'.ljust(10), '1'.ljust(10), 'S/2'.ljust(10), 'S'.ljust(10), 'Complexity'.ljust(20)) + ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module_name), ('model','=','ir.model')]) + model_data = pool.get('ir.model.data').browse(cr, uid, ids2) + model_list = [] + for model in model_data: + model_list.append(model.res_id) + obj_list = [] + for mod in pool.get('ir.model').browse(cr, uid, model_list): + obj_list.append(str(mod.model)) + + obj_counter = 0 + score = 0 + for obj in obj_list: + obj_counter += 1 + ids = pool.get(obj).search(cr, uid, []) + ids = ids[:100] + size = len(ids) + if size: + c1 = time.time() + pool.get(obj).read(cr, uid, ids[0]) + c2 = time.time() + base_time = c2 - c1 + + c1 = time.time() + pool.get(obj).read(cr, uid, ids[:size/2]) + c2 = time.time() + halfsize_time = c2 - c1 + + c1 = time.time() + pool.get(obj).read(cr, uid, ids) + c2 = time.time() + size_time = c2 - c1 + if size < 5: + self.score += -2 + self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, base_time, halfsize_time, size_time, "Warning! Not enough demo data") + else: + tolerated_margin = 5/100 + complexity = "not recognized" + if min(size_time,base_time,halfsize_time) != base_time: + complexity = "O(1)" + score += 10 + + else: + k1 = (halfsize_time - base_time)*1000 / ((size/2) - 1) + k2 = (size_time - base_time)*1000 / ((size) - 1) + tmp = k1 * tolerated_margin + if (k1 - tmp) < k2 and k2 < (k1 + tmp): + complexity = "O(n)" + if round(tmp) == 0: + complexity = "O(1)" + score += 10 + else: + score += 5 + else: + complexity = "O(n²) or worst" + score += 0 + + self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, base_time, halfsize_time, size_time, complexity) + else: + score += -5 + self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, "", "", "", "Warning! Object has no demo data") + + + self.result += '\n|}' + self.score = obj_counter and score/obj_counter or 0.0 return None # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_quality/wizard/module_quality_check.py b/addons/base_module_quality/wizard/module_quality_check.py index da067551e6d..7eafc24e933 100644 --- a/addons/base_module_quality/wizard/module_quality_check.py +++ b/addons/base_module_quality/wizard/module_quality_check.py @@ -21,81 +21,94 @@ ############################################################################## import wizard import pooler +from osv import osv, fields import tools import os #TODO: (utiliser les nouveaux wizards pour heriter la vue et rajouter un onglet par test?) -#TODO: configure pylint #TODO: implement the speed test -#TODO: implement the simple test #TODO: add cheks: do the class quality_check inherits the class abstract_quality_check? #TODO: improve translability +#TODO: clean #To keep or not? to be discussed... -view_form = """ -
- - - - - -
""" +#~ view_form = """ +#~
+ #~ + #~ + #~ + #~ + #~ +#~
""" -view_field = { - "general_info": {'type': 'text', 'string': 'General Info', 'readonly':True}, -} +#~ view_field = { + #~ "general_info": {'type': 'text', 'string': 'General Info', 'readonly':True}, +#~ } -class wiz_quality_check(wizard.interface): +class wiz_quality_check(osv.osv_memory): + +# general_info = "" + _name = 'wizard.quality.check' def _check(self, cr, uid, data, context={}): string_ret = "" from tools import config + print data + data['ids'] = data.get('module_id', False) pool = pooler.get_pool(cr.dbname) - module_data = pool.get('ir.module.module').browse(cr, uid, data['ids']) + module_data = pool.get('ir.module.module').browse(cr, uid, [data['ids']]) list_folders = os.listdir(config['addons_path']+'/base_module_quality/') module_name = module_data[0].name for item in list_folders: path = config['addons_path']+'/base_module_quality/'+item if os.path.exists(path+'/'+item+'.py') and item not in ['report', 'wizard', 'security']: ad = tools.config['addons_path'] + if module_data[0].name == 'base': + ad = tools.config['root_path']+'/addons' module_path = os.path.join(ad, module_data[0].name) item2 = 'base_module_quality.'+item+'.'+item x = __import__(item2) x2 = getattr(x, item) x3 = getattr(x2, item) val = x3.quality_test() - if (not val.bool_installed_only or module_data[0].state == "installed") and item == 'method_test': - val.run_test(str(module_path), module_name, cr, uid) - elif not val.bool_installed_only or module_data[0].state == "installed" : - val.run_test(str(module_path)) + if (not val.bool_installed_only or module_data[0].state == "installed"): + val.run_test(cr, uid, str(module_path)) else: val.result += "The module has to be installed before running this test." string_ret += val.result + return string_ret - return {'general_info':string_ret} +# def _general_info(self, cr, uid, data, context={}): +# return self.general_info - states = { + #~ states = { + #~ 'init': { + #~ 'actions': [_check], + #~ 'result': {'type':'form', 'arch':view_form, 'fields':view_field, 'state':[('end','Ok')]}, + #~ }, + #~ } #To keep or not? to be discussed... #~ 'init': { #~ 'actions': [], #~ 'result': {'type':'form', 'arch':form_check, 'fields':fields_check, 'state':[('end','Cancel'),('do','Do Test')]} #~ }, - 'init': { - 'actions': [_check], - 'result': {'type':'form', 'arch':view_form, 'fields':view_field, 'state':[('end','Ok')]}, - }, - } + _columns = { + 'general_info': fields.text('General Info', readonly="1",), + } + _defaults = { + 'general_info': _check + } -wiz_quality_check('base.module.quality') +wiz_quality_check() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 1babad50c2aa1b3a5aa960eeeef41754cc6698cc Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 23 Dec 2008 17:22:10 +0100 Subject: [PATCH 13/55] [FIX] bug with invoice lp bug: https://launchpad.net/bugs/310919 fixed bzr revid: christophe@cobalt-20081223162210-chbr8wg9ae19cwbm --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 5887613940c..39e03c710ad 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -448,10 +448,10 @@ class account_invoice(osv.osv): ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') acc_obj = self.pool.get('account.account') + self.button_compute(cr, uid, ids, context={}, set_total=True) for inv in self.browse(cr, uid, ids): if inv.move_id: continue - self.button_compute(cr, uid, ids, context={},set_total=True) if inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0): raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe real total does not match the computed total.')) if not inv.date_invoice: From fcad7df0ed4dd69475d5151847bc61dd37d9cf5b Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Tue, 23 Dec 2008 18:27:18 +0100 Subject: [PATCH 14/55] [IMP] Add the signal handlers bzr revid: stephane@tinyerp.com-20081223172718-umgii173klrcmfad --- bin/openerp-server.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bin/openerp-server.py b/bin/openerp-server.py index f1378ddef5d..36a9caf089e 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -55,14 +55,6 @@ __version__ = release.version import netsvc logger = netsvc.Logger() -def atexit_callback(): - logger.notifyChannel('shutdown', netsvc.LOG_INFO, "Shutdown Server!") - #logger.notifyChannel('pan! pan!', netsvc.LOG_INFO, "Killed Server ;-)") - -import atexit - -atexit.register(atexit_callback) - #----------------------------------------------------------------------- # import the tools module so that the commandline parameters are parsed #----------------------------------------------------------------------- @@ -201,6 +193,7 @@ def handler(signum, frame): netsvc.Agent.quit() if config['pidfile']: os.unlink(config['pidfile']) + logger.notifyChannel('shutdown', netsvc.LOG_INFO, "Shutdown Server!") sys.exit(0) from tools import config @@ -210,8 +203,8 @@ if config['pidfile']: fd.write(pidtext) fd.close() -signal.signal(signal.SIGINT, handler) -signal.signal(signal.SIGTERM, handler) +for sign in ('SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGQUIT'): + signal.signal(getattr(signal, sign), handler) logger.notifyChannel("web-services", netsvc.LOG_INFO, 'the server is running, waiting for connections...') if tools.config['netrpc']: From 0589e6e2855c075678e1e8715b1c085bc9b9f92f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 23 Dec 2008 18:38:53 +0100 Subject: [PATCH 15/55] [FIX] change parameters position to be compatible with the herited function lp bug: https://launchpad.net/bugs/310939 fixed bzr revid: christophe@cobalt-20081223173853-x9hxv0ag3bmuvlz0 --- .../analytic_journal_billing_rate.py | 2 +- .../analytic_journal_billing_rate_view.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/analytic_journal_billing_rate/analytic_journal_billing_rate.py b/addons/analytic_journal_billing_rate/analytic_journal_billing_rate.py index 58e9d9a7fb8..471421638de 100644 --- a/addons/analytic_journal_billing_rate/analytic_journal_billing_rate.py +++ b/addons/analytic_journal_billing_rate/analytic_journal_billing_rate.py @@ -48,7 +48,7 @@ class hr_analytic_timesheet(osv.osv): _inherit = "hr.analytic.timesheet" - def on_change_account_id(self, cr, uid, ids,user_id, account_id, journal_id,unit_amount=0): + def on_change_account_id(self, cr, uid, ids,user_id, account_id, unit_amount=0, journal_id=0): res = {} if not (account_id): #avoid a useless call to super diff --git a/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml b/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml index cc5219efb30..c5c797a3a83 100644 --- a/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml +++ b/addons/analytic_journal_billing_rate/analytic_journal_billing_rate_view.xml @@ -49,7 +49,7 @@ - +
@@ -62,7 +62,7 @@ - +
From ad6871c77c472e510ab994c34be226754a5dbd94 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 24 Dec 2008 00:38:42 +0100 Subject: [PATCH 16/55] [IMP] Refactoring, resulting from pylint [IMP] Improve the signal management bzr revid: stephane@tinyerp.com-20081223233842-xkn2tc0g6kk7pryy --- bin/openerp-server.py | 46 ++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/bin/openerp-server.py b/bin/openerp-server.py index 36a9caf089e..70e8f87dabe 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -125,7 +125,9 @@ if tools.config["translate_out"]: msg = "language %s" % (tools.config["language"],) else: msg = "new language" - logger.notifyChannel("init", netsvc.LOG_INFO, 'writing translation file for %s to %s' % (msg, tools.config["translate_out"])) + logger.notifyChannel("init", netsvc.LOG_INFO, + 'writing translation file for %s to %s' % (msg, + tools.config["translate_out"])) fileformat = os.path.splitext(tools.config["translate_out"])[-1][1:].lower() buf = file(tools.config["translate_out"], "w") @@ -136,7 +138,9 @@ if tools.config["translate_out"]: sys.exit(0) if tools.config["translate_in"]: - tools.trans_load(tools.config["db_name"], tools.config["translate_in"], tools.config["language"]) + tools.trans_load(tools.config["db_name"], + tools.config["translate_in"], + tools.config["language"]) sys.exit(0) #---------------------------------------------------------------------------------- @@ -153,8 +157,9 @@ if tools.config["stop_after_init"]: if tools.config['xmlrpc']: try: port = int(tools.config["port"]) - except Exception: - logger.notifyChannel("init", netsvc.LOG_CRITICAL, "invalid port: %r" % (tools.config["port"],)) + except: + logger.notifyChannel("init", netsvc.LOG_CRITICAL, + "invalid port: %r" % (tools.config["port"],)) sys.exit(1) interface = tools.config["interface"] secure = tools.config["secure"] @@ -163,7 +168,9 @@ if tools.config['xmlrpc']: xml_gw = netsvc.xmlrpc.RpcGateway('web-services') httpd.attach("/xmlrpc", xml_gw) - logger.notifyChannel("web-services", netsvc.LOG_INFO, "starting XML-RPC%s services, port %s" % ((tools.config['secure'] and ' Secure' or ''), port)) + logger.notifyChannel("web-services", netsvc.LOG_INFO, + "starting XML-RPC%s services, port %s" % ( + (tools.config['secure'] and ' Secure' or ''), port)) # #if tools.config["soap"]: @@ -175,17 +182,25 @@ if tools.config['xmlrpc']: if tools.config['netrpc']: try: netport = int(tools.config["netport"]) - except Exception: - logger.notifyChannel("init", netsvc.LOG_ERROR, "invalid port '%s'!" % (tools.config["netport"],)) + except: + logger.notifyChannel("init", netsvc.LOG_ERROR, + "invalid port '%s'!" % (tools.config["netport"],)) sys.exit(1) netinterface = tools.config["netinterface"] tinySocket = netsvc.TinySocketServerThread(netinterface, netport, False) - logger.notifyChannel("web-services", netsvc.LOG_INFO, "starting NET-RPC service, port "+str(netport)) + logger.notifyChannel("web-services", netsvc.LOG_INFO, + "starting NET-RPC service, port %d" % (netport,)) +SIGNALS = dict( + [(getattr(signal, sign), sign) for sign in ('SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGQUIT')] +) -def handler(signum, frame): - from tools import config +def handler(signum, _): + """ + :param signum: the signal number + :param _: + """ if tools.config['netrpc']: tinySocket.stop() if tools.config['xmlrpc']: @@ -193,9 +208,13 @@ def handler(signum, frame): netsvc.Agent.quit() if config['pidfile']: os.unlink(config['pidfile']) - logger.notifyChannel('shutdown', netsvc.LOG_INFO, "Shutdown Server!") + logger.notifyChannel('shutdown', netsvc.LOG_INFO, + "Shutdown Server! - %s" % ( SIGNALS[signum], )) sys.exit(0) +for signum in SIGNALS: + signal.signal(signum, handler) + from tools import config if config['pidfile']: fd = open(config['pidfile'], 'w') @@ -203,10 +222,9 @@ if config['pidfile']: fd.write(pidtext) fd.close() -for sign in ('SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGQUIT'): - signal.signal(getattr(signal, sign), handler) +logger.notifyChannel("web-services", netsvc.LOG_INFO, + 'the server is running, waiting for connections...') -logger.notifyChannel("web-services", netsvc.LOG_INFO, 'the server is running, waiting for connections...') if tools.config['netrpc']: tinySocket.start() if tools.config['xmlrpc']: From beff0da6c961fffa038b38cb6a4f06424af47a35 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 24 Dec 2008 00:47:52 +0100 Subject: [PATCH 17/55] [REF] Use tools.config bzr revid: stephane@tinyerp.com-20081223234752-f2aot46a4z353z1g --- bin/openerp-server.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/openerp-server.py b/bin/openerp-server.py index 70e8f87dabe..d7db827bb45 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -158,7 +158,7 @@ if tools.config['xmlrpc']: try: port = int(tools.config["port"]) except: - logger.notifyChannel("init", netsvc.LOG_CRITICAL, + logger.notifyChannel("init", netsvc.LOG_CRITICAL, "invalid port: %r" % (tools.config["port"],)) sys.exit(1) interface = tools.config["interface"] @@ -169,8 +169,8 @@ if tools.config['xmlrpc']: xml_gw = netsvc.xmlrpc.RpcGateway('web-services') httpd.attach("/xmlrpc", xml_gw) logger.notifyChannel("web-services", netsvc.LOG_INFO, - "starting XML-RPC%s services, port %s" % ( - (tools.config['secure'] and ' Secure' or ''), port)) + "starting XML-RPC%s services, port %s" % + ((tools.config['secure'] and ' Secure' or ''), port)) # #if tools.config["soap"]: @@ -206,8 +206,8 @@ def handler(signum, _): if tools.config['xmlrpc']: httpd.stop() netsvc.Agent.quit() - if config['pidfile']: - os.unlink(config['pidfile']) + if tools.config['pidfile']: + os.unlink(tools.config['pidfile']) logger.notifyChannel('shutdown', netsvc.LOG_INFO, "Shutdown Server! - %s" % ( SIGNALS[signum], )) sys.exit(0) @@ -215,9 +215,8 @@ def handler(signum, _): for signum in SIGNALS: signal.signal(signum, handler) -from tools import config -if config['pidfile']: - fd = open(config['pidfile'], 'w') +if tools.config['pidfile']: + fd = open(tools.config['pidfile'], 'w') pidtext = "%d" % (os.getpid()) fd.write(pidtext) fd.close() From 2d47371f0e57d8610c6961b4f54b6621656a1920 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 24 Dec 2008 01:04:31 +0100 Subject: [PATCH 18/55] [IMP] Remove the unused code of the upgrade option bzr revid: stephane@tinyerp.com-20081224000431-xhzc9f8ls90g4n5k --- bin/openerp-server.py | 12 ------ bin/tools/config.py | 3 -- bin/tools/upgrade.py | 92 ------------------------------------------- 3 files changed, 107 deletions(-) delete mode 100644 bin/tools/upgrade.py diff --git a/bin/openerp-server.py b/bin/openerp-server.py index d7db827bb45..509cb804245 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -81,18 +81,6 @@ logger.notifyChannel("objects", netsvc.LOG_INFO, 'initialising distributed objec #--------------------------------------------------------------- import pooler -#---------------------------------------------------------- -# launch modules install/upgrade/removes if needed -#---------------------------------------------------------- -if tools.config['upgrade']: - logger.notifyChannel('init', netsvc.LOG_INFO, 'Upgrading new modules...') - import tools.upgrade - (toinit, toupdate) = tools.upgrade.upgrade() - for m in toinit: - tools.config['init'][m] = 1 - for m in toupdate: - tools.config['update'][m] = 1 - #---------------------------------------------------------- # import basic modules #---------------------------------------------------------- diff --git a/bin/tools/config.py b/bin/tools/config.py index 3717f0b6a5e..19434c29de9 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -136,9 +136,6 @@ class configmanager(object): group.add_option('--price_accuracy', dest='price_accuracy', default='2', help='specify the price accuracy') parser.add_option_group(group) - group = optparse.OptionGroup(parser, "Modules related options") - group.add_option("-g", "--upgrade", action="store_true", dest="upgrade", default=False, help="Upgrade/install/uninstall modules") - group = optparse.OptionGroup(parser, "Database related options") group.add_option("-d", "--database", dest="db_name", help="specify the database name") group.add_option("-r", "--db_user", dest="db_user", help="specify the database user name") diff --git a/bin/tools/upgrade.py b/bin/tools/upgrade.py deleted file mode 100644 index 8392dbd9e93..00000000000 --- a/bin/tools/upgrade.py +++ /dev/null @@ -1,92 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved -# $Id$ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## - -import tarfile -import re -import urllib2 -import os -import shutil -import tools - - -# remove an existing version of modules if it exist -def remove(name): - adp = tools.config['addons_path'] - addons = os.listdir(adp) - if name in addons: - try: - shutil.rmtree(os.path.join(adp, name)) - except: - print "Unable to remove module %s !" % name - -def install(name, url): - tar = tarfile.open(mode="r|gz", fileobj=urllib2.urlopen(url)) - for tarinfo in tar: - tar.extract(tarinfo, tools.config['addons_path']) - -def upgrade(): - import pooler - cr = pooler.db.cursor() - - toinit = [] - toupdate = [] - -# print 'Check for correct rights (create and unlink on addons)...' - # todo: touch addons/test.txt - # todo: rm addons/test.txt - - print 'Check for modules to remove...' - cr.execute('select id,name,url from ir_module_module where state=%s', ('to remove',)) - for module_id,name,url in cr.fetchall(): - print '\tremoving module %s' % name - remove(name) - cr.execute('update ir_module_module set state=%s where id=%s', ('uninstalled', module_id)) - cr.commit() - - print 'Check for modules to upgrade...' - cr.execute('select id,name,url from ir_module_module where state=%s', ('to upgrade',)) - for module_id,name,url in cr.fetchall(): - print '\tupgrading module %s' % name - remove(name) - install(name, url) - cr.execute('update ir_module_module set state=%s where id=%s', ('installed', module_id)) - cr.commit() - toupdate.append(name) - - print 'Check for modules to install...' - cr.execute('select id,name,url from ir_module_module where state=%s', ('to install',)) - for module_id,name,url in cr.fetchall(): - print '\tinstalling module %s' % name - install(name, url) - cr.execute('update ir_module_module set state=%s where id=%s', ('installed', module_id)) - cr.commit() - toinit.append(name) - - print 'Initializing all datas...' - - cr.commit() - cr.close() - return (toinit, toupdate) - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - From 203194ce45826ac6d7d2847bf278f5a558a39708 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 24 Dec 2008 01:18:53 +0100 Subject: [PATCH 19/55] [FIX] Remove the upgrade option bzr revid: stephane@tinyerp.com-20081224001853-kg9vmlk6aixck2ct --- bin/tools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index 19434c29de9..334637f6ea6 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -197,7 +197,7 @@ class configmanager(object): if getattr(opt, arg): self.options[arg] = getattr(opt, arg) - keys = ['language', 'translate_out', 'translate_in', 'upgrade', 'debug_mode', + keys = ['language', 'translate_out', 'translate_in', 'debug_mode', 'stop_after_init', 'without_demo', 'netrpc', 'xmlrpc', 'syslog'] if hasSSL: From ca93318a771c1032d072702d4d0cea8fb9603b60 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 24 Dec 2008 01:24:18 +0100 Subject: [PATCH 20/55] [FIX] restarting a non started pool does not crash anymore [FIX] when creating a database, the pool is restarted [FIX] when dropping a database, the caches are cleaned [IMP] add an option to specify the default cache timeout lp bug: https://launchpad.net/bugs/310986 fixed bzr revid: christophe@taupe-20081224002418-7pf9ctdzcl8ygvs7 --- bin/pooler.py | 7 ++++--- bin/service/web_services.py | 4 ++-- bin/sql_db.py | 4 +++- bin/tools/config.py | 5 ++++- bin/tools/misc.py | 26 +++++++++++++++++++++++--- 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/bin/pooler.py b/bin/pooler.py index 250ee4f22e5..bf04f30353c 100644 --- a/bin/pooler.py +++ b/bin/pooler.py @@ -50,9 +50,10 @@ def get_db_and_pool(db_name, force_demo=False, status=None, update_module=False) return db, pool -def restart_pool(db_name, force_demo=False, update_module=False): - del pool_dic[db_name] - return get_db_and_pool(db_name, force_demo, update_module=update_module) +def restart_pool(db_name, force_demo=False, status=None, update_module=False): + if db_name in pool_dic: + del pool_dic[db_name] + return get_db_and_pool(db_name, force_demo, status, update_module=update_module) def get_db_only(db_name): diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 18947afff41..eef02528337 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -82,8 +82,8 @@ class db(netsvc.Service): cr.commit() cr.close() cr = None - pool = pooler.get_pool(db_name, demo, serv.actions[id], - update_module=True) + pool = pooler.restart_pool(db_name, demo, serv.actions[id], + update_module=True)[1] cr = sql_db.db_connect(db_name).cursor() diff --git a/bin/sql_db.py b/bin/sql_db.py index ec8ca3bf176..041f855b32b 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -227,7 +227,9 @@ def db_connect(db_name, serialize=0): return PoolManager.get(db_name) def close_db(db_name): - return PoolManager.close(db_name) + PoolManager.close(db_name) + tools.cache.clean_cache_for_db(db_name) + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bin/tools/config.py b/bin/tools/config.py index 334637f6ea6..2c049becad9 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -76,6 +76,7 @@ class configmanager(object): 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.WARNING, # level above which a failed assert will be raise + 'cache_timeout': 100000, } hasSSL = check_ssl() @@ -100,6 +101,8 @@ class configmanager(object): parser.add_option("-i", "--init", dest="init", help="init a module (use \"all\" for all modules)") parser.add_option("--without-demo", dest="without_demo", help="load demo data for a module (use \"all\" for all modules)", default=False) parser.add_option("-u", "--update", dest="update", help="update a module (use \"all\" for all modules)") + parser.add_option("--cache-timeout", dest="cache_timeout", help="set the timeout for the cache system", default=100000, type="int") + # stops the server from launching after initialization parser.add_option("--stop-after-init", action="store_true", dest="stop_after_init", default=False, help="stop the server after it initializes") parser.add_option('--debug', dest='debug_mode', action='store_true', default=False, help='enable debug mode') @@ -186,7 +189,7 @@ class configmanager(object): self.options['pidfile'] = False keys = ['interface', 'port', 'db_name', 'db_user', 'db_password', 'db_host', - 'db_port', 'logfile', 'pidfile', 'smtp_port', + 'db_port', 'logfile', 'pidfile', 'smtp_port', 'cache_timeout', 'email_from', 'smtp_server', 'smtp_user', 'smtp_password', 'price_accuracy', 'netinterface', 'netport', 'db_maxconn', 'import_partial', 'addons_path'] diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 993f4eb03f8..6241365f8d0 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -536,14 +536,34 @@ class cache(object): Use it as a decorator of the function you plan to cache Timeout: 0 = no timeout, otherwise in seconds """ - - def __init__(self, timeout=10000, skiparg=2, multi=None): + + __caches = [] + + def __init__(self, timeout=None, skiparg=2, multi=None): assert skiparg >= 2 # at least self and cr - self.timeout = timeout + if timeout is None: + self.timeout = config['cache_timeout'] + else: + self.timeout = timeout self.skiparg = skiparg self.multi = multi self.lasttime = time.time() self.cache = {} + + cache.__caches.append(self) + + @classmethod + def clean_cache_for_db(cls, dbname): + def get_dbname_from_key(key): + for e in key: + if e[0] == 'dbname': + return e[1] + return None + + for cache in cls.__caches: + keys_to_del = [key for key in cache.cache if get_dbname_from_key(key) == dbname] + for key in keys_to_del: + del cache.cache[key] def __call__(self, fn): arg_names = inspect.getargspec(fn)[0][self.skiparg:] From d9be84059db737e015f0154e38a408e8a4c6e28c Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 24 Dec 2008 01:28:22 +0100 Subject: [PATCH 21/55] [IMP] Specify the type int for the port and the netport bzr revid: stephane@tinyerp.com-20081224002822-uys2zrs1qeh5q2pl --- bin/openerp-server.py | 15 ++------------- bin/tools/config.py | 12 ++++++------ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/bin/openerp-server.py b/bin/openerp-server.py index 509cb804245..6dec12d9664 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -143,12 +143,7 @@ if tools.config["stop_after_init"]: #---------------------------------------------------------- if tools.config['xmlrpc']: - try: - port = int(tools.config["port"]) - except: - logger.notifyChannel("init", netsvc.LOG_CRITICAL, - "invalid port: %r" % (tools.config["port"],)) - sys.exit(1) + port = int(tools.config['port']) interface = tools.config["interface"] secure = tools.config["secure"] @@ -168,14 +163,8 @@ if tools.config['xmlrpc']: # if tools.config['netrpc']: - try: - netport = int(tools.config["netport"]) - except: - logger.notifyChannel("init", netsvc.LOG_ERROR, - "invalid port '%s'!" % (tools.config["netport"],)) - sys.exit(1) + netport = int(tools.config['netport']) netinterface = tools.config["netinterface"] - tinySocket = netsvc.TinySocketServerThread(netinterface, netport, False) logger.notifyChannel("web-services", netsvc.LOG_INFO, "starting NET-RPC service, port %d" % (netport,)) diff --git a/bin/tools/config.py b/bin/tools/config.py index 334637f6ea6..7b8ab1df84b 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -42,9 +42,9 @@ class configmanager(object): self.options = { 'email_from':False, 'interface': '', # this will bind the server to all interfaces - 'port': '8069', + 'port': 8069, 'netinterface': '', - 'netport': '8070', + 'netport': 8070, 'db_host': False, 'db_port': False, 'db_name': False, @@ -91,9 +91,9 @@ class configmanager(object): parser.add_option("--pidfile", dest="pidfile", help="file where the server pid will be stored") parser.add_option("-n", "--interface", dest="interface", help="specify the TCP IP address") - parser.add_option("-p", "--port", dest="port", help="specify the TCP port") + parser.add_option("-p", "--port", dest="port", help="specify the TCP port", type="int") parser.add_option("--net_interface", dest="netinterface", help="specify the TCP IP address for netrpc") - parser.add_option("--net_port", dest="netport", help="specify the TCP port for netrpc") + parser.add_option("--net_port", dest="netport", help="specify the TCP port for netrpc", type="int") parser.add_option("--no-netrpc", dest="netrpc", action="store_false", default=True, help="disable netrpc") parser.add_option("--no-xmlrpc", dest="xmlrpc", action="store_false", default=True, help="disable xmlrpc") @@ -128,7 +128,7 @@ class configmanager(object): group = optparse.OptionGroup(parser, "SMTP Configuration") group.add_option('--email-from', dest='email_from', default='', help='specify the SMTP email address for sending email') group.add_option('--smtp', dest='smtp_server', default='', help='specify the SMTP server for sending email') - group.add_option('--smtp-port', dest='smtp_port', default='25', help='specify the SMTP port') + group.add_option('--smtp-port', dest='smtp_port', default='25', help='specify the SMTP port', type="int") if hasSSL: group.add_option('--smtp-ssl', dest='smtp_ssl', default='', help='specify the SMTP server support SSL or not') group.add_option('--smtp-user', dest='smtp_user', default='', help='specify the SMTP username for sending email') @@ -142,7 +142,7 @@ class configmanager(object): group.add_option("-w", "--db_password", dest="db_password", help="specify the database password") group.add_option("--pg_path", dest="pg_path", help="specify the pg executable path") group.add_option("--db_host", dest="db_host", help="specify the database host") - group.add_option("--db_port", dest="db_port", help="specify the database port") + group.add_option("--db_port", dest="db_port", help="specify the database port", type="int") group.add_option("--db_maxconn", dest="db_maxconn", default='64', help="specify the the maximum number of physical connections to posgresql") group.add_option("-P", "--import-partial", dest="import_partial", help="Use this for big data importation, if it crashes you will be able to continue at the current state. Provide a filename to store intermediate importation states.", default=False) parser.add_option_group(group) From 3f5e5e4a8fa9118f3d59933de7597a01f76a0dd7 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 24 Dec 2008 01:57:34 +0100 Subject: [PATCH 22/55] [REF] Cleanup bzr revid: stephane@tinyerp.com-20081224005734-1nyn35skk55hqx6e --- bin/tools/config.py | 57 ++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index 9d3d552a749..d8d507dca03 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -88,7 +88,8 @@ class configmanager(object): parser = optparse.OptionParser(version=version) parser.add_option("-c", "--config", dest="config", help="specify alternate config file") - parser.add_option("-s", "--save", action="store_true", dest="save", default=False, help="save configuration to ~/.openerp_serverrc") + parser.add_option("-s", "--save", action="store_true", dest="save", default=False, + help="save configuration to ~/.openerp_serverrc") parser.add_option("--pidfile", dest="pidfile", help="file where the server pid will be stored") parser.add_option("-n", "--interface", dest="interface", help="specify the TCP IP address") @@ -97,19 +98,24 @@ class configmanager(object): parser.add_option("--net_port", dest="netport", help="specify the TCP port for netrpc", type="int") parser.add_option("--no-netrpc", dest="netrpc", action="store_false", default=True, help="disable netrpc") parser.add_option("--no-xmlrpc", dest="xmlrpc", action="store_false", default=True, help="disable xmlrpc") - parser.add_option("-i", "--init", dest="init", help="init a module (use \"all\" for all modules)") - parser.add_option("--without-demo", dest="without_demo", help="load demo data for a module (use \"all\" for all modules)", default=False) - parser.add_option("-u", "--update", dest="update", help="update a module (use \"all\" for all modules)") - parser.add_option("--cache-timeout", dest="cache_timeout", help="set the timeout for the cache system", default=100000, type="int") + parser.add_option("--without-demo", dest="without_demo", + help="load demo data for a module (use \"all\" for all modules)", default=False) + parser.add_option("-u", "--update", dest="update", + help="update a module (use \"all\" for all modules)") + parser.add_option("--cache-timeout", dest="cache_timeout", + help="set the timeout for the cache system", default=100000, type="int") # stops the server from launching after initialization - parser.add_option("--stop-after-init", action="store_true", dest="stop_after_init", default=False, help="stop the server after it initializes") + parser.add_option("--stop-after-init", action="store_true", dest="stop_after_init", default=False, + help="stop the server after it initializes") parser.add_option('--debug', dest='debug_mode', action='store_true', default=False, help='enable debug mode') - parser.add_option("--assert-exit-level", dest='assert_exit_level', type="choice", choices=loglevels.keys(), help="specify the level at which a failed assertion will stop the server. Accepted values: " + str(loglevels.keys())) + parser.add_option("--assert-exit-level", dest='assert_exit_level', type="choice", choices=loglevels.keys(), + help="specify the level at which a failed assertion will stop the server. Accepted values: %s" % (loglevels.keys(),)) if hasSSL: group = optparse.OptionGroup(parser, "SSL Configuration") - group.add_option("-S", "--secure", dest="secure", action="store_true", help="launch server over https instead of http", default=False) + group.add_option("-S", "--secure", dest="secure", action="store_true", + help="launch server over https instead of http", default=False) group.add_option("--cert-file", dest="secure_cert_file", default="server.cert", help="specify the certificate file for the SSL connection") @@ -146,8 +152,10 @@ class configmanager(object): group.add_option("--pg_path", dest="pg_path", help="specify the pg executable path") group.add_option("--db_host", dest="db_host", help="specify the database host") group.add_option("--db_port", dest="db_port", help="specify the database port", type="int") - group.add_option("--db_maxconn", dest="db_maxconn", default='64', help="specify the the maximum number of physical connections to posgresql") - group.add_option("-P", "--import-partial", dest="import_partial", help="Use this for big data importation, if it crashes you will be able to continue at the current state. Provide a filename to store intermediate importation states.", default=False) + group.add_option("--db_maxconn", dest="db_maxconn", default='64', + help="specify the the maximum number of physical connections to posgresql") + group.add_option("-P", "--import-partial", dest="import_partial", + help="Use this for big data importation, if it crashes you will be able to continue at the current state. Provide a filename to store intermediate importation states.", default=False) parser.add_option_group(group) group = optparse.OptionGroup(parser, "Internationalisation options", @@ -156,11 +164,17 @@ class configmanager(object): "Option '-l' is mandatory in case of importation" ) - group.add_option('-l', "--language", dest="language", help="specify the language of the translation file. Use it with --i18n-export or --i18n-import") - group.add_option("--i18n-export", dest="translate_out", help="export all sentences to be translated to a CSV file, a PO file or a TGZ archive and exit") - group.add_option("--i18n-import", dest="translate_in", help="import a CSV or a PO file with translations and exit. The '-l' option is required.") - group.add_option("--modules", dest="translate_modules", help="specify modules to export. Use in combination with --i18n-export") - group.add_option("--addons-path", dest="addons_path", help="specify an alternative addons path.", action="callback", callback=self._check_addons_path, nargs=1, type="string") + group.add_option('-l', "--language", dest="language", + help="specify the language of the translation file. Use it with --i18n-export or --i18n-import") + group.add_option("--i18n-export", dest="translate_out", + help="export all sentences to be translated to a CSV file, a PO file or a TGZ archive and exit") + group.add_option("--i18n-import", dest="translate_in", + help="import a CSV or a PO file with translations and exit. The '-l' option is required.") + group.add_option("--modules", dest="translate_modules", + help="specify modules to export. Use in combination with --i18n-export") + group.add_option("--addons-path", dest="addons_path", + help="specify an alternative addons path.", + action="callback", callback=self._check_addons_path, nargs=1, type="string") parser.add_option_group(group) (opt, args) = parser.parse_args() @@ -220,18 +234,9 @@ class configmanager(object): if not self.options['addons_path'] or self.options['addons_path']=='None': self.options['addons_path'] = os.path.join(self.options['root_path'], 'addons') - init = {} - if opt.init: - for i in opt.init.split(','): - init[i] = 1 - self.options['init'] = init + self.options['init'] = opt.init and dict.fromkeys(opt.init.split(','), 1) or {} self.options["demo"] = not opt.without_demo and self.options['init'] or {} - - update = {} - if opt.update: - for i in opt.update.split(','): - update[i] = 1 - self.options['update'] = update + self.options['update'] = opt.update and dict.fromkeys(opt.update.split(','), 1) or {} self.options['translate_modules'] = opt.translate_modules and map(lambda m: m.strip(), opt.translate_modules.split(',')) or ['all'] self.options['translate_modules'].sort() From 7dbde98cc6fa77aed11170ebe4f72a347832aed3 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 24 Dec 2008 12:13:39 +0530 Subject: [PATCH 23/55] Add payment_order.py for Payment order report-vir bzr revid: patelamit2003@gmail.com-20081224064339-djlcd233355v437u --- addons/account_payment/report/__init__.py | 23 +++++++++++++ .../account_payment/report/payment_order.py | 34 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 addons/account_payment/report/__init__.py create mode 100644 addons/account_payment/report/payment_order.py diff --git a/addons/account_payment/report/__init__.py b/addons/account_payment/report/__init__.py new file mode 100644 index 00000000000..a9cc99d8279 --- /dev/null +++ b/addons/account_payment/report/__init__.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import payment_order diff --git a/addons/account_payment/report/payment_order.py b/addons/account_payment/report/payment_order.py new file mode 100644 index 00000000000..f3e9b612d62 --- /dev/null +++ b/addons/account_payment/report/payment_order.py @@ -0,0 +1,34 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import time +import datetime +from report import report_sxw + +class payment_order(report_sxw.rml_parse): + def __init__(self, cr, uid, name, context): + super(payment_order, self).__init__(cr, uid, name, context) + self.localcontext.update( { + 'time': time, + + }) +report_sxw.report_sxw('report.payment.order', 'payement.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order,header=False) \ No newline at end of file From 22e08146f917b7408d4feac17be10b7f30bb038b Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 24 Dec 2008 12:18:04 +0530 Subject: [PATCH 24/55] modify for payment orrder report-vir bzr revid: patelamit2003@gmail.com-20081224064804-8kqv94b2yfdcfco1 --- addons/account_payment/payment_report.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_payment/payment_report.xml b/addons/account_payment/payment_report.xml index 16e1185355e..0f39148f719 100644 --- a/addons/account_payment/payment_report.xml +++ b/addons/account_payment/payment_report.xml @@ -1,6 +1,6 @@ - + From dd30ce0e8baf788ee77bd829f8e8cc7eff05cf0a Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Wed, 24 Dec 2008 12:50:46 +0530 Subject: [PATCH 25/55] base module quality..format the form bzr revid: mra@tinyerp.com-20081224072046-i2e91527kxqy6iia --- .../base_module_quality/base_module_quality_wizard.xml | 6 +++--- addons/base_module_quality/method_test/method_test.py | 7 ++----- addons/base_module_quality/pylint_test/pylint_test.py | 10 ++++------ addons/base_module_quality/speed_test/speed_test.py | 6 ++---- .../base_module_quality/wizard/module_quality_check.py | 1 - 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index df75c45715a..c99b949be35 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -15,9 +15,9 @@
Date: Wed, 24 Dec 2008 14:33:39 +0530 Subject: [PATCH 26/55] Bug 311010 lp bug: https://launchpad.net/bugs/311010 fixed bzr revid: jvo@tinyerp.com-20081224090339-lrfj3eksa3jdymhy --- bin/report/report_sxw.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index b26b32e6417..73b54c50dfa 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -292,8 +292,10 @@ class rml_parse(object): pp=self._node self._node = pp lst='' - if type(text)==type(''): + if isinstance(text,(str,unicode)): lst = text.split('\n') +# lst = str(text).split('\n') # This is also acceptable, isn't it? + if lst and (not len(lst)): return None nodes = [] From 02cdbfb31a9b71fe613efe955d1a6c8527499cb7 Mon Sep 17 00:00:00 2001 From: "ame (Tiny/Axelor)" Date: Wed, 24 Dec 2008 15:56:56 +0530 Subject: [PATCH 27/55] * Improved `process` module - process graph without resource - added prefered resource for the process bzr revid: ame@tinyerp.com-20081224102656-z0xi440xpnq7x42p --- addons/process/process.py | 66 +++++++++++++++++++-------------- addons/process/process_view.xml | 2 + 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/addons/process/process.py b/addons/process/process.py index ff6e6378d83..b1a6002dfd9 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -50,6 +50,7 @@ class process_process(osv.osv): _columns = { 'name': fields.char('Name', size=30,required=True, translate=True), 'active': fields.boolean('Active'), + 'model_id': fields.many2one('ir.model', 'Object', ondelete='set null'), 'note': fields.text('Notes', translate=True), 'node_ids': fields.one2many('process.node', 'process_id', 'Nodes') } @@ -64,19 +65,24 @@ class process_process(osv.osv): if not model_ids: return [] - nodes = pool.get('process.node').search(cr, uid, [('model_id', 'in', model_ids)]) - if not nodes: - return [] - - nodes = pool.get('process.node').browse(cr, uid, nodes, context) - - unique = [] result = [] - - for node in nodes: - if node.process_id.id not in unique: - result.append((node.process_id.id, node.process_id.name)) - unique.append(node.process_id.id) + + # search all processes + res = pool.get('process.process').search(cr, uid, [('model_id', 'in', model_ids)]) + if res: + 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 + res = pool.get('process.node').search(cr, uid, [('model_id', 'in', model_ids)]) + if res: + res = pool.get('process.node').browse(cr, uid, res, context) + for node in res: + if (node.process_id.id, node.process_id.name) not in result: + result.append((node.process_id.id, node.process_id.name)) return result @@ -85,21 +91,25 @@ class process_process(osv.osv): pool = pooler.get_pool(cr.dbname) process = pool.get('process.process').browse(cr, uid, [id])[0] - current_object = pool.get(res_model).browse(cr, uid, [res_id], context)[0] - current_user = pool.get('res.users').browse(cr, uid, [uid], context)[0] - - expr_context = Env(current_object, current_user) - - notes = process.note + states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {})) + + title = process.name + + expr_context = {} + perm = None + + if res_id: + current_object = pool.get(res_model).browse(cr, uid, [res_id], context)[0] + current_user = pool.get('res.users').browse(cr, uid, [uid], context)[0] + expr_context = Env(current_object, current_user) + title = _("%s - Resource: %s, State: %s") % (process.name, current_object.name, states.get(getattr(current_object, 'state'), 'N/A')) + perm = pool.get(res_model).perm_read(cr, uid, [res_id], context)[0] + + notes = process.note or "N/A" nodes = {} start = [] transitions = {} - states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {})) - title = "%s - Resource: %s, State: %s" % (process.name, current_object.name, states.get(getattr(current_object, 'state'), 'N/A')) - - perm = pool.get(res_model).perm_read(cr, uid, [res_id], context)[0] - for node in process.node_ids: data = {} data['name'] = node.name @@ -126,7 +136,6 @@ class process_process(osv.osv): try: data['active'] = eval(node.model_states, expr_context) except Exception, e: - # waring: invalid state expression pass if not data['active']: @@ -212,10 +221,11 @@ class process_process(osv.osv): except: pass - for nid, node in nodes.items(): - if not node['gray'] and (node['active'] or node['model'] == res_model): - update_relatives(nid, res_id, res_model) - break + if res_id: + for nid, node in nodes.items(): + if not node['gray'] and (node['active'] or node['model'] == res_model): + update_relatives(nid, res_id, res_model) + break # calculate graph layout g = tools.graph(nodes.keys(), map(lambda x: (x['source'], x['target']), transitions.values())) diff --git a/addons/process/process_view.xml b/addons/process/process_view.xml index 8083ba278d4..360f3499f36 100644 --- a/addons/process/process_view.xml +++ b/addons/process/process_view.xml @@ -17,6 +17,7 @@ + @@ -120,6 +121,7 @@ + From c1c36eedea9af779eb2d99edeb649de73b32ba08 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 24 Dec 2008 11:48:11 +0100 Subject: [PATCH 28/55] bugfixes bzr revid: fp@tinyerp.com-20081224104811-54gb87thafjay1sj --- bin/osv/orm.py | 3 +-- bin/tools/misc.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 0a394723a97..25e63e24ec2 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1353,12 +1353,11 @@ class orm_memory(orm_template): return result class orm(orm_template): - _sql_constraints = [] - _log_access = True _table = None _protected = ['read','write','create','default_get','perm_read','unlink','fields_get','fields_view_get','search','name_get','distinct_field_get','name_search','copy','import_data','search_count'] + def _parent_store_compute(self, cr): logger = netsvc.Logger() logger.notifyChannel('init', netsvc.LOG_INFO, 'Computing parent left and right for table %s...' % (self._table, )) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 6241365f8d0..ac5f8695149 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -572,9 +572,9 @@ class cache(object): if time.time()-self.timeout > self.lasttime: self.lasttime = time.time() t = time.time()-self.timeout - old_keys = [key for key in self.cache if self.cache[key][1] < t] - for key in old_keys: - del self.cache[key] + for key in self.cache.keys(): + if self.cache[key][1] Date: Wed, 24 Dec 2008 16:54:42 +0530 Subject: [PATCH 29/55] changes for odt reports bzr revid: dsh@tinyerp.com-20081224112442-ztn3y9qnn98c9g7f --- bin/addons/base/ir/ir_actions.py | 1 + bin/report/interface.py | 5 +++++ bin/report/report_sxw.py | 9 +++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index bdd07745c58..8f994a084f7 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -118,6 +118,7 @@ class report_xml(osv.osv): ('html', 'html'), ('raw', 'raw'), ('sxw', 'sxw'), + ('odt', 'odt'), ], string='Type', required=True), 'groups_id': fields.many2many('res.groups', 'res_groups_report_rel', 'uid', 'gid', 'Groups'), 'attachment': fields.char('Save As Attachment Prefix', size=32, help='This is the prefix of the file name the print will be saved as attachement. Keep empty to not save the printed reports') diff --git a/bin/report/interface.py b/bin/report/interface.py index eb71c5105e3..da94535498e 100644 --- a/bin/report/interface.py +++ b/bin/report/interface.py @@ -81,6 +81,7 @@ class report_rml(report_int): 'html': self.create_html, 'raw': self.create_raw, 'sxw': self.create_sxw, + 'odt': self.create_odt, } def create(self, cr, uid, ids, datas, context): @@ -206,6 +207,10 @@ class report_rml(report_int): def create_sxw(self, path, logo=None, title=None): return path + + def create_odt(self, data, logo=None, title=None): + return data + from report_sxw import report_sxw diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 73b54c50dfa..6f46d49d7f6 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -295,7 +295,6 @@ class rml_parse(object): if isinstance(text,(str,unicode)): lst = text.split('\n') # lst = str(text).split('\n') # This is also acceptable, isn't it? - if lst and (not len(lst)): return None nodes = [] @@ -620,7 +619,7 @@ class report_sxw(report_rml): rml = tools.file_open(self.tmpl, subdir=None).read() report_type= data.get('report_type', report_type) - if report_type == 'sxw' and report_xml: + if report_type in ['sxw','odt'] and report_xml: context['parents'] = sxw_parents sxw_io = StringIO.StringIO(report_xml.report_sxw_content) sxw_z = zipfile.ZipFile(sxw_io, mode='r') @@ -670,7 +669,10 @@ class report_sxw(report_rml): if self.header: #Add corporate header/footer - rml = tools.file_open('custom/corporate_sxw_header.xml').read() + if report_type=='odt': + rml = tools.file_open('custom/corporate_odt_header.xml').read() + if report_type=='sxw': + rml = tools.file_open('custom/corporate_sxw_header.xml').read() rml_parser = self.parser(cr, uid, self.name2, context) rml_parser.parents = sxw_parents rml_parser.tag = sxw_tag @@ -709,7 +711,6 @@ class report_sxw(report_rml): }, context=context ) cr.commit() - return (pdf, report_type) From 0da07c281c5636b0dfefba91bdccb2f624145c57 Mon Sep 17 00:00:00 2001 From: Dhara Shah Date: Wed, 24 Dec 2008 17:00:37 +0530 Subject: [PATCH 30/55] changes for odt reports bzr revid: dsh@tinyerp.com-20081224113037-tth12tmw77p3lz7a --- .../base_report_designer.py | 13 +- .../tiny_sxw2rml/normalized_odt2rml.xsl | 681 ++++++++++++++++++ .../wizard/tiny_sxw2rml/tiny_sxw2rml.py | 12 +- addons/custom/corporate_odt_header.xml | 248 +++++++ 4 files changed, 947 insertions(+), 7 deletions(-) create mode 100644 addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl create mode 100644 addons/custom/corporate_odt_header.xml diff --git a/addons/base_report_designer/base_report_designer.py b/addons/base_report_designer/base_report_designer.py index 69d31fda861..bf4c26fd4de 100644 --- a/addons/base_report_designer/base_report_designer.py +++ b/addons/base_report_designer/base_report_designer.py @@ -36,11 +36,11 @@ class report_xml(osv.osv): The use of this function is to get rml file from sxw file. ''' sxwval = StringIO(base64.decodestring(file_sxw)) - fp = tools.file_open('normalized_oo2rml.xsl', - subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + fp = tools.file_open('normalized_odt2rml.xsl', + subdir='/home/dsh/my-work/bazaar/odt-sxw2ml') return {'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read()))} - def upload_report(self, cr, uid, report_id, file_sxw, context): + def upload_report(self, cr, uid, report_id, file_sxw,file_type, context): ''' Untested function ''' @@ -48,9 +48,13 @@ class report_xml(osv.osv): sxwval = StringIO(base64.decodestring(file_sxw)) fp = tools.file_open('normalized_oo2rml.xsl', subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + if file_type=='odt': + fp = tools.file_open('normalized_odt2rml.xsl', + subdir='/home/dsh/my-work/bazaar/odt-sxw2ml') report = pool.get('ir.actions.report.xml').write(cr, uid, [report_id], { 'report_sxw_content': base64.decodestring(file_sxw), - 'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())) + 'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())), + 'report_type' : file_type }) cr.commit() db = pooler.get_db_only(cr.dbname) @@ -59,6 +63,7 @@ class report_xml(osv.osv): def report_get(self, cr, uid, report_id, context={}): report = self.browse(cr, uid, report_id, context) return { + 'file_type' : report.report_type, 'report_sxw_content': report.report_sxw_content and base64.encodestring(report.report_sxw_content) or False, 'report_rml_content': report.report_rml_content and base64.encodestring(report.report_rml_content) or False } diff --git a/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl b/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl new file mode 100644 index 00000000000..b8c48673753 --- /dev/null +++ b/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl @@ -0,0 +1,681 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ( + + , + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + white + + + + + + + + + + + ......... + + + + + + + + + + + + + 15 + 0 + + + + + + + + + + 6 + + + + + + ZapfDingbats + l + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LEFT + + + CENTER + + + RIGHT + + + JUSTIFY + + + + + + + + + + + + + + + + + + + + + + + + + + + Courier-BoldOblique + + + Courier-Bold + + + Courier-Oblique + + + Courier + + + + + + + Helvetica-BoldOblique + + + Helvetica-Bold + + + Helvetica-Oblique + + + Helvetica + + + + + + + Times-BoldItalic + + + Times-Bold + + + Times-Italic + + + Times-Roman + + + + + + + + Times-Roman + + + + + + +
+ + diff --git a/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py b/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py index 9bc62ac02c8..0d0ced599cb 100644 --- a/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py +++ b/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py @@ -151,6 +151,8 @@ class DomApi(DomApiGeneral): self.buildStylePropertiesDict() if self.styles_dom.getElementsByTagName("style:page-master").__len__()<>0: self.page_master = self.styles_dom.getElementsByTagName("style:page-master")[0] + if self.styles_dom.getElementsByTagName("style:page-layout").__len__()<>0 : + self.page_master = self.styles_dom.getElementsByTagName("style:page-layout")[0] self.document = self.content_dom.getElementsByTagName("office:document-content")[0] def buildStylePropertiesDict(self): @@ -265,7 +267,7 @@ class DomApi(DomApiGeneral): childs = self.style_dict[style_name].childNodes for c in childs: - if c.nodeType == c.ELEMENT_NODE and c.nodeName == "style:properties": + if c.nodeType == c.ELEMENT_NODE and c.nodeName.find("properties")>0 : for attr in c._attrs.keys(): res[attr] = c.getAttribute(attr).encode("latin-1") return res @@ -357,8 +359,12 @@ if __name__ == "__main__": fname = sys.argv[1] f = StringIO.StringIO(file(fname).read()) - - xsl = file(os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]), 'normalized_oo2rml.xsl')).read() + xsl_file = 'normalized_oo2rml.xsl' + z = zipfile.ZipFile(fname,"r") + mimetype = z.read('mimetype') + if mimetype.split('/')[-1] == 'vnd.oasis.opendocument.text' : + xsl_file = 'normalized_odt2rml.xsl' + xsl = file(os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]), xsl_file)).read() result = sxw2rml(f, xsl, output=opt.output, save_pict=False) print result diff --git a/addons/custom/corporate_odt_header.xml b/addons/custom/corporate_odt_header.xml new file mode 100644 index 00000000000..b27eeda8ccb --- /dev/null +++ b/addons/custom/corporate_odt_header.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tiny sprl + + + + + + + + - + + + + + + Phone : + + + + + + + + Mail : + + + + + + + + + + + + + + + + Contact : Administrator + + + + + + + + \ No newline at end of file From 11e102cef611cf5c770628bb728b41db59b23b3e Mon Sep 17 00:00:00 2001 From: Dhara Shah Date: Wed, 24 Dec 2008 18:00:41 +0530 Subject: [PATCH 31/55] small modification bzr revid: dsh@tinyerp.com-20081224123041-4mpney2ca8c83p12 --- .../base_report_designer.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/addons/base_report_designer/base_report_designer.py b/addons/base_report_designer/base_report_designer.py index bf4c26fd4de..6f3c4019934 100644 --- a/addons/base_report_designer/base_report_designer.py +++ b/addons/base_report_designer/base_report_designer.py @@ -31,13 +31,18 @@ import tools class report_xml(osv.osv): _inherit = 'ir.actions.report.xml' - def sxwtorml(self,cr, uid, file_sxw): + def sxwtorml(self,cr, uid, file_sxw,file_type): ''' The use of this function is to get rml file from sxw file. ''' sxwval = StringIO(base64.decodestring(file_sxw)) - fp = tools.file_open('normalized_odt2rml.xsl', - subdir='/home/dsh/my-work/bazaar/odt-sxw2ml') + if file_type=='sxw': + fp = tools.file_open('normalized_oo2rml.xsl', + subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + if file_type=='odt': + fp = tools.file_open('normalized_odt2rml.xsl', + subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + return {'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read()))} def upload_report(self, cr, uid, report_id, file_sxw,file_type, context): @@ -46,11 +51,12 @@ class report_xml(osv.osv): ''' pool = pooler.get_pool(cr.dbname) sxwval = StringIO(base64.decodestring(file_sxw)) - fp = tools.file_open('normalized_oo2rml.xsl', - subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + if file_type=='sxw': + fp = tools.file_open('normalized_oo2rml.xsl', + subdir='addons/base_report_designer/wizard/tiny_sxw2rml') if file_type=='odt': fp = tools.file_open('normalized_odt2rml.xsl', - subdir='/home/dsh/my-work/bazaar/odt-sxw2ml') + subdir='addons/base_report_designer/wizard/tiny_sxw2rml') report = pool.get('ir.actions.report.xml').write(cr, uid, [report_id], { 'report_sxw_content': base64.decodestring(file_sxw), 'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())), From a5d8cf5d2c8a6de68fe5d0cead394a056ff1688d Mon Sep 17 00:00:00 2001 From: "ame (Tiny/Axelor)" Date: Wed, 24 Dec 2008 18:37:29 +0530 Subject: [PATCH 32/55] * Improved process module bzr revid: ame@tinyerp.com-20081224130729-857dvlgcrlki4b6r --- addons/process/process.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/process/process.py b/addons/process/process.py index b1a6002dfd9..94bbd6daaa1 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -60,15 +60,13 @@ class process_process(osv.osv): def search_by_model(self, cr, uid, res_model, context): pool = pooler.get_pool(cr.dbname) + model_ids = (res_model or None) and pool.get('ir.model').search(cr, uid, [('model', '=', res_model)]) - model_ids = pool.get('ir.model').search(cr, uid, [('model', '=', res_model)]) - if not model_ids: - return [] - + domain = (model_ids or []) and [('model_id', 'in', model_ids)] result = [] # search all processes - res = pool.get('process.process').search(cr, uid, [('model_id', 'in', model_ids)]) + res = pool.get('process.process').search(cr, uid, domain) if res: res = pool.get('process.process').browse(cr, uid, res, context) for process in res: @@ -77,9 +75,9 @@ class process_process(osv.osv): return result # else search process nodes - res = pool.get('process.node').search(cr, uid, [('model_id', 'in', model_ids)]) + res = pool.get('process.node').search(cr, uid, domain) if res: - res = pool.get('process.node').browse(cr, uid, res, context) + res = pool.get('process.node').browse(cr, uid, res, context) for node in res: if (node.process_id.id, node.process_id.name) not in result: result.append((node.process_id.id, node.process_id.name)) @@ -91,13 +89,15 @@ class process_process(osv.osv): pool = pooler.get_pool(cr.dbname) process = pool.get('process.process').browse(cr, uid, [id])[0] - states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {})) - title = process.name expr_context = {} + states = {} perm = None + if res_model: + states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {})) + if res_id: current_object = pool.get(res_model).browse(cr, uid, [res_id], context)[0] current_user = pool.get('res.users').browse(cr, uid, [uid], context)[0] From dfb4a39b6b67bc6ff7adc7c538b76eeb8019fa50 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Wed, 24 Dec 2008 19:21:31 +0530 Subject: [PATCH 33/55] base module quality bzr revid: mra@tinyerp.com-20081224135131-7keeqeyqf168g5e1 --- addons/base_module_quality/__terp__.py | 2 +- .../base_module_quality.py | 26 ++++++++++++++++--- .../base_module_quality_wizard.xml | 2 +- .../method_test/method_test.py | 11 ++------ .../security/ir.model.access.csv | 2 ++ .../speed_test/speed_test.py | 17 +++--------- 6 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 addons/base_module_quality/security/ir.model.access.csv diff --git a/addons/base_module_quality/__terp__.py b/addons/base_module_quality/__terp__.py index 4a4d5b9fc60..5588ab05780 100644 --- a/addons/base_module_quality/__terp__.py +++ b/addons/base_module_quality/__terp__.py @@ -34,7 +34,7 @@ This module's aim is to check the quality of other modules. """, "init_xml" : [], - "update_xml" : ["base_module_quality_wizard.xml"], + "update_xml" : ["base_module_quality_wizard.xml", "security/ir.model.access.csv",], "category" : "Tiny Specific Modules/Base module quality", "active": False, "installable": True diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index 195e345e8ef..ef4a0c3c515 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -19,7 +19,7 @@ # along with this program. If not, see . # ############################################################################## - +import pooler class abstract_quality_check(object): ''' @@ -41,11 +41,11 @@ class abstract_quality_check(object): #This bool defines if the test can be run only if the module is installed. #True => the module have to be installed. #False => the module can be uninstalled. - bool_installed_only = True + bool_installed_only = True def __init__(self): ''' - this method should initialize the var + this method should initialize the var ''' raise 'Not Implemented' @@ -55,7 +55,27 @@ class abstract_quality_check(object): ''' raise 'Not Implemented' + def get_objects(self, cr, uid, module): + # This function returns all object of the given module.. + pool = pooler.get_pool(cr.dbname) + ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module), ('model','=','ir.model')]) + model_list = [] + model_data = pool.get('ir.model.data').browse(cr, uid, ids2) + for model in model_data: + model_list.append(model.res_id) + obj_list = [] + for mod in pool.get('ir.model').browse(cr, uid, model_list): + obj_list.append(str(mod.model)) + return obj_list + def get_ids(self, cr, uid, object_list): + #This method return dictionary with ids of records of object for module + pool = pooler.get_pool(cr.dbname) + result_ids = {} + for obj in object_list: + ids = pool.get(obj).search(cr, uid, []) + result_ids[obj] = ids + return result_ids # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index c99b949be35..b49c17667a7 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -16,7 +16,7 @@
Date: Wed, 24 Dec 2008 16:54:29 +0100 Subject: [PATCH 34/55] bugfix bzr revid: fp@tinyerp.com-20081224155429-tdcmkvn7398h163b --- bin/osv/orm.py | 5 ++++- bin/tools/parse_version.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 25e63e24ec2..7641e6db8b6 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2232,7 +2232,10 @@ class orm(orm_template): if self.pool._init: self.pool._init_parent[self._name]=True else: - cr.execute('select parent_left,parent_right from '+self._table+' where id=%s', (vals[self._parent_name],)) + if vals[self._parent_name]: + cr.execute('select parent_left,parent_right from '+self._table+' where id=%s', (vals[self._parent_name],)) + else: + cr.execute('SELECT parent_left,parent_right FROM '+self._table+' WHERE id IS NULL') res = cr.fetchone() if res: pleft,pright = res diff --git a/bin/tools/parse_version.py b/bin/tools/parse_version.py index 3253ebd5e83..46236aa6080 100644 --- a/bin/tools/parse_version.py +++ b/bin/tools/parse_version.py @@ -71,7 +71,7 @@ def parse_version(s): contain them. """ parts = [] - for part in _parse_version_parts(s.lower()): + for part in _parse_version_parts((s or '0.1').lower()): if part.startswith('*'): if part<'*final': # remove '-' before a prerelease tag while parts and parts[-1]=='*final-': parts.pop() From 137146e91e6d17a9effb5aa5b47543ae0f553f2c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 24 Dec 2008 17:09:37 +0100 Subject: [PATCH 35/55] improved_desc bzr revid: fp@tinyerp.com-20081224160937-pga5k51l1fsustji --- addons/membership/__terp__.py | 12 ++++++++++++ addons/mrp_subproduct/__terp__.py | 8 ++++++++ addons/product_margin/__terp__.py | 5 +++++ addons/project_gtd/__terp__.py | 14 +++++++++++++- 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/addons/membership/__terp__.py b/addons/membership/__terp__.py index a40c92eab5a..48f5fe7da29 100644 --- a/addons/membership/__terp__.py +++ b/addons/membership/__terp__.py @@ -31,6 +31,18 @@ #"demo_data.xml", "membership_demo.xml" ], + "description": """ +This module allows you to manage all operations for managing memberships. +It supports different kind of members: +* Free member +* Associated member (ex: a group subscribe for a membership for all + subsidiaries) +* Paid members, +* Special member prices, ... + +It is integrated with sales and accounting to allow you to automatically +invoice and send propositions for membership renewal. + """, "init_xml" : [ "membership_data.xml", ], diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py index fbdd19a45f8..14b0152d532 100644 --- a/addons/mrp_subproduct/__terp__.py +++ b/addons/mrp_subproduct/__terp__.py @@ -27,6 +27,14 @@ "depends" : ["base","mrp"], "category" : "Generic Modules/Production", "init_xml" : [], + "description": """ +This module allows you to produce several products from one production order. +You can configure sub-products in the bill of material. +Without this module: + A + B + C -> D +With this module: + A + B + C -> D + E + """, "demo_xml" : [], "update_xml" : [ "mrp_subproduct_view.xml", diff --git a/addons/product_margin/__terp__.py b/addons/product_margin/__terp__.py index a5d7e5cc4c9..89021c66c10 100644 --- a/addons/product_margin/__terp__.py +++ b/addons/product_margin/__terp__.py @@ -24,6 +24,11 @@ "version":"1.0", "author":"Tiny", "category":"Custom", + "description": """ +Adds a reporting menu in products that computes sales, purchases, margins +and others interresting indicators based on invoices. The wizard to launch +the report has several options to help you get the data you need. +""", "depends":["base","product","account"], "demo_xml":[], "update_xml":["product_margin_view.xml"], diff --git a/addons/project_gtd/__terp__.py b/addons/project_gtd/__terp__.py index 105289b7469..19c3190e924 100644 --- a/addons/project_gtd/__terp__.py +++ b/addons/project_gtd/__terp__.py @@ -25,7 +25,19 @@ "author" : "Tiny", "category" : "Generic Modules/Projects & Services", "depends" : ["project"], - "description": "", + "description": """ +This module implements all concepts defined by the Getting Things Done +methodology. This world-wide used methodology is used for personnal +time management improvement. + +Getting Things Done (commonly abbreviated as GTD) is an action management +method created by David Allen, and described in a book of the same name. + +GTD rests on the principle that a person needs to move tasks out of the mind by +recording them externally. That way, the mind is freed from the job of +remembering everything that needs to be done, and can concentrate on actually +performing those tasks. + """, "init_xml" : [], "demo_xml" : ["project_gtd_demo.xml"], "update_xml": [ From e82cf76be73d03cb0b3e1b4f2131ebc30f39f107 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Fri, 26 Dec 2008 12:20:18 +0530 Subject: [PATCH 36/55] Bugfix:name_get on pricelist bzr revid: jvo@tinyerp.com-20081226065018-8249xplpekt34oz1 --- addons/product/pricelist.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index bd612c246e8..01749be89cb 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -91,11 +91,15 @@ class product_pricelist(osv.osv): 'version_id': fields.one2many('product.pricelist.version', 'pricelist_id', 'Pricelist Versions'), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), } + def name_get(self, cr, uid, ids, context={}): - result= {} + result= [] + for pl in self.browse(cr, uid, ids, context): - result[pl.id] = pl.name + ' ('+ pl.currency_id.name + ')' + name = str(pl.name) + ' ('+ str(pl.currency_id.name) + ')' + result.append((pl.id,name)) return result + def _get_currency(self, cr, uid, ctx): comp = self.pool.get('res.users').browse(cr,uid,uid).company_id From 77a450b627109f0e7f90060ca72a9b8a7a27bf64 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Fri, 26 Dec 2008 13:22:00 +0530 Subject: [PATCH 37/55] fixed bug : when all stock move lines are cancelled, picking should be cancel bzr revid: hmo@tinyerp.com-20081226075200-kjj1lrq2kk5znh7w --- addons/stock/stock.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e74165e8c15..c98a15e39ab 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1062,20 +1062,22 @@ class stock_move(osv.osv): if move.state in ('confirmed','waiting','assigned','draft'): if move.picking_id: pickings[move.picking_id.id] = True - if move.move_dest_id and move.move_dest_id.state=='waiting': - self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'}) - if move.move_dest_id.picking_id: - wf_service = netsvc.LocalService("workflow") - wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) + if move.move_dest_id and move.move_dest_id.state=='waiting': + self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'}) + if move.move_dest_id.picking_id: + wf_service = netsvc.LocalService("workflow") + wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) self.write(cr, uid, ids, {'state':'cancel', 'move_dest_id': False}) - #for pick_id in pickings: - # wf_service = netsvc.LocalService("workflow") - # wf_service.trg_validate(uid, 'stock.picking', pick_id, 'button_cancel', cr) - #ids2 = [] - #for res in self.read(cr, uid, ids, ['move_dest_id']): - # if res['move_dest_id']: - # ids2.append(res['move_dest_id'][0]) + for pick in self.pool.get('stock.picking').browse(cr,uid,pickings.keys()): + cancel=False + for move in pick.move_lines: + if move.state=='cancel': + cancel=True + if move.state!='cancel': + cancel=False + if cancel: + self.pool.get('stock.picking').write(cr,uid,[pick.id],{'state':'cancel'}) wf_service = netsvc.LocalService("workflow") for id in ids: From 31b55eea5fec95017d22ada0de835cebd1430e03 Mon Sep 17 00:00:00 2001 From: "hda (Tiny)" Date: Fri, 26 Dec 2008 14:57:04 +0530 Subject: [PATCH 38/55] added descriptions bzr revid: hda@tinyerp.com-20081226092704-prg7uohqufv0i1ri --- addons/auction/__terp__.py | 6 ++++++ addons/l10n_chart_uk_minimal/__terp__.py | 1 + addons/profile_accounting/__terp__.py | 1 + addons/profile_association/__terp__.py | 1 + addons/profile_auction/__terp__.py | 1 + addons/profile_crm/__terp__.py | 1 + addons/profile_manufacturing/__terp__.py | 1 + addons/profile_service/__terp__.py | 1 + addons/purchase/__terp__.py | 1 + addons/report_purchase/__terp__.py | 4 +++- addons/report_timesheet/__terp__.py | 2 ++ addons/stock/__terp__.py | 4 ++++ addons/subscription/__terp__.py | 1 + 13 files changed, 24 insertions(+), 1 deletion(-) diff --git a/addons/auction/__terp__.py b/addons/auction/__terp__.py index 24516e3fea7..3f70590d346 100644 --- a/addons/auction/__terp__.py +++ b/addons/auction/__terp__.py @@ -22,8 +22,14 @@ { "name" : "Auction module", "version" : "1.0", + "author" : "Tiny", "category" : "Generic Modules/Auction", "depends" : ["base","account","hr_attendance"], + "description": '''This module provides functionality to + manage artists, articles, sellers, buyers and auction. + Manage bids, track of sold, paid and unpaid objects. + Delivery Management. + ''', "update_xml" : [ # FIXME: review security rules... "security/ir.model.access.csv", diff --git a/addons/l10n_chart_uk_minimal/__terp__.py b/addons/l10n_chart_uk_minimal/__terp__.py index 94da21b59ac..516061768bf 100644 --- a/addons/l10n_chart_uk_minimal/__terp__.py +++ b/addons/l10n_chart_uk_minimal/__terp__.py @@ -63,6 +63,7 @@ "author" : "Seath Solutions Ltd", "website": "http://www.seathsolutions.com", "category" : "Localisation/Account Charts", + "description": "This is the base module to manage the accounting chart for United Kingdom in Open ERP.", "depends" : ["base", "account", "base_iban", "base_vat", "account_chart"], "init_xml" : [], "demo_xml" : [], diff --git a/addons/profile_accounting/__terp__.py b/addons/profile_accounting/__terp__.py index bf4b8795721..c96abadf26d 100644 --- a/addons/profile_accounting/__terp__.py +++ b/addons/profile_accounting/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for Accounting", "depends":["account","report_analytic","board_account","account_followup"], "demo_xml":[], "update_xml":[ diff --git a/addons/profile_association/__terp__.py b/addons/profile_association/__terp__.py index 879bbb9e3f3..ca50e11f0ff 100644 --- a/addons/profile_association/__terp__.py +++ b/addons/profile_association/__terp__.py @@ -24,6 +24,7 @@ "version":"0.1", "author":"Tiny", "category":"Profile", + "description": "Profile for Associates", "depends":["membership", "board_association"], "demo_xml":[], "update_xml":[ diff --git a/addons/profile_auction/__terp__.py b/addons/profile_auction/__terp__.py index 3190930f14d..681a183ea9c 100644 --- a/addons/profile_auction/__terp__.py +++ b/addons/profile_auction/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for Auction house", "depends":["auction", "board_auction","account","hr_timesheet_sheet"], "demo_xml":[], "update_xml":[], diff --git a/addons/profile_crm/__terp__.py b/addons/profile_crm/__terp__.py index 6c1ddda28bd..e66a8dddd4e 100644 --- a/addons/profile_crm/__terp__.py +++ b/addons/profile_crm/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for CRM", "depends":[ "crm_vertical", "board_crm_configuration", ], diff --git a/addons/profile_manufacturing/__terp__.py b/addons/profile_manufacturing/__terp__.py index 6b90856f6d5..8527539cae5 100644 --- a/addons/profile_manufacturing/__terp__.py +++ b/addons/profile_manufacturing/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for manufacturing industries", "depends":["mrp", "sale", "delivery","board_manufacturing","product_margin"], "demo_xml":[], "update_xml":[ diff --git a/addons/profile_service/__terp__.py b/addons/profile_service/__terp__.py index 26ccbca8fdb..ce20d5b34cd 100644 --- a/addons/profile_service/__terp__.py +++ b/addons/profile_service/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for service companies", "depends":[ "hr", "project", diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py index 7900d753dbd..780a37c3af0 100644 --- a/addons/purchase/__terp__.py +++ b/addons/purchase/__terp__.py @@ -26,6 +26,7 @@ "website" : "http://www.openerp.com", "depends" : ["base", "account", "stock", "process"], "category" : "Generic Modules/Sales & Purchases", + "description": "Module for purchase management", "init_xml" : [], "demo_xml" : ["purchase_demo.xml", #"purchase_unit_test.xml" diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py index c74a09ca3e8..70902eed4bc 100644 --- a/addons/report_purchase/__terp__.py +++ b/addons/report_purchase/__terp__.py @@ -20,12 +20,14 @@ # ############################################################################## { - "name" : "Sales Management - Reporting", + "name" : "Purchase Management - Reporting", "version" : "1.0", "author" : "Tiny", "website" : "http://www.openerp.com", "depends" : ["purchase"], "category" : "Generic Modules/Sales & Purchases", + "description": '''Module to add views like + Purchase By Product, Purchase By Category of Product, All Months, Current Month.''', "init_xml" : [], "demo_xml" : [], "update_xml" : [ diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py index 73792922a70..110ce5ca8c7 100644 --- a/addons/report_timesheet/__terp__.py +++ b/addons/report_timesheet/__terp__.py @@ -24,6 +24,8 @@ "version" : "1.0", "author" : "Tiny", "website" : "http://www.openerp.com", + "description": '''Module to add timesheet views like + All Month, Timesheet By User, Timesheet Of Month, Timesheet By Account''', "depends" : ["hr_timesheet",'hr_timesheet_invoice'], "category" : "Generic Modules/Human Resources", "init_xml" : [], diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index 1d012329503..439b32f6b66 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -26,6 +26,10 @@ "website" : "http://www.openerp.com", "depends" : ["product", "account"], "category" : "Generic Modules/Inventory Control", + "description": '''Module provides Inventory Management, define warehouse, stock location, Pickings, + Incoming products, Outgoing products, Internal movements of product, Traceability. + Reports for stock like lots by location, Stock Forecast, Item Labels, Picking List etc.. + ''', "init_xml" : [], "demo_xml" : ["stock_demo.xml"], "update_xml" : [ diff --git a/addons/subscription/__terp__.py b/addons/subscription/__terp__.py index da3ae32a7ea..8d4fb042cb7 100644 --- a/addons/subscription/__terp__.py +++ b/addons/subscription/__terp__.py @@ -24,6 +24,7 @@ "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Others", + "description": '''Module allows to create new documents and add subscription on that document.''', "depends" : ["base"], "init_xml" : [], "demo_xml" : [], From ba68f9bdb1d97620107ead4d0700a5743b35a636 Mon Sep 17 00:00:00 2001 From: "Apa (Open ERP)" Date: Fri, 26 Dec 2008 15:31:51 +0530 Subject: [PATCH 39/55] please make these changes on the report technical guide: some informations need to be added: 1. menus disposition, 2. reports and modified views, 3. and also, dependencies bzr revid: apa@tinyerp.com-20081226100151-us7t500nk9xuaua5 --- .../module/report/ir_module_reference.rml | 80 ++++++++++++------ .../module/report/ir_module_reference.sxw | Bin 11183 -> 13836 bytes 2 files changed, 52 insertions(+), 28 deletions(-) diff --git a/bin/addons/base/module/report/ir_module_reference.rml b/bin/addons/base/module/report/ir_module_reference.rml index 14d549e815c..7aa3a80a3d1 100644 --- a/bin/addons/base/module/report/ir_module_reference.rml +++ b/bin/addons/base/module/report/ir_module_reference.rml @@ -3,18 +3,6 @@ @@ -66,6 +54,10 @@ + + + + @@ -104,44 +96,45 @@ - + - + - + - - - - + + - - Introspection report on objects + + Introspection report on objects + - - - - + + + + + +
- [[ repeatIn(objects, 'module') ]] + [[ repeatIn(objects,'module') ]] @@ -180,10 +173,41 @@ - + - [[ module.description ]] + Reports : + [[ format(module.reports_by_module) ]] + + + + Menu : + [[ format(module.menus_by_module) ]] + + + + View : + [[ format(module.views_by_module) ]] + + + + + + + Dependencies : + + + + + [[ repeatIn(module.dependencies_id,'dependencies_id') ]] + [[ dependencies_id.name ]] - [[ dependencies_id.state ]] + + + + + + + [[ module.description ]]
diff --git a/bin/addons/base/module/report/ir_module_reference.sxw b/bin/addons/base/module/report/ir_module_reference.sxw index f2344339a2a9e98d548cbb9bcea9299ab65de74b..ad3ecff7717c499938b6757e294d63deac3dcc1c 100644 GIT binary patch literal 13836 zcmb7r1#sQS+NGJ9DQ3sa%*@Pe$IN`q%*;$NGseu0nPX;VikW$nw>vxY-aqqd_q!!k z>z2+@t6OTF>OP->G$%~iTRJxzYdTj)3xJ8E!oN76ej$Ey{DS@8fc;f6vaopfmA$>oyHZdJTfgQI&^Wqg!G*&<0z3FD?5b?eA=4QavZpk`?1c0EK zG#DnuZ>Uo4%R8SL;Y97dswt741qm#T)F`VvcqrJtcnW^+IpmDwD4TH?Emll7oozk0 z0Mp8pcK*$Vg~@rir(98+n!?WbnK{L(My=x9@(WAfl^fox^Bd*kcQ-gk8dtE{n#O0b zjNLHDPSX8;^BxKTFpJPg!k;06#keHUIE+@oGU>%vXjcc6Akb0>m}BnfmhDVqYnam@ zmj}U&IJoMFTlngTU--lcFGpk>u{1Ub=+%s_bi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uE4){_dc)f()$i6)wSM&(B0{1lW*@H9gg-80)y}Xo{t8=E2%<3nNok2o>D9U7s zuHz!g4U{<7xCi~!rp=2K61 zSB<$k2tmq4Wrq|TiWNXsb~;GciAHmK{ZpFz6wxbJ$FqEjrz#J4kLRZme5RNIZGa*B zo?d++H=HhDtmur?L3fcYjOO=8r&{%^Zn)& z6_XYQTIpGv85=qLA-HOoo3QC2M1Obw_!1uN@i;r9UrzR-T5Fhre^vdVu_`GL%r9i- z)%$C?Ib+kPko9EO-lOlQcllZ$5@^-Q>qpesj;bM)awT#PGb@r~4#05`&Y*5*?hWr7 zQ%Mn2^7uub8{=q{f9w^D^~n1+^RZM>$>|nZA<%0{C!{!QR)ZQ>(deBNmlwoCKDAu$86At%RP-U@HO5>=i zMNV(m;4@t^liw+nL@1UT_w81~N=XV+PAX}C9(Dd`+c(_G(q!kVjZVSf*bvmCfz#E? zpKl@rQ&OAJNcjAMhX$b)L*WHr^#bs%ssWjn1d+$+>;;Yg1;Yx^V5SkvtFO42nB zV-M8l%jSq}4_^0XrFNeH&+{4M>nZ25gd>{?4vBYNh)MIsn7SPip6tqKWSLFWy0bwX z#gkHu2A40|&pCkiAG$UtMI=VEw-!#!+bdRC2~aR}kbf5Iy=~Z^>_5`IzoPzh3&<~J z+iw$mbN{N2`?FZ@e@6fF>)rn-?taPjew*i;`&XWS5byn4aKHLezisBt{VVBj>E3@Y z%x@IPU#1B2wv>Nm`LmSopLu?X`Fi7T3Qu8+~zomcw z%<@b8_uKaVhUNb!1^gef|D1w9zyALv2K;R#Z->L+w>0oSJN+NvpL^85)B(Ru^6lqu zt-xP#f9`4iq5Awk;0D^8UiE+b*?&d-xyt+R_1}NXbN|%+{42|!6X&mr@VCJe{dax% lSLB}`<6nvOx4n}7Lz Date: Fri, 26 Dec 2008 15:33:30 +0530 Subject: [PATCH 40/55] improve account_invoice_layout module bzr revid: hmo@tinyerp.com-20081226100330-1h4k14j7lym3msu7 --- .../account_invoice_layout/account_invoice_layout_report.xml | 4 ++-- .../account_invoice_layout/report/special_message_invoice.py | 2 +- .../report/special_message_invoice.rml | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/account_invoice_layout/account_invoice_layout_report.xml b/addons/account_invoice_layout/account_invoice_layout_report.xml index 034e869d912..2579609bfbf 100644 --- a/addons/account_invoice_layout/account_invoice_layout_report.xml +++ b/addons/account_invoice_layout/account_invoice_layout_report.xml @@ -1,7 +1,7 @@ - [[ format((o.payment_term and o.payment_term.note) or '') ]] +
[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]] -[[ note or removeParentNode('table') ]] - +[[ note or removeParentNode('para') ]] +
From 00067b2e13b43d10b9524f429f6dfb8defd217aa Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 11:14:34 +0100 Subject: [PATCH 41/55] [FIX] modules: no version specify mean version '0' bzr revid: christophe@taupe-20081226101434-9qnhitt14kkxeu4i --- bin/addons/base/module/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index f2541a17791..01917e9ab7e 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -346,7 +346,7 @@ class module(osv.osv): mod_sort = {} for m in modules: name, version, extension = m[0], m[1], m[-1] - if version == 'x': # 'x' version was a mistake + if not version or version == 'x': # 'x' version was a mistake version = '0' if name in mod_sort: if parse_version(version) <= parse_version(mod_sort[name][0]): @@ -367,7 +367,7 @@ class module(osv.osv): else: id = ids[0] installed_version = self.read(cr, uid, id, ['latest_version'])['latest_version'] - if installed_version == 'x': # 'x' version was a mistake + if not installed_version or installed_version == 'x': # 'x' version was a mistake installed_version = '0' if parse_version(version) > parse_version(installed_version): self.write(cr, uid, id, { 'url': url }) From 3c16899b996130ec35697597ebdcb79fc13a18f8 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 11:17:41 +0100 Subject: [PATCH 42/55] [IMP] PoolManager: use class methods instead of static methods bzr revid: christophe@taupe-20081226101741-noqnp5agvi0nxsu1 --- bin/sql_db.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/bin/sql_db.py b/bin/sql_db.py index 041f855b32b..4d4a5f8efb3 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -192,36 +192,36 @@ class PoolManager(object): _dsn = None maxconn = int(tools.config['db_maxconn']) or 64 - def dsn(db_name): - if PoolManager._dsn is None: - PoolManager._dsn = '' + @classmethod + def dsn(cls, db_name): + if cls._dsn is None: + cls._dsn = '' for p in ('host', 'port', 'user', 'password'): cfg = tools.config['db_' + p] if cfg: - PoolManager._dsn += '%s=%s ' % (p, cfg) - return '%s dbname=%s' % (PoolManager._dsn, db_name) - dsn = staticmethod(dsn) + cls._dsn += '%s=%s ' % (p, cfg) + return '%s dbname=%s' % (cls._dsn, db_name) - def get(db_name): - if db_name not in PoolManager._pools: + @classmethod + def get(cls, db_name): + if db_name not in cls._pools: logger = netsvc.Logger() try: logger.notifyChannel('dbpool', netsvc.LOG_INFO, 'Connecting to %s' % (db_name,)) - PoolManager._pools[db_name] = ConnectionPool(ThreadedConnectionPool(1, PoolManager.maxconn, PoolManager.dsn(db_name)), db_name) + cls._pools[db_name] = ConnectionPool(ThreadedConnectionPool(1, cls.maxconn, cls.dsn(db_name)), db_name) except Exception, e: logger.notifyChannel('dbpool', netsvc.LOG_ERROR, 'Unable to connect to %s: %s' % (db_name, str(e))) raise - return PoolManager._pools[db_name] - get = staticmethod(get) + return cls._pools[db_name] - def close(db_name): - if db_name in PoolManager._pools: + @classmethod + def close(cls, db_name): + if db_name in cls._pools: logger = netsvc.Logger() logger.notifyChannel('dbpool', netsvc.LOG_INFO, 'Closing all connections to %s' % (db_name,)) - PoolManager._pools[db_name].closeall() - del PoolManager._pools[db_name] - close = staticmethod(close) + cls._pools[db_name].closeall() + del cls._pools[db_name] def db_connect(db_name, serialize=0): return PoolManager.get(db_name) From 8cd39a445e71c9f105d75d5ea6a94f9492a1ee20 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 11:18:58 +0100 Subject: [PATCH 43/55] [IMP] allow methods 'all' and 'any' to be available with python 2.4 bzr revid: christophe@taupe-20081226101858-vfzy8x6blf2vmf6h --- bin/tools/misc.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index ac5f8695149..933274ddf0c 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -664,6 +664,29 @@ def ustr(value): return unicode(value, 'utf-8') +# to be compatible with python 2.4 +import __builtin__ +if not hasattr(__builtin__, 'all'): + def all(iterable): + for element in iterable: + if not element: + return False + return True + + __builtin__.all = all + del all + +if not hasattr(__builtin__, 'any'): + def any(iterable): + for element in iterable: + if element: + return True + return False + + __builtin__.any = any + del any + + def get_languages(): languages={ From 0bc6a1dbaf93b961677e863cefb2fe7bdf89f9f3 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 11:23:47 +0100 Subject: [PATCH 44/55] [FIX] stock picking must be canceled if all picking move lines are cancle bzr revid: christophe@taupe-20081226102347-sbabtnkbr6j3mvlf --- addons/stock/stock.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c98a15e39ab..55421013ca4 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1070,13 +1070,7 @@ class stock_move(osv.osv): self.write(cr, uid, ids, {'state':'cancel', 'move_dest_id': False}) for pick in self.pool.get('stock.picking').browse(cr,uid,pickings.keys()): - cancel=False - for move in pick.move_lines: - if move.state=='cancel': - cancel=True - if move.state!='cancel': - cancel=False - if cancel: + if all(move.state == 'cancle' for move in pick.move_lines): self.pool.get('stock.picking').write(cr,uid,[pick.id],{'state':'cancel'}) wf_service = netsvc.LocalService("workflow") From 1be0861d4a7f0a4f93059a432142cd56fe0daebf Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 12:12:02 +0100 Subject: [PATCH 45/55] [FIX] encoding bug in tree printscreen lp bug: https://launchpad.net/bugs/311159 fixed bzr revid: christophe@taupe-20081226111202-pz23wa09u5kezfam --- bin/report/printscreen/ps_list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index 379f11361df..834e459e355 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -157,7 +157,7 @@ class report_printscreen_list(report_int): line[f]= line[f][1] if fields[f]['type'] in ('one2many','many2many') and line[f]: - line[f] = '( '+str(len(line[f])) + ' )' + line[f] = '( '+tools.ustr(len(line[f])) + ' )' if fields[f]['type'] == 'float': precision=(('digits' in fields[f]) and fields[f]['digits'][1]) or 2 line[f]='%.2f'%(line[f]) @@ -166,7 +166,7 @@ class report_printscreen_list(report_int): col.setAttribute('para','yes') col.setAttribute('tree','no') if line[f] != None: - txt = new_doc.createTextNode(str(line[f] or '')) + txt = new_doc.createTextNode(tools.ustr(line[f] or '')) if temp[count] == 1: tsum[count] = float(tsum[count]) + float(line[f]); From 5c0aaf07e04999a451faaf7e59bd8d950ab59398 Mon Sep 17 00:00:00 2001 From: "Sofia (Open ERP)" Date: Fri, 26 Dec 2008 17:21:41 +0530 Subject: [PATCH 46/55] security rules added for objects bzr revid: sso@tinyerp.com-20081226115141-a3ar7e7agyvboawc --- addons/account_voucher/__terp__.py | 1 + addons/account_voucher/security/ir.model.access.csv | 6 ++++++ addons/mrp_subproduct/__terp__.py | 1 + addons/mrp_subproduct/security/ir.model.access.csv | 3 +++ addons/wiki/security/ir.model.access.csv | 2 ++ 5 files changed, 13 insertions(+) create mode 100644 addons/account_voucher/security/ir.model.access.csv create mode 100644 addons/mrp_subproduct/security/ir.model.access.csv diff --git a/addons/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py index 867711e5fe4..dacd296cb85 100755 --- a/addons/account_voucher/__terp__.py +++ b/addons/account_voucher/__terp__.py @@ -43,6 +43,7 @@ Basic Accounting, plus new things which available are: ], "update_xml" : [ + "security/ir.model.access.csv", "account_voucher_sequence.xml", "account_view.xml", "account_report.xml", diff --git a/addons/account_voucher/security/ir.model.access.csv b/addons/account_voucher/security/ir.model.access.csv new file mode 100644 index 00000000000..b4203be5416 --- /dev/null +++ b/addons/account_voucher/security/ir.model.access.csv @@ -0,0 +1,6 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_account_voucher_user","account.voucher","model_account_voucher","account.group_account_user",1,0,0,0 +"access_account_voucher_line_user","account.voucher.line","model_account_voucher_line","account.group_account_user",1,0,0,0 +"access_account_voucher_manager","account.voucher","model_account_voucher","account.group_account_manager",1,1,1,1 +"access_account_voucher_line_manager","account.voucher.line","model_account_voucher_line","account.group_account_manager",1,1,1,1 + diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py index 14b0152d532..b24501839bd 100644 --- a/addons/mrp_subproduct/__terp__.py +++ b/addons/mrp_subproduct/__terp__.py @@ -37,6 +37,7 @@ With this module: """, "demo_xml" : [], "update_xml" : [ + "security/ir.model.access.csv", "mrp_subproduct_view.xml", ], "active": False, diff --git a/addons/mrp_subproduct/security/ir.model.access.csv b/addons/mrp_subproduct/security/ir.model.access.csv new file mode 100644 index 00000000000..3c6547410d4 --- /dev/null +++ b/addons/mrp_subproduct/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_mrp_subproduct_user","mrp.subproduct","model_mrp_subproduct","mrp.group_mrp_user",1,0,0,0 +"access_mrp_subproduct_manager","mrp.subproduct","model_mrp_subproduct","mrp.group_mrp_manager",1,1,1,1 diff --git a/addons/wiki/security/ir.model.access.csv b/addons/wiki/security/ir.model.access.csv index a54122e0231..acb871141ff 100644 --- a/addons/wiki/security/ir.model.access.csv +++ b/addons/wiki/security/ir.model.access.csv @@ -3,4 +3,6 @@ "wiki_groups_all","wiki.groups","model_wiki_groups",,1,0,0,0 "wiki_wiki","wiki.wiki","model_wiki_wiki","base.group_user",1,1,1,1 "wiki_groups","wiki.groups","model_wiki_groups","base.group_system",1,1,1,1 +"wiki_groups_link","wiki.groups.link","model_wiki_groups_link","base.group_system",1,1,1,1 "wiki_wiki_history","wiki.wiki.history","model_wiki_wiki_history","base.group_user",1,0,1,0 +"wiki_wizard_wiki_history_show_diff","wizard.wiki.history.show_diff","model_wizard_wiki_history_show_diff","base.group_user",1,1,1,1 From d67eab9c0738265a32d9a3a3c97bf483bec06581 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 14:27:39 +0100 Subject: [PATCH 47/55] [FIX] encoding errors lp bug: https://launchpad.net/bugs/31159 fixed bzr revid: christophe@taupe-20081226132739-ty8u9qe32dcu4iyi --- addons/auction/report/huissier.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/auction/report/huissier.py b/addons/auction/report/huissier.py index e01063ba9c0..9afe67834c1 100644 --- a/addons/auction/report/huissier.py +++ b/addons/auction/report/huissier.py @@ -25,9 +25,8 @@ from osv.osv import osv, orm from report.interface import report_rml #FIXME: use the one from tools and delete the one from report from report.int_to_text import int_to_text - -def toxml(val): - return val.replace('&', '&').replace('<','<').replace('>','>').decode('utf-8').encode('latin1', 'replace') +from tools import to_xml as toxml +from tools import ustr class report_custom(report_rml): def __init__(self, name, table, tmpl, xsl): @@ -38,7 +37,7 @@ class report_custom(report_rml): lots = pool.get('auction.lots').browse(cr, uid, ids) auction = lots[0].auction_id - xml = ''' + xml = ''' %s @@ -49,7 +48,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 = u'retiré' else: price_french = int_to_text(int(l['obj_price'] or 0.0))+' eur' i+=1 @@ -59,10 +58,9 @@ class report_custom(report_rml): %s %s %s - ''' % (i, l['obj_num'], toxml(l['name']), price_french, str(l['obj_price'] or '/')) + ''' % (i, l['obj_num'], ustr(toxml(l['name'])), ustr(price_french), ustr(l['obj_price'] or '/')) xml += '' -# file('/tmp/terp.xml','wb+').write(xml) return xml report_custom('report.flagey.huissier', 'auction.lots', '', 'addons/auction/report/huissier.xsl') From bfecad04b59ee60afe9127a838e5dda7cc6d8eb0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 14:29:45 +0100 Subject: [PATCH 48/55] [FIX] encoding problems lp bug: https://launchpad.net/bugs/311159 fixed bzr revid: christophe@taupe-20081226132945-z366jn2es0mms9ul --- bin/report/interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/report/interface.py b/bin/report/interface.py index da94535498e..99b5860c3e0 100644 --- a/bin/report/interface.py +++ b/bin/report/interface.py @@ -86,6 +86,7 @@ class report_rml(report_int): def create(self, cr, uid, ids, datas, context): xml = self.create_xml(cr, uid, ids, datas, context) + xml = tools.ustr(xml).encode('utf8') if datas.get('report_type', 'pdf') == 'raw': return xml rml = self.create_rml(cr, xml, uid, context) From 2bc319d919ca7c2de535017d13c5635f761dbdf4 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 16:05:51 +0100 Subject: [PATCH 49/55] [FIX] encoding problems with the logger lp bug: https://launchpad.net/bugs/311528 fixed bzr revid: christophe@taupe-20081226150551-bk3rfyzba2lq2emu --- bin/netsvc.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index 5a718f0c7a6..bc0d5362468 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -115,7 +115,6 @@ class Service(object): self._response = s(self._response_process_id) def abortResponse(self, error, description, origin, details): - import tools if not tools.config['debug_mode']: raise Exception("%s -- %s\n\n%s"%(origin, description, details)) else: @@ -152,12 +151,11 @@ LOG_CRITICAL = 'critical' logging.DEBUG_RPC = logging.DEBUG - 1 def init_logger(): - from tools import config import os logger = logging.getLogger() - if config['syslog']: + if tools.config['syslog']: # SysLog Handler if os.name == 'nt': sysloghandler = logging.handlers.NTEventLogHandler("%s %s" % @@ -171,9 +169,9 @@ def init_logger(): # create a format for log messages and dates formatter = logging.Formatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') - if config['logfile']: + if tools.config['logfile']: # LogFile Handler - logf = config['logfile'] + logf = tools.config['logfile'] try: dirname = os.path.dirname(logf) if dirname and not os.path.isdir(dirname): @@ -192,7 +190,7 @@ def init_logger(): # add the handler to the root logger logger.addHandler(handler) - logger.setLevel(config['log_level'] or '0') + logger.setLevel(tools.config['log_level'] or '0') if isinstance(handler, logging.StreamHandler) and os.name != 'nt': # change color of level names @@ -240,13 +238,14 @@ class Logger(object): level_method = getattr(log, level) - result = str(msg).strip().split('\n') + result = tools.ustr(msg).strip().split('\n') if len(result)>1: for idx, s in enumerate(result): level_method('[%02d]: %s' % (idx+1, s,), extra=extra) elif result: level_method(result[0], extra=extra) +import tools init_logger() class Agent(object): @@ -303,7 +302,6 @@ class GenericXMLRPCRequestHandler: self.log('exception', e) tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) s = str(e) - import tools if tools.config['debug_mode']: import pdb tb = sys.exc_info()[2] @@ -314,7 +312,6 @@ class SSLSocket(object): def __init__(self, socket): if not hasattr(socket, 'sock_shutdown'): from OpenSSL import SSL - import tools ctx = SSL.Context(SSL.SSLv23_METHOD) ctx.use_privatekey_file(tools.config['secure_pkey_file']) ctx.use_certificate_file(tools.config['secure_cert_file']) @@ -441,7 +438,6 @@ class TinySocketClientThread(threading.Thread): except Exception, e: print repr(e) tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) - import tools if tools.config['debug_mode']: import pdb tb = sys.exc_info()[2] From 6de8fb60593372dba23186207c2c7cc81fc3eb77 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 17:34:58 +0100 Subject: [PATCH 50/55] [FIX] project_gtd: format exception correctly lp bug: https://launchpad.net/bugs/311548 fixed bzr revid: christophe@taupe-20081226163458-btibjzmn0wu9jx3o --- addons/project_gtd/wizard/project_gtd_daily.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_gtd/wizard/project_gtd_daily.py b/addons/project_gtd/wizard/project_gtd_daily.py index ad62ee39a4f..3a87f1bd3ed 100644 --- a/addons/project_gtd/wizard/project_gtd_daily.py +++ b/addons/project_gtd/wizard/project_gtd_daily.py @@ -33,7 +33,7 @@ class wiz_timebox_open(wizard.interface): pool = pooler.get_pool(cr.dbname) ids = pool.get('project.gtd.timebox').search(cr, uid, [('user_id','=',uid),('type','=',tbtype)]) if not len(ids): - raise wizard.except_wizard('Error !', 'No timebox of the type "%s" defined !') + raise wizard.except_wizard('Error !', 'No timebox of the type "%s" defined !' % (tbtype,)) view_type = 'form,tree' if len(ids) >= 1: domain = "[('id','in',["+','.join(map(str,ids))+"])]" From 16195435ed780fa945d17c8b3ecb65edbb34fec6 Mon Sep 17 00:00:00 2001 From: qdp Date: Fri, 26 Dec 2008 19:11:02 +0100 Subject: [PATCH 51/55] *added option on account_journal to group the account_move_line generated by an invoice if the columns tax_code_id, product_id, analityc_account_id and account_id are the same *bugfix: error when no analytic journal was defined on the account_journal and we tried to add an analytic account on an invoice line *improved translatability bzr revid: qdp@tinyerp.com-20081226181102-7daak46z0wyut9eu --- addons/account/account.py | 3 ++- addons/account/account_move_line.py | 2 ++ addons/account/account_view.xml | 2 ++ addons/account/invoice.py | 26 +++++++++++++++++++++++--- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 86d7ac16c68..f218e5b5bd7 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -451,8 +451,9 @@ class account_journal(osv.osv): 'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tell Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."), 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account'), 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account'), - 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal."), + 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal. This is used in fiscal year closing."), 'update_posted': fields.boolean('Allow Cancelling Entries'), + 'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is cheked, the system will try to group the accouting lines when generating them from invoices."), 'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True), 'user_id': fields.many2one('res.users', 'User', help="The responsible user of this journal"), 'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'), diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index f32d150906d..4dbc8819893 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -61,6 +61,8 @@ class account_move_line(osv.osv): def create_analytic_lines(self, cr, uid, ids, context={}): for obj_line in self.browse(cr, uid, ids, context): if obj_line.analytic_account_id: + if not obj_line.journal_id.analytic_journal_id: + raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name,)) amt = (obj_line.credit or 0.0) - (obj_line.debit or 0.0) vals_lines={ 'name': obj_line.name, diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 02ad8648b95..b471343863b 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -267,6 +267,8 @@ + + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 39e03c710ad..606b8b00f50 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -68,7 +68,7 @@ class account_invoice(osv.osv): tt = type2journal.get(type_inv, 'sale') result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context) if not result: - raise osv.except_osv(_('No Analytic Journal !'),("You have to define an analytic journal of type '%s' !") % (tt,)) + raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal of type '%s' !") % (tt,)) return result[0] def _get_type(self, cr, uid, context={}): @@ -448,7 +448,7 @@ class account_invoice(osv.osv): ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') acc_obj = self.pool.get('account.account') - self.button_compute(cr, uid, ids, context={}, set_total=True) + self.button_compute(cr, uid, ids, context={}, set_total=False) for inv in self.browse(cr, uid, ids): if inv.move_id: continue @@ -598,14 +598,34 @@ class account_invoice(osv.osv): date = inv.date_invoice or time.strftime('%Y-%m-%d') part = inv.partner_id.id + line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context={})) ,iml) + if inv.journal_id.group_invoice_lines: + line2 = {} + for x, y, l in line: + tmp = str(l['account_id']) + tmp += '-'+str('tax_code_id' in l and l['tax_code_id'] or "False") + tmp += '-'+str('product_id' in l and l['product_id'] or "False") + tmp += '-'+str('analytic_account_id' in l and l['analytic_account_id'] or "False") + + if tmp in line2: + am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit']) + line2[tmp]['debit'] = (am > 0) and am or 0.0 + line2[tmp]['credit'] = (am < 0) and -am or 0.0 + line2[tmp]['tax_amount'] += l['tax_amount'] + line2[tmp]['analytic_lines'] += l['analytic_lines'] + else: + line2[tmp] = l + line = [] + for key, val in line2.items(): + line.append((0,0,val)) + journal_id = inv.journal_id.id #self._get_journal(cr, uid, {'type': inv['type']}) journal = self.pool.get('account.journal').browse(cr, uid, journal_id) if journal.centralisation: raise osv.except_osv(_('UserError'), _('Can not create invoice move on centralized journal')) - move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date} period_id=inv.period_id and inv.period_id.id or False if not period_id: From e5f9fa5eb2bf27b545abecfe4e9c13fce9092ebf Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Dec 2008 19:45:38 +0100 Subject: [PATCH 52/55] [FIX] tools.ustr, like str, must always return a string lp bug: https://launchpad.net/bugs/311595 fixed bzr revid: christophe@taupe-20081226184538-lkf5lepssmgctbsz --- bin/tools/misc.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 933274ddf0c..a9157541a99 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -649,10 +649,6 @@ def ustr(value): @return: unicode string """ - if (value is None) or (value is False): - return value - if not value: - return u'' if isinstance(value, unicode): return value From 68d226b36399a2de9ccaf1ae6e7b838c02e08240 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 26 Dec 2008 20:21:44 +0100 Subject: [PATCH 53/55] improve bzr revid: fp@tinyerp.com-20081226192144-xta0redr3e13vgja --- addons/base_contact/base_contact.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_contact/base_contact.py b/addons/base_contact/base_contact.py index 289b0b48dc7..943949cff31 100644 --- a/addons/base_contact/base_contact.py +++ b/addons/base_contact/base_contact.py @@ -111,13 +111,13 @@ class res_partner_job(osv.osv): return super(res_partner_job,self).search(cr, user, args, offset, limit, order, context, count) _name = 'res.partner.job' - _description ='Contact Job Title' + _description ='Contact Partner Function' _order = 'sequence_contact' _columns = { 'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'), 'address_id':fields.many2one('res.partner.address','Address'), 'contact_id':fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'), - 'function_id': fields.many2one('res.partner.function','Job Title'), + 'function_id': fields.many2one('res.partner.function','Partner Function'), 'sequence_contact':fields.integer('Sequence',help='Order of importance of this address in the list of addresses of the linked contact'), 'sequence_partner':fields.integer('Sequence',help='Order of importance of this job title in the list of job title of the linked partner'), 'email': fields.char('E-Mail', size=240), From 9f2bc053e9da7d960c5b6e277bc137be13eaa4bc Mon Sep 17 00:00:00 2001 From: "Apa (Open ERP)" Date: Sat, 27 Dec 2008 12:32:47 +0530 Subject: [PATCH 54/55] Add header in rml for technical guide report bzr revid: apa@tinyerp.com-20081227070247-0c89qq6r97akc8gy --- bin/addons/base/module/report/ir_module_reference.rml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/addons/base/module/report/ir_module_reference.rml b/bin/addons/base/module/report/ir_module_reference.rml index 7aa3a80a3d1..b19d0ddeed9 100644 --- a/bin/addons/base/module/report/ir_module_reference.rml +++ b/bin/addons/base/module/report/ir_module_reference.rml @@ -3,6 +3,16 @@ From f0b13583ecd1dcd8a1ddabd9e67540c5e308220f Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Sat, 27 Dec 2008 13:20:42 +0100 Subject: [PATCH 55/55] [FIX] convert file to utf8 bzr revid: christophe@taupe-20081227122042-q1hcbu7m1v2e1o2c --- bin/tools/amount_to_text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tools/amount_to_text.py b/bin/tools/amount_to_text.py index 9e080bebfc7..3734c9617f5 100644 --- a/bin/tools/amount_to_text.py +++ b/bin/tools/amount_to_text.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved # $Id$ # @@ -120,7 +120,7 @@ def _100_to_text_nl(number): else: units = units_nl[number % 10] if units[-1] == 'e': - joinword = 'ën' + joinword = 'ën' else: joinword = 'en' return units+joinword+tens_nl[number / 10]