From f087c52260a8fc9b14b825624fde946111bef66c Mon Sep 17 00:00:00 2001 From: Amit Mendapara Date: Fri, 10 Oct 2008 18:00:23 +0530 Subject: [PATCH 1/7] - Added Gantt view type - Added simple Gantt view for project.task bzr revid: ame@tinyerp.com-20081010123023-9cv9n21o2el4kvk0 --- bin/addons/base/ir/ir_actions.py | 3 ++- bin/addons/base/ir/ir_ui_view.py | 3 ++- bin/addons/base/ir/wizard/wizard_menu.py | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index a0ac5a2ff69..2e3d683c27a 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -231,7 +231,8 @@ class act_window_view(osv.osv): ('tree', 'Tree'), ('form', 'Form'), ('graph', 'Graph'), - ('calendar', 'Calendar')), string='Type of view', required=True), + ('calendar', 'Calendar'), + ('gantt', 'Gantt')), string='Type of view', required=True), 'act_window_id': fields.many2one('ir.actions.act_window', 'Action', ondelete='cascade'), 'multi': fields.boolean('On multiple doc.', help="If set to true, the action will not be displayed on the right toolbar of a form views."), diff --git a/bin/addons/base/ir/ir_ui_view.py b/bin/addons/base/ir/ir_ui_view.py index 276568c9e31..e3e7e639f02 100644 --- a/bin/addons/base/ir/ir_ui_view.py +++ b/bin/addons/base/ir/ir_ui_view.py @@ -66,7 +66,8 @@ class view(osv.osv): ('tree','Tree'), ('form','Form'), ('graph', 'Graph'), - ('calendar', 'Calendar')), 'View Type', required=True), + ('calendar', 'Calendar'), + ('gantt', 'Gantt')), 'View Type', required=True), 'arch': fields.text('View Architecture', required=True), 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade'), 'field_parent': fields.char('Childs Field',size=64), diff --git a/bin/addons/base/ir/wizard/wizard_menu.py b/bin/addons/base/ir/wizard/wizard_menu.py index 3724b1dd4e5..9030a6c7164 100644 --- a/bin/addons/base/ir/wizard/wizard_menu.py +++ b/bin/addons/base/ir/wizard/wizard_menu.py @@ -77,7 +77,12 @@ class wizard_model_menu_line(osv.osv_memory): _columns = { 'wizard_id': fields.many2one('wizard.ir.model.menu.create','Wizard'), 'sequence': fields.integer('Sequence'), - 'view_type': fields.selection([('tree','Tree'),('form','Form'),('graph','Graph'),('calendar','Calendar')],'View Type',required=True), + 'view_type': fields.selection([ + ('tree','Tree'), + ('form','Form'), + ('graph','Graph'), + ('calendar','Calendar'), + ('gantt','Gantt')],'View Type',required=True), 'view_id': fields.many2one('ir.ui.view', 'View'), } _defaults = { From 9e6cef90dbc3b25ed6914be1833370cd92100766 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Mon, 13 Oct 2008 11:52:32 +0530 Subject: [PATCH 2/7] Bugfix:unit problem in rml2pdf bzr revid: jvo@tinyerp.com-20081013062232-g24j9qbky10ocw4u --- bin/report/render/rml2pdf/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/report/render/rml2pdf/utils.py b/bin/report/render/rml2pdf/utils.py index 35460a2faeb..a3c68d1eb64 100644 --- a/bin/report/render/rml2pdf/utils.py +++ b/bin/report/render/rml2pdf/utils.py @@ -57,7 +57,7 @@ def text_get(node): units = [ (re.compile('^(-?[0-9\.]+)\s*in$'), reportlab.lib.units.inch), - (re.compile('^(-?[0-9\.]+)\s*cm$'), reportlab.lib.units.cm), + (re.compile('^(-?[0-9\.]+)\s*cm$'), reportlab.lib.units.cm), (re.compile('^(-?[0-9\.]+)\s*mm$'), reportlab.lib.units.mm), (re.compile('^(-?[0-9\.]+)\s*$'), 1) ] @@ -93,7 +93,7 @@ def attr_get(node, attrs, dict={}): elif dict[key]=='int': res[key] = int(node.getAttribute(key)) elif dict[key]=='unit': - res[key] = unit_get(node.getAttribute(name)) + res[key] = unit_get(node.getAttribute(key)) return res # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From dd13d1a1d5b93a666df045b10c9940b72b63fdb9 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 13 Oct 2008 18:30:22 +0200 Subject: [PATCH 3/7] improvement bzr revid: fp@tinyerp.com-20081013163022-d8ddflvsdp9gjydf --- addons/account/account.py | 7 ++----- addons/delivery/delivery_view.xml | 2 +- addons/product/product.py | 2 ++ addons/product/product_view.xml | 4 ++++ addons/sale/sale_report.xml | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 27075fbb648..95f1bcd33a9 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -844,7 +844,7 @@ class account_move(osv.osv): if line.account_id.currency_id: if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id or line.currency_id): - raise osv.except_osv(_('Error'), _('Couldn\'t create move with currency different than the secondary currency of the account')) + raise osv.except_osv(_('Error'), _('Couldn\'t create move with currency different than the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.' % (line.account_id.code, line.account_id.name))) if abs(amount) < 0.0001: if not len(line_draft_ids): @@ -1859,9 +1859,6 @@ class wizard_multi_charts_accounts(osv.osv_memory): obj_journal = self.pool.get('account.journal') obj_acc_template = self.pool.get('account.account.template') - if obj_multi.code_digits<=5: - raise osv.except_osv(_('User Error'), _('Account code should be of more than 5 digits.')) - # Creating Account obj_acc_root = obj_multi.chart_template_id.account_root_id tax_code_root_id = obj_multi.chart_template_id.tax_code_root_id.id @@ -1943,7 +1940,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'name': (obj_acc_root.id == account_template.id) and obj_multi.company_id.name or account_template.name, #'sign': account_template.sign, 'currency_id': account_template.currency_id and account_template.currency_id.id or False, - 'code': code_acc[:dig], + 'code': code_acc, 'type': account_template.type, 'user_type': account_template.user_type and account_template.user_type.id or False, 'reconcile': account_template.reconcile, diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 07dec155ddf..a29fdde7ac8 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -62,7 +62,7 @@ - + diff --git a/addons/product/product.py b/addons/product/product.py index b3a9f77dc41..3b1b78b7241 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -531,6 +531,7 @@ class product_packaging(osv.osv): _description = "Packaging" _rec_name = 'ean' _columns = { + 'sequence': fields.integer('Sequence'), 'name' : fields.char('Description', size=64), 'qty' : fields.float('Quantity by Package', help="The total number of products you can put by palet or box."), @@ -559,6 +560,7 @@ class product_packaging(osv.osv): _defaults = { 'rows' : lambda *a : 3, + 'sequence' : lambda *a : 1, 'ul' : _get_1st_ul, } diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index ad359628958..30b07fe8f74 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -121,6 +121,7 @@
+ @@ -322,6 +323,7 @@ tree + @@ -336,7 +338,9 @@ + + diff --git a/addons/sale/sale_report.xml b/addons/sale/sale_report.xml index 8ced0a1c0dc..afb43b869c5 100644 --- a/addons/sale/sale_report.xml +++ b/addons/sale/sale_report.xml @@ -23,7 +23,7 @@ rml="sale/report/prepare_allot.rml" auto="False"/> --> - - + + From 262ca045dbaef82145f04cc8ee8db4582bce9c5f Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 13 Oct 2008 23:30:45 +0200 Subject: [PATCH 4/7] Bugfix in the NT Service bzr revid: stephane@tinyerp.com-20081013213045-as7jsps8tvbrkv4s --- win32/OpenERPServerService.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/win32/OpenERPServerService.py b/win32/OpenERPServerService.py index 85cd884a839..f6f071bc082 100644 --- a/win32/OpenERPServerService.py +++ b/win32/OpenERPServerService.py @@ -73,15 +73,13 @@ class OpenERPServerService(win32serviceutil.ServiceFramework): def StartTERP(self): - # The server finds now its configuration automatically on Windows - # We start the ERP Server as an independent process, but we keep its handle - # The server's binary must be one directory above the service's binary (when py2exe'd the python libraries shouldn' mix) - service_dir = os.path.dirname(sys.argv[0]) - server_dir = os.path.split(service_dir)[0] - server_path = os.path.join(server_dir, 'openerp-server.exe') - self.terpprocess = subprocess.Popen([server_path], \ - cwd=server_dir, - creationflags=win32process.CREATE_NO_WINDOW) + # The server finds now its configuration automatically on Windows + # We start the ERP Server as an independent process, but we keep its handle + # The server's binary must be one directory above the service's binary (when py2exe'd the python libraries shouldn' mix) + service_dir = os.path.dirname(sys.argv[0]) + server_dir = os.path.split(service_dir)[0] + server_path = os.path.join(server_dir, 'openerp-server.exe') + self.terpprocess = subprocess.Popen([server_path], cwd=server_dir, creationflags=win32process.CREATE_NO_WINDOW) def StartControl(self,ws): @@ -93,13 +91,13 @@ class OpenERPServerService(win32serviceutil.ServiceFramework): # Start OpenERP Server itself self.StartTERP() # start the loop waiting for the Service Manager's stop signal - thread.start_new_thread(self.StartControl, (self.hWaitStop,)) - # Log a info message that the server is running - servicemanager.LogInfoMsg("OpenERP Server up and running") - # verification if the server is really running, else quit with an error - self.terpprocess.wait() - if not self.stopping: - sys.exit("OpenERP Server check: server not running, check the logfile for more info") + thread.start_new_thread(self.StartControl, (self.hWaitStop,)) + # Log a info message that the server is running + servicemanager.LogInfoMsg("OpenERP Server up and running") + # verification if the server is really running, else quit with an error + self.terpprocess.wait() + if not self.stopping: + sys.exit("OpenERP Server check: server not running, check the logfile for more info") From eedf6bda1d70254ee9d298c0aca1c3c3c42d9aea Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 13 Oct 2008 23:32:36 +0200 Subject: [PATCH 5/7] Fix in the NT Service bzr revid: stephane@tinyerp.com-20081013213236-ql03yu2cyr5kk750 --- win32/OpenERPServerService.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/OpenERPServerService.py b/win32/OpenERPServerService.py index f6f071bc082..24df255f1d2 100644 --- a/win32/OpenERPServerService.py +++ b/win32/OpenERPServerService.py @@ -95,9 +95,9 @@ class OpenERPServerService(win32serviceutil.ServiceFramework): # Log a info message that the server is running servicemanager.LogInfoMsg("OpenERP Server up and running") # verification if the server is really running, else quit with an error - self.terpprocess.wait() - if not self.stopping: - sys.exit("OpenERP Server check: server not running, check the logfile for more info") + self.terpprocess.wait() + if not self.stopping: + sys.exit("OpenERP Server check: server not running, check the logfile for more info") From 0b13461114233052602be87362bc6189317d1f6d Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 13 Oct 2008 23:55:49 +0200 Subject: [PATCH 6/7] Add the lxml package bzr revid: stephane@tinyerp.com-20081013215549-eofimpqluez4qq6i --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0ae3383ad4c..0000ae6c152 100644 --- a/setup.py +++ b/setup.py @@ -155,7 +155,10 @@ f.close() options = {"py2exe": { "compressed": 0, "optimize": 2, - "packages": ["decimal", "xml", "xml.dom", "xml.xpath", "encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing", "pydot"], + "packages": ["lxml", "lxml.builder", "lxml._elementpath", "lxml.etree", + "lxml.objectify", "decimal", "xml", "xml.dom", "xml.xpath", + "encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing", + "pydot"], "excludes" : ["Tkconstants","Tkinter","tcl"], }} From c39db9af1a5e62dcc5a33d30282c2273b05a19d3 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 14 Oct 2008 14:14:47 +0200 Subject: [PATCH 7/7] domains: allow None to be passed as right operand of a leaf (produce a IS NULL sql statement) bzr revid: christophe@tinyerp.com-20081014121447-imaosx152kodnwpd --- bin/osv/expression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/osv/expression.py b/bin/osv/expression.py index 1e21443d7ab..7397a82e88b 100644 --- a/bin/osv/expression.py +++ b/bin/osv/expression.py @@ -232,9 +232,9 @@ class expression(object): query = '(%s OR %s IS NULL)' % (query, left) else: params = [] - if right is False and operator == '=': + if (right == False or right is None) and operator == '=': query = '%s IS NULL' % left - elif right is False and operator in ['<>', '!=']: + elif (right == False or right is None) and operator in ['<>', '!=']: query = '%s IS NOT NULL' % left else: if left == 'id':