diff --git a/bin/PKG-INFO b/bin/PKG-INFO index eab85ed9001..c74326a1493 100644 --- a/bin/PKG-INFO +++ b/bin/PKG-INFO @@ -1,18 +1,18 @@ Metadata-Version: 1.1 -Name: Tiny ERP -Version: 4.3.0 +Name: OpenERP +Version: 4.3.99 Author: Tiny.be Author-email: fp at tiny be Maintainer: Tiny.be Maintainer-email: fp at tiny be Home-page: http://tiny.be -Download-url: http://tinyerp.org/download.php -Summary: TinyERP is an Enterprise Resource Management written entirely in python. +Download-url: http://openerp.com/downloads.html +Summary: OpenERP is an Enterprise Resource Management written entirely in python. License: GPL -Description: Tiny ERP is a complete ERP and CRM. The main features are accounting (analytic +Description: OpenERP is a complete ERP and CRM. The main features are accounting (analytic and financial), stock management, sales and purchases management, tasks automation, marketing campaigns, help desk, POS, etc. Technical features include a distributed server, flexible workflows, an object database, a dynamic GUI, - customizable reports, and SOAP and XML-RPC interfaces. + customizable reports, and NET-RPC and XML-RPC interfaces. Keywords: ERP, Accounting, Stock, CRM, Enterprise, Logistics, Management, Sales, Purchases Platform: Linux, Win32 diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index ec45981081b..01441910488 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -173,7 +173,10 @@ def create_graph(module_list, force=None): for module in module_list: if module[-4:]=='.zip': module = module[:-4] - mod_path = get_module_path(module) + try: + mod_path = get_module_path(module) + except IOError: + continue terp_file = get_module_resource(module, '__terp__.py') if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path): try: @@ -235,7 +238,11 @@ def load_module_graph(cr, graph, status=None, **kwargs): sys.stdout.flush() pool = pooler.get_pool(cr.dbname) modules = pool.instanciate(m, cr) - cr.execute('select state, demo from ir_module_module where name=%s', (m,)) + + cr.execute('select id from ir_module_module where name=%s', (m,)) + mid = int(cr.rowcount and cr.fetchone()[0] or 0) + + cr.execute('select state, demo from ir_module_module where id=%d', (mid,)) (package_state, package_demo) = (cr.rowcount and cr.fetchone()) or ('uninstalled', False) idref = {} status['progress'] = (float(statusi)+0.4)/len(graph) @@ -267,31 +274,23 @@ def load_module_graph(cr, graph, status=None, **kwargs): tools.convert_csv_import(cr, m, os.path.basename(xml), tools.file_open(opj(m, xml)).read(), idref, noupdate=True) else: tools.convert_xml_import(cr, m, tools.file_open(opj(m, xml)), idref, noupdate=True, **kwargs) - cr.execute('update ir_module_module set demo=%s where name=%s', (True, package.name)) + cr.execute('update ir_module_module set demo=%s where id=%d', (True, mid)) package_todo.append(package.name) - cr.execute("update ir_module_module set state='installed' where state in ('to upgrade', 'to install') and name=%s", (package.name,)) - - # check if all model of the module have at least a access rule. - # TODO: improve this query which is very slow !!! - cr.execute(""" SELECT name - FROM ir_model m - WHERE EXISTS (SELECT 1 - FROM ir_model_data - WHERE module = %s - AND model = m.name - ) - AND NOT EXISTS (SELECT 1 - FROM ir_model_access - WHERE model_id = m.id - ) - """, (m,)) - - for (model,) in cr.fetchall(): - logger.notifyChannel('init', netsvc.LOG_WARNING, 'addon:%s:object %s has no access rules!' % (m,model,)) + cr.execute("update ir_module_module set state='installed' where state in ('to upgrade', 'to install') and id=%d", (mid,)) cr.commit() + + # Update translations for all installed languages + modobj = pool.get('ir.module.module') + modobj.update_translations(cr, 1, [mid], None) + + cr.commit() statusi+=1 + cr.execute("""select model,name from ir_model where id not in (select model_id from ir_model_access)""") + for (model,name) in cr.fetchall(): + logger.notifyChannel('init', netsvc.LOG_WARNING, 'addon:object %s (%s) has no access rules!' % (model,name)) + pool = pooler.get_pool(cr.dbname) cr.execute('select * from ir_model where state=%s', ('manual',)) for model in cr.dictfetchall(): diff --git a/bin/addons/base/__terp__.py b/bin/addons/base/__terp__.py index e810228ac5f..917a0ff3541 100644 --- a/bin/addons/base/__terp__.py +++ b/bin/addons/base/__terp__.py @@ -2,6 +2,7 @@ ############################################################################## # # Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved. +# Copyright (c) 2008 Camptocamp SA # # $Id$ # @@ -30,13 +31,15 @@ "name" : "Base", "version" : "1.0", "author" : "Tiny", - "website" : "http://tinyerp.com", + "website" : "http://openerp.com", "category" : "Generic Modules/Base", - "description": "The kernel of Tiny ERP, needed for all installation.", + "description": "The kernel of OpenERP, needed for all installation.", "depends" : [], "init_xml" : [ "base_data.xml", "base_menu.xml", + "base_security.xml", + "res/res_security.xml", ], "demo_xml" : [ "base_demo.xml", @@ -44,6 +47,7 @@ "res/partner/crm_demo.xml", ], "update_xml" : [ + "ir.model.access.csv", "base_update.xml", "ir/wizard/wizard_menu_view.xml", "ir/ir.xml", @@ -68,6 +72,3 @@ "active": True, "installable": True, } - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/bin/addons/base/base.sql b/bin/addons/base/base.sql index 044a2d8ebb9..02f6a6836dd 100644 --- a/bin/addons/base/base.sql +++ b/bin/addons/base/base.sql @@ -148,9 +148,6 @@ CREATE TABLE res_users ( ); alter table res_users add constraint res_users_login_uniq unique (login); -insert into res_users (id,login,password,name,action_id,active) values (1,'root',NULL,'Root',NULL,False); -select setval('res_users_id_seq', 2); - CREATE TABLE res_groups ( id serial NOT NULL, name varchar(32) NOT NULL, @@ -328,4 +325,14 @@ CREATE TABLE ir_model_data ( res_id integer, primary key(id) ); +--------------------------------- +-- Users +--------------------------------- +insert into res_users (id,login,password,name,action_id,active) values (1,'admin',NULL,'Administrator',NULL,True); +insert into ir_model_data (name,module,model,noupdate,res_id) values ('user_root','base','res.users',True,1); + +-- Compatibility purpose, to remove V6.0 +insert into ir_model_data (name,module,model,noupdate,res_id) values ('user_admin','base','res.users',True,1); + +select setval('res_users_id_seq', 2); diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml index 80bc8953cb5..b7d1f9fa5e0 100644 --- a/bin/addons/base/base_data.xml +++ b/bin/addons/base/base_data.xml @@ -1,5 +1,5 @@ - + ir.ui.menu.tree @@ -23,17 +23,6 @@ - - Administration/Administrator - - - - Extended View - - - No One - - en_US English @@ -1309,7 +1298,7 @@ 4 - 1.0 + 3132.9 @@ -1498,17 +1487,5 @@ Tiny sprl - - - admin - admin - Administrator - Administrator - - - - - - - + diff --git a/bin/addons/base/base_demo.xml b/bin/addons/base/base_demo.xml index fd1cf7c89b0..46f9a15330d 100644 --- a/bin/addons/base/base_demo.xml +++ b/bin/addons/base/base_demo.xml @@ -1,5 +1,5 @@ - + demo @@ -10,7 +10,7 @@ + - - \ No newline at end of file + diff --git a/bin/addons/base/base_menu.xml b/bin/addons/base/base_menu.xml index 41ca0d51f6c..1204ab5b42b 100644 --- a/bin/addons/base/base_menu.xml +++ b/bin/addons/base/base_menu.xml @@ -1,13 +1,13 @@ - + - + + + - - - \ No newline at end of file + diff --git a/bin/addons/base/base_security.xml b/bin/addons/base/base_security.xml index bf529a157d4..387044d8a50 100644 --- a/bin/addons/base/base_security.xml +++ b/bin/addons/base/base_security.xml @@ -1,662 +1,160 @@ - - - - - UI menu - - - - - - - - - UI menu - - - - - - - - - - Act window - - - - - - - - Act window - - - - - - - - - - Actions - - - - - - - - Actions - - - - - - - - - - Actions Report Custom - - - - - - - - Actions Report Custom - - - - - - - - - - Actions Report XML - - - - - - - - Actions Report XML - - - - - - - - - - Actions Act Window view - - - - - - - - Actions Act Window view - - - - - - - - - - Actions Wizard - - - - - - - - Actions Wizard - - - - - - - - - - Actions URL - - - - - - - - Actions URL - - - - - - - - - - Groups - - - - - - - - Groups - - - - - - - - - - Roles - - - - - - - - Roles - - - - - - - - - - Lang - - - - - - - - Lang - - - - - - - - - - Country - - - - - - - - Country - - - - - - - - - - Country State - - - - - - - - Country State - - - - - - - - - - Currency - - - - - - - - Currency - - - - - - - - - - Currency Rate - - - - - - - - Currency Rate - - - - - - - - - - Company - - - - - - - - Company - - - - - - - - - - Users - - - - - - - - Users - - - - - - - - - - Cron - - - - - - - - Cron - - - - - - - - - - Model - - - - - - - - Model - - - - - - - - - - Model Fields - - - - - - - - Model Fields - - - - - - - - - - Model Access - - - - - - - - Model Access - - - - - - - - - - Model Data - - - - - - - - Model Data - - - - - - - - - - Report Custom - - - - - - - - Report Custom - - - - - - - - - - Report Custom Fields - - - - - - - - Report Custom Fields - - - - - - - - - - Rule group - - - - - - - - Rule group - - - - - - - - - - Rule - - - - - - - - Rule - - - - - - - - - - Sequence Type - - - - - - - - Sequence Type - - - - - - - - - - Sequence - - - - - - - - Sequence - - - - - - - - - - View - - - - - - - - View - - - - - - - - - - Workflow - - - - - - - - Workflow - - - - - - - - - - Workflow Activity - - - - - - - - Workflow Activity - - - - - - - - - - Workflow Transition - - - - - - - - Workflow Transition - - - - - - - - - - Module Repository - - - - - - - - Module Repository - - - - - - - - - - Module Category - - - - - - - - Module Category - - - - - - - - - - Module - - - - - - - - Module - - - - - - - - - - Module Dependency - - - - - - - - Module Dependency - - - - - - - - - - Internal Request - - - - - - - - \ No newline at end of file + + + + + + + Administrator / Configuration + + + + Administrator / Access Rights + + + + Employee + + + + Account Manager + + + + Useability / Extended View + + + + Useability / No One + + + + + Administrator + + + + + + + + + + + ir.actions.actions Employee + + + + + + + + + + ir.actions.act_window Employee + + + + + + + + + + ir.actions.act_window_close System + + + + + + + + + + ir.actions.act_window_close System + + + + + + + + + + ir.actions.act_window_close System + + + + + + + + + + workflow group_system + + + + + + + + + + workflow_activity group_system + + + + + + + + + + workflow_instance group_system + + + + + + + + + + workflow_transition group_system + + + + + + + + + + workflow_triggers group_system + + + + + + + + + + workflow_workitem group_system + + + + + + + + + + + diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index fbc24121f9c..0cff3091f62 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -1,31 +1,12 @@ - + - - Languages - res.lang - form - -
- - - - - - -
- - Languages - ir.actions.act_window - res.lang - form - - + @@ -49,8 +49,8 @@ {'read':'default'} - - + + @@ -97,7 +97,8 @@ {'active_test': False} - + + @@ -112,7 +113,7 @@ - + Sequence Types ir.actions.act_window @@ -157,7 +158,8 @@ form - + + ir.actions.report.custom @@ -209,6 +211,7 @@ + @@ -222,6 +225,8 @@ + + @@ -608,8 +613,8 @@ + + --> @@ -634,21 +639,32 @@
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -657,7 +673,19 @@