From e76c45479421e618519bf7f178b263c3bae3d9d5 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 01:23:10 +0100 Subject: [PATCH 01/92] [FIX] Don't use the hostname if it is in ('127.0.0.1', 'localhost') lp bug: https://launchpad.net/bugs/319190 fixed bzr revid: stephane@tinyerp.com-20090129002310-75wuum4qpx5s8ac4 --- bin/service/web_services.py | 8 +++----- bin/sql_db.py | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 44c853a6d4b..07ac740d9ae 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -173,7 +173,7 @@ class db(netsvc.Service): cmd = ['pg_dump', '--format=c'] if tools.config['db_user']: cmd.append('--username=' + tools.config['db_user']) - if tools.config['db_host']: + if tools.config['db_host'] and tools.config['db_host'] not in ('127.0.0.1', 'localhost'): cmd.append('--host=' + tools.config['db_host']) if tools.config['db_port']: cmd.append('--port=' + tools.config['db_port']) @@ -184,11 +184,9 @@ class db(netsvc.Service): data = stdout.read() res = stdout.close() if res: - logger.notifyChannel("web-services", netsvc.LOG_ERROR, - 'DUMP DB: %s failed\n%s' % (db_name, data)) + logger.notifyChannel("web-services", netsvc.LOG_ERROR, 'DUMP DB: %s failed\n%s' % (db_name, data)) raise Exception, "Couldn't dump database" - logger.notifyChannel("web-services", netsvc.LOG_INFO, - 'DUMP DB: %s' % (db_name)) + logger.notifyChannel("web-services", netsvc.LOG_INFO, 'DUMP DB: %s' % (db_name)) return base64.encodestring(data) def restore(self, password, db_name, data): diff --git a/bin/sql_db.py b/bin/sql_db.py index b0212ac1ea4..acc4bb39ec5 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -204,6 +204,8 @@ class PoolManager(object): cls._dsn = '' for p in ('host', 'port', 'user', 'password'): cfg = tools.config['db_' + p] + if p == 'host' and cfg in ('127.0.0.1', 'localhost'): + continue if cfg: cls._dsn += '%s=%s ' % (p, cfg) return '%s dbname=%s' % (cls._dsn, db_name) From 30bdf4c470174e30e1a6a3cf34dedee85a386c68 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 01:42:50 +0100 Subject: [PATCH 02/92] [FIX] Compile the migrate script in doc/migrate lp bug: https://launchpad.net/bugs/311981 fixed bzr revid: stephane@tinyerp.com-20090129004250-ca0akzfsdxlc4jd7 --- rpminstall_sh.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/rpminstall_sh.txt b/rpminstall_sh.txt index c184585e94f..5694f250b5d 100644 --- a/rpminstall_sh.txt +++ b/rpminstall_sh.txt @@ -7,6 +7,7 @@ # Need to overwrite the install-part of the RPM to append the # compression-suffix onto the filenames for the man-pages. # +python -O -c "import compileall, os; compileall.compile_dir(os.path.join(os.environ['PWD'], 'doc'), force=True)" python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES SUFFIX=gz From 7e5cd9dd4af70c74c636637f3a2f26724c08f3dd Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 29 Jan 2009 11:45:55 +0530 Subject: [PATCH 03/92] Minor modifs bzr revid: jvo@tinyerp.com-20090129061555-2tlpj9vzdkp9mqyd --- bin/osv/orm.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 5b85ba9d49e..5f74204aa62 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1381,7 +1381,6 @@ class orm(orm_template): for id in childs: pos2 = browse_rec(id[0], pos2) cr.execute('update '+self._table+' set parent_left=%s, parent_right=%s where id=%s', (pos,pos2,root)) - print 'Update', self._table, pos,pos2,root return pos2+1 query = 'SELECT id FROM '+self._table+' WHERE '+self._parent_name+' IS NULL' if self._parent_order: @@ -2303,7 +2302,6 @@ class orm(orm_template): parent_left<%s OR parent_right>%s; ''', (leftbound,rightbound,cwidth,cleft,cright,treeshift,leftbound,rightbound, cwidth,cleft,cright,treeshift,leftrange,rightrange)) - print 'Write Update' result = self._store_get_values(cr, user, ids, vals.keys(), context) for order, object, ids, fields in result: From 04ad5bba0457fc8c35a47eabb1c21165e249fa29 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 29 Jan 2009 14:46:01 +0530 Subject: [PATCH 04/92] Bugfixed translation of selection field in wizard bzr revid: jvo@tinyerp.com-20090129091601-2jwj1g5k7vi78kgp --- bin/wizard/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/wizard/__init__.py b/bin/wizard/__init__.py index 722fc686121..3a576c9caa4 100644 --- a/bin/wizard/__init__.py +++ b/bin/wizard/__init__.py @@ -111,10 +111,10 @@ class interface(netsvc.Service): fields[val] = copy.copy(fields[val]) fields[val]['selection'] = fields[val]['selection'](self, cr, uid, context) elif lang: - res_name = "%s,%s,%s" % (self.wiz_name, state, field) + res_name = "%s,%s,%s" % (self.wiz_name, state, val) trans = lambda x: translate(cr, res_name, 'selection', lang, x) or x for idx, (key, val2) in enumerate(fields[val]['selection']): - fields[field]['selection'][idx] = (key, trans(val2)) + fields[val]['selection'][idx] = (key, trans(val2)) if lang: # translate fields From f3bd6582fcbf3dc04202820b05d2a5d2a6197044 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 29 Jan 2009 10:59:37 +0100 Subject: [PATCH 05/92] [IMP] the module graph is updated and loaded until there are modules to load. [IMP] log the extra database columns only when all modules are loaded bzr revid: christophe@tinyerp.com-20090129095937-izrx5s4qac1dmapj --- bin/addons/__init__.py | 74 +++++++++++++++++++++++++----------------- bin/osv/orm.py | 46 ++++++++++++++++---------- 2 files changed, 73 insertions(+), 47 deletions(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 03553c95f54..8d630b267b1 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -274,11 +274,13 @@ def get_modules(): def create_graph(module_list, force=None): - if not force: - force = [] graph = Graph() - packages = [] + return upgrade_graph(graph, module_list, force) +def upgrade_graph(graph, module_list, force=None): + if force is None: + force = [] + packages = [] for module in module_list: try: mod_path = get_module_path(module) @@ -556,7 +558,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): migrations = MigrationManager(cr, graph) - check_rules = False + has_updates = False modobj = None for package in graph: @@ -579,7 +581,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): idref = {} status['progress'] = (float(statusi)+0.4) / len(graph) if hasattr(package, 'init') or hasattr(package, 'update') or package.state in ('to install', 'to upgrade'): - check_rules = True + has_updates = True init_module_objects(cr, m, modules) for kind in ('init', 'update'): for filename in package.data.get('%s_xml' % kind, []): @@ -614,6 +616,8 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): cr.execute('update ir_module_module set demo=%s where id=%s', (True, mid)) package_todo.append(package.name) + migrations.migrate_module(package, 'post') + if modobj: ver = release.major_version + '.' + package.data.get('version', '1.0') # Set new modules and dependencies @@ -622,24 +626,24 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): # Update translations for all installed languages modobj.update_translations(cr, 1, [mid], None) cr.commit() + + package.state = 'installed' + for kind in ('init', 'demo', 'update'): + if hasattr(package, kind): + delattr(package, kind) - migrations.migrate_module(package, 'post') statusi += 1 - if perform_checks and check_rules: - 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, 'object %s (%s) has no access rules!' % (model, name)) - - + cr.execute('select model from ir_model where state=%s', ('manual',)) for model in cr.dictfetchall(): pool.get('ir.model').instanciate(cr, 1, model['model'], {}) pool.get('ir.model.data')._process_end(cr, 1, package_todo) cr.commit() - + + return has_updates def load_modules(db, force_demo=False, status=None, update_module=False): if not status: @@ -652,9 +656,11 @@ def load_modules(db, force_demo=False, status=None, update_module=False): pool = pooler.get_pool(cr.dbname) try: report = tools.assertion_report() + STATES_TO_LOAD = ['installed', 'to upgrade'] + graph = create_graph(['base'], force) + has_updates = False if update_module: - basegraph = create_graph(['base'], force) - load_module_graph(cr, basegraph, status, perform_checks=False, report=report) + has_updates = load_module_graph(cr, graph, status, perform_checks=False, report=report) modobj = pool.get('ir.module.module') logger.notifyChannel('init', netsvc.LOG_INFO, 'updating modules list') @@ -673,20 +679,31 @@ def load_modules(db, force_demo=False, status=None, update_module=False): modobj.button_upgrade(cr, 1, ids) cr.execute("update ir_module_module set state=%s where name=%s", ('installed', 'base')) - cr.execute("select name from ir_module_module where state in ('installed', 'to install', 'to upgrade')") - else: - cr.execute("select name from ir_module_module where state in ('installed', 'to upgrade')") - module_list = [name for (name,) in cr.fetchall()] - graph = create_graph(module_list, force) + + STATES_TO_LOAD += ['to install'] + + while True: + cr.execute("SELECT name from ir_module_module WHERE state in (%s)" % ','.join(['%s']*len(STATES_TO_LOAD)), STATES_TO_LOAD) - # the 'base' module has already been updated - base = graph['base'] - base.state = 'installed' - for kind in ('init', 'demo', 'update'): - if hasattr(base, kind): - delattr(base, kind) + module_list = [name for (name,) in cr.fetchall() if name not in graph] + if not module_list: + break + + upgrade_graph(graph, module_list, force) + r = load_module_graph(cr, graph, status, report=report) + has_updates = has_updates or r - load_module_graph(cr, graph, status, report=report) + if has_updates: + 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, 'object %s (%s) has no access rules!' % (model, name)) + + cr.execute("SELECT model from ir_model") + for (model,) in cr.fetchall(): + obj = pool.get(model) + if obj: + obj._check_removed_columns(cr, log=True) + if report.get_report(): logger.notifyChannel('init', netsvc.LOG_INFO, report) @@ -697,7 +714,6 @@ def load_modules(db, force_demo=False, status=None, update_module=False): if update_module: cr.execute("select id,name from ir_module_module where state=%s", ('to remove',)) for mod_id, mod_name in cr.fetchall(): - pool = pooler.get_pool(cr.dbname) cr.execute('select model,res_id from ir_model_data where noupdate=%s and module=%s order by id desc', (False, mod_name,)) for rmod, rid in cr.fetchall(): uid = 1 @@ -722,7 +738,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): else: logger.notifyChannel('init', netsvc.LOG_INFO, 'removed %d unused menus' % (cr.rowcount,)) - cr.execute("update ir_module_module set state=%s where state in ('to remove')", ('uninstalled', )) + cr.execute("update ir_module_module set state=%s where state=%s", ('uninstalled', 'to remove',)) cr.commit() finally: cr.close() diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 5f74204aa62..737fc40c194 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1176,6 +1176,8 @@ class orm_template(object): self.pool.get(table).write_string(cr, uid, id, langs, vals, context) return True + def _check_removed_columns(self, cr, log=False): + raise NotImplementedError() class orm_memory(orm_template): _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'] @@ -1359,6 +1361,10 @@ class orm_memory(orm_template): 'id': id }) return result + + def _check_removed_columns(self, cr, log=False): + # nothing to check in memory... + pass class orm(orm_template): _sql_constraints = [] @@ -1411,6 +1417,26 @@ class orm(orm_template): if (val<>False) or (type(val)<>bool): cr.execute(update_query, (ss[1](val), key)) + def _check_removed_columns(self, cr, log=False): + logger = netsvc.Logger() + # iterate on the database columns to drop the NOT NULL constraints + # of fields which were required but have been removed (or will be added by another module) + columns = [c for c in self._columns if not (isinstance(self._columns[c], fields.function) and not self._columns[c].store)] + columns += ('id', 'write_uid', 'write_date', 'create_uid', 'create_date') # openerp access columns + cr.execute("SELECT a.attname, a.attnotnull" + " FROM pg_class c, pg_attribute a" + " WHERE c.relname=%%s" + " AND c.oid=a.attrelid" + " AND a.attisdropped=%%s" + " AND pg_catalog.format_type(a.atttypid, a.atttypmod) NOT IN ('cid', 'tid', 'oid', 'xid')" + " AND a.attname NOT IN (%s)" % ",".join(['%s']*len(columns)), + [self._table, False] + columns) + for column in cr.dictfetchall(): + if log: + logger.notifyChannel("orm", netsvc.LOG_DEBUG, "column %s is in the table %s but not in the corresponding object %s" % (column['attname'], self._table, self._name)) + if column['attnotnull']: + cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" DROP NOT NULL' % (self._table, column['attname'])) + def _auto_init(self, cr, context={}): store_compute = False logger = netsvc.Logger() @@ -1456,24 +1482,8 @@ class orm(orm_template): if not cr.rowcount: cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, logs[k])) cr.commit() - - # iterate on the database columns to drop the NOT NULL constraints - # of fields which were required but have been removed - columns = [c for c in self._columns if not (isinstance(self._columns[c], fields.function) and not self._columns[c].store)] - columns += ('id', 'write_uid', 'write_date', 'create_uid', 'create_date') # openerp access columns - cr.execute("SELECT a.attname, a.attnotnull" - " FROM pg_class c, pg_attribute a" - " WHERE c.relname=%%s" - " AND c.oid=a.attrelid" - " AND a.attisdropped=%%s" - " AND pg_catalog.format_type(a.atttypid, a.atttypmod) NOT IN ('cid', 'tid', 'oid', 'xid')" - " AND a.attname NOT IN (%s)" % ",".join(['%s']*len(columns)), - [self._table, False] + columns) - for column in cr.dictfetchall(): - # TODO display this information only when all modules are loaded - logger.notifyChannel("orm", netsvc.LOG_DEBUG, "column %s is in the table %s but not in the corresponding object %s" % (column['attname'], self._table, self._name)) - if column['attnotnull']: - cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" DROP NOT NULL' % (self._table, column['attname'])) + + self._check_removed_columns(cr, log=False) # iterate on the "object columns" todo_update_store = [] From 90dea2816613b7ce40c21eddb90e94e8cee73e97 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 14:39:46 +0100 Subject: [PATCH 06/92] [REV] Revert code for the hostname and the dump bzr revid: stephane@tinyerp.com-20090129133946-l05fi1j8rou9tqyn --- bin/service/web_services.py | 8 +++++--- bin/sql_db.py | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 07ac740d9ae..44c853a6d4b 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -173,7 +173,7 @@ class db(netsvc.Service): cmd = ['pg_dump', '--format=c'] if tools.config['db_user']: cmd.append('--username=' + tools.config['db_user']) - if tools.config['db_host'] and tools.config['db_host'] not in ('127.0.0.1', 'localhost'): + if tools.config['db_host']: cmd.append('--host=' + tools.config['db_host']) if tools.config['db_port']: cmd.append('--port=' + tools.config['db_port']) @@ -184,9 +184,11 @@ class db(netsvc.Service): data = stdout.read() res = stdout.close() if res: - logger.notifyChannel("web-services", netsvc.LOG_ERROR, 'DUMP DB: %s failed\n%s' % (db_name, data)) + logger.notifyChannel("web-services", netsvc.LOG_ERROR, + 'DUMP DB: %s failed\n%s' % (db_name, data)) raise Exception, "Couldn't dump database" - logger.notifyChannel("web-services", netsvc.LOG_INFO, 'DUMP DB: %s' % (db_name)) + logger.notifyChannel("web-services", netsvc.LOG_INFO, + 'DUMP DB: %s' % (db_name)) return base64.encodestring(data) def restore(self, password, db_name, data): diff --git a/bin/sql_db.py b/bin/sql_db.py index acc4bb39ec5..b0212ac1ea4 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -204,8 +204,6 @@ class PoolManager(object): cls._dsn = '' for p in ('host', 'port', 'user', 'password'): cfg = tools.config['db_' + p] - if p == 'host' and cfg in ('127.0.0.1', 'localhost'): - continue if cfg: cls._dsn += '%s=%s ' % (p, cfg) return '%s dbname=%s' % (cls._dsn, db_name) From 300c48d8599ae7b98c3d48dcaf36f84048fecc1a Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 15:21:45 +0100 Subject: [PATCH 07/92] [IMP] Use a real exception instead of a simple assert bzr revid: stephane@tinyerp.com-20090129142145-03gkycw9xu82y83d --- bin/tools/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index c3a7bacd1ac..095d6c8ae8e 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -247,7 +247,9 @@ class configmanager(object): self.options['pg_path'] = opt.pg_path if self.options.get('language', False): - assert len(self.options['language'])<=5, 'ERROR: The Lang name must take max 5 chars, Eg: -lfr_BE' + if len(self.options['language']) <= 5: + raise Exception('ERROR: The Lang name must take max 5 chars, Eg: -lfr_BE') + if opt.save: self.save() From 55ab099cb9475ffaf61578dedc910c6ca80cfb76 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 29 Jan 2009 16:52:16 +0100 Subject: [PATCH 08/92] bugfix bzr revid: fp@tinyerp.com-20090129155216-coo7xd69aszefhjz --- addons/account/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/account.py b/addons/account/account.py index 938ea74d6ae..cd094e2576d 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -935,6 +935,8 @@ class account_move(osv.osv): # Validate a balanced move. If it is a centralised journal, create a move. # def validate(self, cr, uid, ids, context={}): + if '__last_update' in context: + del context['__last_update'] ok = True for move in self.browse(cr, uid, ids, context): #unlink analytic lines on move_lines From f31ce5813ba28150d2f9affc72311626a4ff94b0 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 17:10:22 +0100 Subject: [PATCH 09/92] [FIX] Remove the select for update and use a lock table lp bug: https://launchpad.net/bugs/314449 fixed bzr revid: stephane@tinyerp.com-20090129161022-6zr4k03d7qil2342 --- bin/addons/base/ir/ir_sequence.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/addons/base/ir/ir_sequence.py b/bin/addons/base/ir/ir_sequence.py index 31828569d6c..202aac754d2 100644 --- a/bin/addons/base/ir/ir_sequence.py +++ b/bin/addons/base/ir/ir_sequence.py @@ -70,14 +70,18 @@ class ir_sequence(osv.osv): } def get_id(self, cr, uid, sequence_id, test='id=%s', context={}): - cr.execute('select id,number_next,number_increment,prefix,suffix,padding from ir_sequence where '+test+' and active=True FOR UPDATE', (sequence_id,)) - res = cr.dictfetchone() - if res: - cr.execute('update ir_sequence set number_next=number_next+number_increment where id=%s and active=True', (res['id'],)) - if res['number_next']: - return self._process(res['prefix']) + '%%0%sd' % res['padding'] % res['number_next'] + self._process(res['suffix']) - else: - return self._process(res['prefix']) + self._process(res['suffix']) + try: + cr.execute('lock table ir_sequence') + cr.execute('select id,number_next,number_increment,prefix,suffix,padding from ir_sequence where '+test+' and active=True', (sequence_id,)) + res = cr.dictfetchone() + if res: + cr.execute('update ir_sequence set number_next=number_next+number_increment where id=%s and active=True', (res['id'],)) + if res['number_next']: + return self._process(res['prefix']) + '%%0%sd' % res['padding'] % res['number_next'] + self._process(res['suffix']) + else: + return self._process(res['prefix']) + self._process(res['suffix']) + finally: + cr.commit() return False def get(self, cr, uid, code): From dba3cbd053d02bed000d829444682dc79563d008 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 17:52:06 +0100 Subject: [PATCH 10/92] [FIX] Generate the pgpass file for the pg_dump and pg_restore lp bug: https://launchpad.net/bugs/319190 fixed bzr revid: stephane@tinyerp.com-20090129165206-eqqsjk43p8a70dje --- bin/tools/config.py | 66 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index 095d6c8ae8e..27bdf61bdcf 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -180,9 +180,19 @@ class configmanager(object): (opt, args) = parser.parse_args() - assert not (bool(opt.syslog) and bool(opt.logfile)), "the syslog and logfile options are exclusive" - assert not (opt.translate_in and (not opt.language or not opt.db_name)), "the i18n-import option cannot be used without the language (-l) and the database (-d) options" - assert not (opt.translate_out and (not opt.db_name)), "the i18n-export option cannot be used without the database (-d) option" + def die(cond, msg): + if cond: + print msg + sys.exit(1) + + die(bool(opt.syslog) and bool(opt.logfile), + "the syslog and logfile options are exclusive") + + die(opt.translate_in and (not opt.language or not opt.db_name), + "the i18n-import option cannot be used without the language (-l) and the database (-d) options") + + die(opt.translate_out and (not opt.db_name), + "the i18n-export option cannot be used without the database (-d) option") # place/search the config file on Win32 near the server installation # (../etc from the server) @@ -250,9 +260,59 @@ class configmanager(object): if len(self.options['language']) <= 5: raise Exception('ERROR: The Lang name must take max 5 chars, Eg: -lfr_BE') + if not self.options['db_user']: + try: + import getpass + self.options['db_user'] = getpass.getuser() + except: + self.options['db_user'] = None + + die(not self.options['db_user'], 'ERROR: No user specified for the connection to the database') + + if self.options['db_password']: + if sys.platform == 'win32' and not self.options['db_host']: + self.options['db_host'] = 'localhost' + if self.options['db_host']: + self._generate_pgpassfile() + if opt.save: self.save() + def _generate_pgpassfile(self): + """ + Generate the pgpass file with the parameters from the command line (db_host, db_user, + db_password) + + Used because pg_dump and pg_restore can not accept the password on the command line. + """ + is_win32 = sys.platform == 'win32' + if is_win32: + filename = os.path.join(os.environ['APPDATA'], 'pgpass.conf') + else: + filename = os.path.join(os.environ['HOME'], '.pgpass') + + text_to_add = "%(db_host)s:*:*:%(db_user)s:%(db_password)s" % self.options + + if os.path.exists(filename): + content = [x.strip() for x in file(filename, 'r').readlines()] + if text_to_add in content: + return + + fp = file(filename, 'a+') + fp.write(text_to_add + "\n") + fp.close() + + if is_win32: + import _winreg + x=_winreg.ConnectRegistry(None,_winreg.HKEY_LOCAL_MACHINE) + y = _winreg.OpenKey(x, r"SYSTEM\CurrentControlSet\Control\Session Manager\Environment", 0,_winreg.KEY_ALL_ACCESS) + _winreg.SetValueEx(y,"PGPASSFILE", 0, _winreg.REG_EXPAND_SZ, filename ) + _winreg.CloseKey(y) + _winreg.CloseKey(x) + else: + import stat + os.chmod(filename, stat.S_IRUSR + stat.S_IWUSR) + def _check_addons_path(self, option, opt, value, parser): res = os.path.abspath(os.path.expanduser(value)) if not os.path.exists(res): From 60ea76e4c5b620b53177fa4404b9c3bd90ce2b9c Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 23:22:23 +0100 Subject: [PATCH 11/92] [IMP] Integrate the headers from the old custom module bzr revid: stephane@tinyerp.com-20090129222223-ac7pa5yrq1xohbu4 --- bin/addons/base/report/corporate_defaults.xml | 23 ++ .../base/report/corporate_odt_header.xml | 248 ++++++++++++++++++ .../base/report/corporate_sxw_header.xml | 246 +++++++++++++++++ bin/addons/base/report/custom_report.xml | 6 + bin/addons/base/report/custom_view.xml | 5 + bin/addons/base/res/res_company.py | 3 +- bin/report/interface.py | 5 +- bin/report/report_sxw.py | 6 +- 8 files changed, 535 insertions(+), 7 deletions(-) create mode 100644 bin/addons/base/report/corporate_defaults.xml create mode 100644 bin/addons/base/report/corporate_odt_header.xml create mode 100644 bin/addons/base/report/corporate_sxw_header.xml create mode 100644 bin/addons/base/report/custom_report.xml create mode 100644 bin/addons/base/report/custom_view.xml diff --git a/bin/addons/base/report/corporate_defaults.xml b/bin/addons/base/report/corporate_defaults.xml new file mode 100644 index 00000000000..cef5acdd020 --- /dev/null +++ b/bin/addons/base/report/corporate_defaults.xml @@ -0,0 +1,23 @@ + + + + + + + + <name type="field" name="partner_id.name"/> + <address type="zoom" name="partner_id.address"> + <street type="field" name="street"/> + <zip type="field" name="zip"/> + <city type="field" name="city"/> + <state type="field" name="state_id.name"/> + <country type="field" name="country_id.name"/> + <phone type="field" name="phone"/> + <email type="field" name="email"/> + </address> + </corporation> + <user> + <name type="field" name="name"/> + <signature type="field" name="signature"/> + </user> +</corporate-header> diff --git a/bin/addons/base/report/corporate_odt_header.xml b/bin/addons/base/report/corporate_odt_header.xml new file mode 100644 index 00000000000..b27eeda8ccb --- /dev/null +++ b/bin/addons/base/report/corporate_odt_header.xml @@ -0,0 +1,248 @@ +<?xml version="1.0" encoding="UTF-8"?> +<office:document-styles xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" office:version="1.1"> + <office:font-face-decls> + <style:font-face style:name="Helvetica" svg:font-family="Helvetica"/> + <style:font-face style:name="Times" svg:font-family="Times"/> + <style:font-face style:name="Helvetica1" svg:font-family="Helvetica" style:font-family-generic="swiss"/> + <style:font-face style:name="Monospace" svg:font-family="Monospace" style:font-pitch="fixed"/> + <style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/> + </office:font-face-decls> + <office:styles> + <style:default-style style:family="graphic"> + <style:graphic-properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="true"/> + <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false"> + <style:tab-stops/> + </style:paragraph-properties> + <style:text-properties style:use-window-font-color="true" fo:font-size="12pt" fo:language="en" fo:country="IN" style:letter-kerning="true" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/> + </style:default-style> + <style:default-style style:family="paragraph"> + <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/> + <style:text-properties style:use-window-font-color="true" style:font-name="Times" fo:font-size="12pt" fo:language="en" fo:country="IN" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="DejaVu Sans" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/> + </style:default-style> + <style:default-style style:family="table"> + <style:table-properties table:border-model="collapsing"/> + </style:default-style> + <style:default-style style:family="table-row"> + <style:table-row-properties fo:keep-together="always"/> + </style:default-style> + <style:style style:name="Standard" style:family="paragraph" style:class="text"/> + <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"> + <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/> + </style:style> + <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text"> + <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always"/> + <style:text-properties style:font-name="Helvetica" fo:font-size="14pt" style:font-name-asian="DejaVu Sans" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-size-complex="14pt"/> + </style:style> + <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list"> + <style:text-properties style:font-name="Times" style:font-size-asian="12pt"/> + </style:style> + <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:paragraph-properties text:number-lines="false" text:line-number="0"> + <style:tab-stops> + <style:tab-stop style:position="8.498cm" style:type="center"/> + <style:tab-stop style:position="16.999cm" style:type="right"/> + </style:tab-stops> + </style:paragraph-properties> + <style:text-properties fo:color="#0000ff" style:font-size-asian="10.5pt"/> + </style:style> + <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:paragraph-properties text:number-lines="false" text:line-number="0"> + <style:tab-stops> + <style:tab-stop style:position="8.498cm" style:type="center"/> + <style:tab-stop style:position="16.999cm" style:type="right"/> + </style:tab-stops> + </style:paragraph-properties> + </style:style> + <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:paragraph-properties text:number-lines="false" text:line-number="0"/> + </style:style> + <style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra"> + <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" text:number-lines="false" text:line-number="0"/> + <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" text:number-lines="false" text:line-number="0"/> + <style:text-properties style:font-name="Times" fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/> + </style:style> + <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"> + <style:paragraph-properties text:number-lines="false" text:line-number="0"/> + <style:text-properties style:font-name="Times" style:font-size-asian="12pt"/> + </style:style> + <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/> + <style:style style:name="Endnote_20_Symbol" style:display-name="Endnote Symbol" style:family="text"/> + <style:style style:name="Graphics" style:family="graphic"> + <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/> + </style:style> + <text:outline-style> + <text:outline-level-style text:level="1" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="2" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="3" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="4" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="5" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="6" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="7" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="8" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="9" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="10" style:num-format=""> + <style:list-level-properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + </text:outline-style> + <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/> + <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/> + <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/> + </office:styles> + <office:automatic-styles> + <style:style style:name="Table2" style:family="table"> + <style:table-properties style:width="16.999cm" table:align="margins"/> + </style:style> + <style:style style:name="Table2.A" style:family="table-column"> + <style:table-column-properties style:column-width="4.235cm" style:rel-column-width="16329*"/> + </style:style> + <style:style style:name="Table2.B" style:family="table-column"> + <style:table-column-properties style:column-width="12.764cm" style:rel-column-width="49206*"/> + </style:style> + <style:style style:name="Table2.A1" style:family="table-cell"> + <style:table-cell-properties style:vertical-align="bottom" fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.018cm solid #000000"/> + </style:style> + <style:style style:name="Table3" style:family="table"> + <style:table-properties style:width="7.936cm" table:align="left"/> + </style:style> + <style:style style:name="Table3.A" style:family="table-column"> + <style:table-column-properties style:column-width="1.933cm"/> + </style:style> + <style:style style:name="Table3.B" style:family="table-column"> + <style:table-column-properties style:column-width="6.003cm"/> + </style:style> + <style:style style:name="Table3.A1" style:family="table-cell"> + <style:table-cell-properties style:vertical-align="bottom" fo:padding="0.097cm" fo:border="none"/> + </style:style> + <style:style style:name="Table3.A2" style:family="table-cell"> + <style:table-cell-properties style:vertical-align="bottom" fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.018cm solid #000000"/> + </style:style> + <style:style style:name="Table1" style:family="table"> + <style:table-properties style:width="16.999cm" table:align="margins"/> + </style:style> + <style:style style:name="Table1.A" style:family="table-column"> + <style:table-column-properties style:column-width="16.999cm" style:rel-column-width="65535*"/> + </style:style> + <style:style style:name="Table1.A1" style:family="table-cell"> + <style:table-cell-properties fo:background-color="transparent" fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.018cm solid #000000" fo:border-bottom="none"> + <style:background-image/> + </style:table-cell-properties> + </style:style> + <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header"> + <style:text-properties fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="30pt" style:font-name-asian="Monospace" style:font-size-asian="30pt" style:font-name-complex="Monospace" style:font-size-complex="30pt"/> + </style:style> + <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table_20_Contents"> + <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/> + <style:text-properties fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header"> + <style:text-properties style:font-name="Monospace" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table_20_Contents"> + <style:text-properties fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="10pt" style:font-size-asian="8.75pt" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Table_20_Contents"> + <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/> + <style:text-properties fo:color="#0000ff" style:font-name="Monospace" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header"> + <style:text-properties style:font-name="Helvetica1" fo:font-size="10pt" style:font-size-asian="8.75pt" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P7" style:family="paragraph" style:parent-style-name="Footer"> + <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/> + <style:text-properties fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:page-layout style:name="pm1"> + <style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> + <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/> + </style:page-layout-properties> + <style:header-style> + <style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm"/> + </style:header-style> + <style:footer-style> + <style:header-footer-properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm"/> + </style:footer-style> + </style:page-layout> + <style:page-layout style:name="pm2"> + <style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> + <style:footnote-sep style:adjustment="left" style:rel-width="25%" style:color="#000000"/> + </style:page-layout-properties> + <style:header-style/> + <style:footer-style/> + </style:page-layout> + </office:automatic-styles> + <office:master-styles> + <style:master-page style:name="Standard" style:page-layout-name="pm1"> + <style:header> + <table:table table:name="Table2" table:style-name="Table2"> + <table:table-column table:style-name="Table2.A"/> + <table:table-column table:style-name="Table2.B"/> + <table:table-row> + <table:table-cell table:style-name="Table2.A1" office:value-type="string"> + <text:p text:style-name="P1">Tiny sprl</text:p> + </table:table-cell> + <table:table-cell table:style-name="Table2.A1" office:value-type="string"> + <text:p text:style-name="P2"/> + </table:table-cell> + </table:table-row> + </table:table> + <text:p text:style-name="P3"/> + <text:p text:style-name="P3">- </text:p> + <table:table table:name="Table3" table:style-name="Table3"> + <table:table-column table:style-name="Table3.A"/> + <table:table-column table:style-name="Table3.B"/> + <table:table-row> + <table:table-cell table:style-name="Table3.A1" office:value-type="string"> + <text:p text:style-name="P4">Phone :</text:p> + </table:table-cell> + <table:table-cell table:style-name="Table3.A1" office:value-type="string"> + <text:p text:style-name="P5"/> + </table:table-cell> + </table:table-row> + <table:table-row> + <table:table-cell table:style-name="Table3.A2" office:value-type="string"> + <text:p text:style-name="P4">Mail :</text:p> + </table:table-cell> + <table:table-cell table:style-name="Table3.A2" office:value-type="string"> + <text:p text:style-name="P5"/> + </table:table-cell> + </table:table-row> + </table:table> + <text:p text:style-name="P6"/> + </style:header> + <style:footer> + <table:table table:name="Table1" table:style-name="Table1"> + <table:table-column table:style-name="Table1.A"/> + <table:table-row> + <table:table-cell table:style-name="Table1.A1" office:value-type="string"> + <text:p text:style-name="P7"/> + <text:p text:style-name="P7"/> + <text:p text:style-name="P7">Contact : Administrator</text:p> + </table:table-cell> + </table:table-row> + </table:table> + </style:footer> + </style:master-page> + <style:master-page style:name="Endnote" style:page-layout-name="pm2"/> + </office:master-styles> +</office:document-styles> \ No newline at end of file diff --git a/bin/addons/base/report/corporate_sxw_header.xml b/bin/addons/base/report/corporate_sxw_header.xml new file mode 100644 index 00000000000..2f6f885f3ba --- /dev/null +++ b/bin/addons/base/report/corporate_sxw_header.xml @@ -0,0 +1,246 @@ +<?xml version="1.0" encoding="UTF-8"?> +<office:document-styles xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" office:version="1.0"> + <office:font-decls> + <style:font-decl style:name="Helvetica" fo:font-family="Helvetica"/> + <style:font-decl style:name="Times" fo:font-family="Times"/> + <style:font-decl style:name="Helvetica1" fo:font-family="Helvetica" style:font-family-generic="swiss"/> + <style:font-decl style:name="Monospace" fo:font-family="Monospace" style:font-pitch="fixed"/> + <style:font-decl style:name="DejaVu Sans" fo:font-family="'DejaVu Sans'" style:font-family-generic="system" style:font-pitch="variable"/> + </office:font-decls> + <office:styles> + <style:default-style style:family="graphics"> + <style:properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false" style:use-window-font-color="true" fo:font-size="12pt" fo:language="en" fo:country="IN" style:letter-kerning="true" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"> + <style:tab-stops/> + </style:properties> + </style:default-style> + <style:default-style style:family="paragraph"> + <style:properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page" style:use-window-font-color="true" style:font-name="Times" fo:font-size="12pt" fo:language="en" fo:country="IN" style:letter-kerning="true" style:font-name-asian="DejaVu Sans" style:font-size-asian="10.5pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="DejaVu Sans" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/> + </style:default-style> + <style:default-style style:family="table"> + <style:properties table:border-model="collapsing"/> + </style:default-style> + <style:default-style style:family="table-row"> + <style:properties fo:keep-together="always"/> + </style:default-style> + <style:style style:name="Standard" style:family="paragraph" style:class="text"/> + <style:style style:name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text"> + <style:properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/> + </style:style> + <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text body" style:class="text"> + <style:properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="true" style:font-name="Helvetica" fo:font-size="14pt" style:font-name-asian="DejaVu Sans" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-size-complex="14pt"/> + </style:style> + <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text body" style:class="list"> + <style:properties style:font-name="Times" style:font-size-asian="12pt"/> + </style:style> + <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:properties text:number-lines="false" text:line-number="0" fo:color="#0000ff" style:font-size-asian="10.5pt"> + <style:tab-stops> + <style:tab-stop style:position="8.498cm" style:type="center"/> + <style:tab-stop style:position="16.999cm" style:type="right"/> + </style:tab-stops> + </style:properties> + </style:style> + <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:properties text:number-lines="false" text:line-number="0"> + <style:tab-stops> + <style:tab-stop style:position="8.498cm" style:type="center"/> + <style:tab-stop style:position="16.999cm" style:type="right"/> + </style:tab-stops> + </style:properties> + </style:style> + <style:style style:name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:properties text:number-lines="false" text:line-number="0"/> + </style:style> + <style:style style:name="Table Heading" style:family="paragraph" style:parent-style-name="Table Contents" style:class="extra"> + <style:properties fo:text-align="center" style:justify-single-word="false" text:number-lines="false" text:line-number="0" fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/> + </style:style> + <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"> + <style:properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" text:number-lines="false" text:line-number="0" style:font-name="Times" fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-size-complex="12pt" style:font-style-complex="italic"/> + </style:style> + <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index"> + <style:properties text:number-lines="false" text:line-number="0" style:font-name="Times" style:font-size-asian="12pt"/> + </style:style> + <style:style style:name="Footnote Symbol" style:family="text"/> + <style:style style:name="Endnote Symbol" style:family="text"/> + <style:style style:name="Graphics" style:family="graphics"> + <style:properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/> + </style:style> + <text:outline-style> + <text:outline-level-style text:level="1" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="2" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="3" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="4" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="5" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="6" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="7" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="8" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="9" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + <text:outline-level-style text:level="10" style:num-format=""> + <style:properties text:min-label-distance="0.381cm"/> + </text:outline-level-style> + </text:outline-style> + <text:footnotes-configuration text:citation-style-name="Footnote Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/> + <text:endnotes-configuration text:citation-style-name="Endnote Symbol" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/> + <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/> + </office:styles> + <office:automatic-styles> + <style:style style:name="Table2" style:family="table"> + <style:properties style:width="16.999cm" table:align="margins"/> + </style:style> + <style:style style:name="Table2.A" style:family="table-column"> + <style:properties style:column-width="4.235cm" style:rel-column-width="16329*"/> + </style:style> + <style:style style:name="Table2.B" style:family="table-column"> + <style:properties style:column-width="12.764cm" style:rel-column-width="49206*"/> + </style:style> + <style:style style:name="Table2.A1" style:family="table-cell"> + <style:properties fo:vertical-align="bottom" fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.018cm solid #000000"/> + </style:style> + <style:style style:name="Table3" style:family="table"> + <style:properties style:width="7.936cm" table:align="left"/> + </style:style> + <style:style style:name="Table3.A" style:family="table-column"> + <style:properties style:column-width="1.933cm"/> + </style:style> + <style:style style:name="Table3.B" style:family="table-column"> + <style:properties style:column-width="6.003cm"/> + </style:style> + <style:style style:name="Table3.A1" style:family="table-cell"> + <style:properties fo:vertical-align="bottom" fo:padding="0.097cm" fo:border="none"/> + </style:style> + <style:style style:name="Table3.A2" style:family="table-cell"> + <style:properties fo:vertical-align="bottom" fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.018cm solid #000000"/> + </style:style> + <style:style style:name="Table1" style:family="table"> + <style:properties style:width="16.999cm" table:align="margins"/> + </style:style> + <style:style style:name="Table1.A" style:family="table-column"> + <style:properties style:column-width="16.999cm" style:rel-column-width="65535*"/> + </style:style> + <style:style style:name="Table1.A1" style:family="table-cell"> + <style:properties fo:background-color="transparent" fo:padding="0.097cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.018cm solid #000000" fo:border-bottom="none"> + <style:background-image/> + </style:properties> + </style:style> + <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Header"> + <style:properties fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="30pt" style:font-name-asian="Monospace" style:font-size-asian="30pt" style:font-name-complex="Monospace" style:font-size-complex="30pt"/> + </style:style> + <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Table Contents"> + <style:properties fo:text-align="end" style:justify-single-word="false" fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Header"> + <style:properties style:font-name="Monospace" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table Contents"> + <style:properties fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="10pt" style:font-size-asian="8.75pt" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Table Contents"> + <style:properties fo:text-align="end" style:justify-single-word="false" fo:color="#0000ff" style:font-name="Monospace" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Header"> + <style:properties style:font-name="Helvetica1" fo:font-size="10pt" style:font-size-asian="8.75pt" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P7" style:family="paragraph" style:parent-style-name="Footer"> + <style:properties fo:text-align="center" style:justify-single-word="false" fo:color="#0000ff" style:font-name="Helvetica1" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="P8" style:family="paragraph" style:parent-style-name="Footer"> + <style:properties fo:text-align="center" style:justify-single-word="false" style:font-name="Helvetica1" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/> + </style:style> + <style:style style:name="T1" style:family="text"> + <style:properties fo:color="#0000ff"/> + </style:style> + <style:style style:name="T2" style:family="text"> + <style:properties fo:color="#0000ff" fo:font-size="10pt" style:font-name-asian="Monospace" style:font-size-asian="10pt" style:font-name-complex="Monospace" style:font-size-complex="10pt"/> + </style:style> + <style:page-master style:name="pm1"> + <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> + <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:adjustment="left" style:rel-width="25%" style:color="#000000"/> + </style:properties> + <style:header-style> + <style:properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm"/> + </style:header-style> + <style:footer-style> + <style:properties fo:min-height="0cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm"/> + </style:footer-style> + </style:page-master> + <style:page-master style:name="pm2"> + <style:properties fo:page-width="20.999cm" fo:page-height="29.699cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm"> + <style:footnote-sep style:adjustment="left" style:rel-width="25%" style:color="#000000"/> + </style:properties> + <style:header-style/> + <style:footer-style/> + </style:page-master> + </office:automatic-styles> + <office:master-styles> + <style:master-page style:name="Standard" style:page-master-name="pm1"> + <style:header> + <table:table table:name="Table2" table:style-name="Table2"> + <table:table-column table:style-name="Table2.A"/> + <table:table-column table:style-name="Table2.B"/> + <table:table-row> + <table:table-cell table:style-name="Table2.A1" table:value-type="string"> + <text:p text:style-name="P1">[[ company.partner_id.name ]]</text:p> + </table:table-cell> + <table:table-cell table:style-name="Table2.A1" table:value-type="string"> + <text:p text:style-name="P2">[[ company.rml_header1 ]]</text:p> + </table:table-cell> + </table:table-row> + </table:table> + <text:p text:style-name="P3">[[ company.partner_id.address and company.partner_id.address[0].street ]]</text:p> + <text:p text:style-name="P3">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</text:p> + <table:table table:name="Table3" table:style-name="Table3"> + <table:table-column table:style-name="Table3.A"/> + <table:table-column table:style-name="Table3.B"/> + <table:table-row> + <table:table-cell table:style-name="Table3.A1" table:value-type="string"> + <text:p text:style-name="P4">Phone :</text:p> + </table:table-cell> + <table:table-cell table:style-name="Table3.A1" table:value-type="string"> + <text:p text:style-name="P5">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</text:p> + </table:table-cell> + </table:table-row> + <table:table-row> + <table:table-cell table:style-name="Table3.A2" table:value-type="string"> + <text:p text:style-name="P4">Mail :</text:p> + </table:table-cell> + <table:table-cell table:style-name="Table3.A2" table:value-type="string"> + <text:p text:style-name="P5">[[ company.partner_id.address and company.partner_id.address[0].email ]]</text:p> + </table:table-cell> + </table:table-row> + </table:table> + <text:p text:style-name="P6"/> + </style:header> + <style:footer> + <table:table table:name="Table1" table:style-name="Table1"> + <table:table-column table:style-name="Table1.A"/> + <table:table-row> + <table:table-cell table:style-name="Table1.A1" table:value-type="string"> + <text:p text:style-name="P7">[[ company.rml_footer1 ]]</text:p> + <text:p text:style-name="P7">[[ company.rml_footer2 ]]</text:p> + <text:p text:style-name="P7">Contact : [[ user.name ]]</text:p> + </table:table-cell> + </table:table-row> + </table:table> + </style:footer> + </style:master-page> + <style:master-page style:name="Endnote" style:page-master-name="pm2"/> + </office:master-styles> +</office:document-styles> diff --git a/bin/addons/base/report/custom_report.xml b/bin/addons/base/report/custom_report.xml new file mode 100644 index 00000000000..c7c4cedbb33 --- /dev/null +++ b/bin/addons/base/report/custom_report.xml @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<openerp> + <data> + + </data> +</openerp> diff --git a/bin/addons/base/report/custom_view.xml b/bin/addons/base/report/custom_view.xml new file mode 100644 index 00000000000..ebc084668b7 --- /dev/null +++ b/bin/addons/base/report/custom_view.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + </data> +</openerp> diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index 59bc0ab4ef5..2158035abb3 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -21,6 +21,7 @@ ############################################################################## from osv import fields,osv +import os import tools class res_company(osv.osv): @@ -122,7 +123,7 @@ class res_company(osv.osv): </header>""" def _get_header(self,cr,uid,ids): try : - return tools.file_open('custom/corporate_rml_header.rml').read() + return tools.file_open(os.path.join('base', 'report', 'corporate_rml_header.rml')).read() except: return """ <header> diff --git a/bin/report/interface.py b/bin/report/interface.py index e872cc77fd3..bb71f201a8d 100644 --- a/bin/report/interface.py +++ b/bin/report/interface.py @@ -20,7 +20,8 @@ # ############################################################################## -import os,re +import os +import re #Ged> Why do we use libxml2 here instead of xml.dom like in other places of the code? import libxml2 @@ -120,7 +121,7 @@ class report_rml(report_int): pos_xml = i.end() doc = print_xml.document(cr, uid, {}, {}) - tmpl_path = addons.get_module_resource('custom', 'corporate_defaults.xml') + tmpl_path = addons.get_module_resource('base', 'report', 'corporate_defaults.xml') doc.parse(tmpl_path, [uid], 'res.users', context) corporate_header = doc.xml_get() doc.close() diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index cec9e630c93..d34e0c1e2d0 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -715,10 +715,8 @@ class report_sxw(report_rml): if want_header: #Add corporate header/footer - 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() + if report_type in ('odt', 'sxw'): + rml = tools.file_open(os.path.join('base', 'report', 'corporate_%s_header.xml' % report_type)).read() rml_parser = self.parser(cr, uid, self.name2, context) rml_parser.parents = sxw_parents rml_parser.tag = sxw_tag From 5fb02b1607a866ea8ba1b9a0d324b26cbfecb9cf Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@taupe> Date: Fri, 30 Jan 2009 00:20:17 +0100 Subject: [PATCH 12/92] [FIX] avoid a crash when resetting the local with python 2.4 (lp:322432) [IMP] do not rewrite locale information every time [IMP] all message about translations are logger into the 'i18n' logger [FIX] the code and the name of the languages must be unique lp bug: https://launchpad.net/bugs/322432 fixed bzr revid: christophe@taupe-20090129232017-7lvamen2b3s1waxp --- bin/addons/base/module/module.py | 2 +- bin/addons/base/res/res_lang.py | 4 ++ bin/tools/translate.py | 96 +++++++++++++++----------------- 3 files changed, 50 insertions(+), 52 deletions(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 9eb5e46e575..8176565a871 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -469,7 +469,7 @@ class module(osv.osv): for lang in filter_lang: f = os.path.join(modpath, 'i18n', lang + '.po') if os.path.exists(f): - logger.notifyChannel("init", netsvc.LOG_INFO, 'module %s: loading translation file for language %s' % (mod.name, lang)) + logger.notifyChannel("i18n", netsvc.LOG_INFO, 'module %s: loading translation file for language %s' % (mod.name, lang)) tools.trans_load(cr.dbname, f, lang, verbose=False) diff --git a/bin/addons/base/res/res_lang.py b/bin/addons/base/res/res_lang.py index 6a8801b7b19..3aa67a6e033 100644 --- a/bin/addons/base/res/res_lang.py +++ b/bin/addons/base/res/res_lang.py @@ -55,6 +55,10 @@ class lang(osv.osv): 'decimal_point':lambda *a: '.', 'thousands_sep':lambda *a: ',', } + _sql_constraints = [ + ('name_uniq', 'unique (name)', 'The name of the language must be unique !'), + ('code_uniq', 'unique (code)', 'The code of the language must be unique !'), + ] def _group(self,cr,uid,ids,s, monetary=False): conv = localeconv() diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 2b77c29de26..0f84bdc9b45 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -447,7 +447,7 @@ def trans_generate(lang, modules, dbname=None): push_translation(module, report_type, name, 0, t) except IOError, xml.dom.expatbuilder.expat.ExpatError: if fname: - logger.notifyChannel("init", netsvc.LOG_ERROR, "couldn't export translation for report %s %s %s" % (name, report_type, fname)) + logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't export translation for report %s %s %s" % (name, report_type, fname)) for constraint in pool.get(model)._constraints: msg = constraint[1] @@ -506,14 +506,13 @@ def trans_load(db_name, filename, lang, strict=False, verbose=True): return r except IOError: if verbose: - logger.notifyChannel("init", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) + logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) return None def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name=None, verbose=True): logger = netsvc.Logger() if verbose: - logger.notifyChannel("init", netsvc.LOG_INFO, - 'loading translation file for language %s' % (lang)) + logger.notifyChannel("i18n", netsvc.LOG_INFO, 'loading translation file for language %s' % (lang)) pool = pooler.get_pool(db_name) lang_obj = pool.get('res.lang') trans_obj = pool.get('ir.translation') @@ -521,62 +520,57 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= try: uid = 1 cr = pooler.get_db(db_name).cursor() - ids = lang_obj.search(cr, uid, [('code','=',lang)]) - lc, encoding = locale.getdefaultlocale() - if not encoding: - encoding = 'UTF-8' - if encoding == 'utf': - encoding = 'UTF-8' - if encoding == 'cp1252': - encoding= '1252' - if encoding == 'iso-8859-1': - encoding= 'iso-8859-15' - if encoding == 'latin1': - encoding= 'latin9' - - try: - if os.name == 'nt': - locale.setlocale(locale.LC_ALL, str(_LOCALE2WIN32.get(lang, lang) + '.' + encoding)) - else: - locale.setlocale(locale.LC_ALL, str(lang + '.' + encoding)) - except Exception: - netsvc.Logger().notifyChannel(' ', netsvc.LOG_WARNING, - 'unable to set locale "%s"' % (lang)) - - + ids = lang_obj.search(cr, uid, [('code','=', lang)]) + if not ids: + # lets create the language with locale information + + lc, encoding = locale.getdefaultlocale() + if not encoding: + encoding = 'UTF-8' + if encoding == 'utf': + encoding = 'UTF-8' + if encoding == 'cp1252': + encoding= '1252' + if encoding == 'iso-8859-1': + encoding= 'iso-8859-15' + if encoding == 'latin1': + encoding= 'latin9' + + try: + if os.name == 'nt': + from report.report_sxw import _LOCALE2WIN32 + code = _LOCALE2WIN32.get(lang, lang) + else: + code = lang + locale.setlocale(locale.LC_ALL, locale.normalize(str(lang + '.' + encoding))) + except Exception: + msg = 'Unable to get information for locale %s. Information from the default locale (%s) have been used.' + logger.notifyChannel('i18n', netsvc.LOG_WARNING, msg % (lang, lc)) + if not lang_name: - lang_name=lang - languages=tools.get_languages() - lang_name = languages.get(lang, lang) - ids = lang_obj.create(cr, uid, { + lang_name = tools.get_languages().get(lang, lang) + + lang_info = { 'code': lang, 'name': lang_name, 'translatable': 1, 'date_format' : str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y')), 'time_format' : str(locale.nl_langinfo(locale.T_FMT)), - 'grouping' : [], 'decimal_point' : str(locale.nl_langinfo(locale.RADIXCHAR)), 'thousands_sep' : str(locale.nl_langinfo(locale.THOUSEP)) - }) - else: - lang_obj.write(cr, uid, ids, {'translatable':1, - 'date_format' : str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y')), - 'time_format' : str(locale.nl_langinfo(locale.T_FMT)), - 'grouping' : [], - 'decimal_point' : str(locale.nl_langinfo(locale.RADIXCHAR)), - 'thousands_sep' : str(locale.nl_langinfo(locale.THOUSEP)) - }) - try: - locale.resetlocale(locale.LC_ALL) - except: - pass - lang_ids = lang_obj.search(cr, uid, []) - langs = lang_obj.read(cr, uid, lang_ids) - ls = map(lambda x: (x['code'],x['name']), langs) + } + + try: + lang_obj.create(cr, uid, lang_info) + finally: + # locale.resetlocale is bugged with some locales. + # we need to normalize the result of locale.getdefaultlocale() + locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale()))) + + # now, the serious things: we read the language file fileobj.seek(0) - if fileformat == 'csv': reader = csv.reader(fileobj, quotechar='"', delimiter=',') # read the first line of the file (it contains columns titles) @@ -659,11 +653,11 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= cr.commit() cr.close() if verbose: - logger.notifyChannel("init", netsvc.LOG_INFO, + logger.notifyChannel("i18n", netsvc.LOG_INFO, "translation file loaded succesfully") except IOError: filename = '[lang: %s][format: %s]' % (lang or 'new', fileformat) - logger.notifyChannel("init", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) + logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From b9ae9fd0e8eb1ac74ead39f0d501cb3bdacb04b7 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@taupe> Date: Fri, 30 Jan 2009 00:41:16 +0100 Subject: [PATCH 13/92] [FIX] update the docs bzr revid: christophe@taupe-20090129234116-q47b2kupt02o24s0 --- doc/INSTALL | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/doc/INSTALL b/doc/INSTALL index 1b7539bf859..97684d6b3fd 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -8,12 +8,14 @@ Required dependencies: You need the following software installed: - * Python 2.3 or above - * Postgresql 7 or above - * Psycopg python module for python2.3 - * libxml2 and python2.3 bindings - * libxslt and python2.3 bindings - * Reportlab pdf generation library for python2.3 + * Python 2.4 or 2.5 + * Postgresql 8.2 or above + * Psycopg2 python module + * libxml2 and python bindings + * libxslt and python bindings + * Reportlab pdf generation library for python + * lxml python module + * pytz python module Some dependencies are only required for specific purposes: @@ -22,33 +24,24 @@ for rendering workflows graphs, you need: * pyparsing for generating reports using non .jpg images, you need: - * Python Imaging Library for python2.3 + * Python Imaging Library for python For Debian-based distributions, the required packages can be installed with the -following commands: - - apt-get install python2.3 python2.3-xml postgresql postgresql-client libxml2-python2.3 - apt-get install libxslt1-python2.3 python2.3-psycopg python2.3-reportlab - apt-get install python2.3-imaging python2.3-pyparsing graphviz - -For newer Debian-based distributions such as Etch, the required packages can be -installed with the following commands: - - apt-get install python2.4 python-xml postgresql postgresql-client python-libxml2 - apt-get install python-libxslt1 python-psycopg python-reportlab - apt-get install python-imaging python-pyparsing graphviz +following command: + #> apt-get install -y postgresql graphviz python-psycopg2 python-xml python-lxml python-libxml2 python-libxslt1 python-tz python-imaging For Fedora if they are not installed, install: python and postgresql uses yum or you can recover required packages on fedora web site in "core" or "extra" repository : -postgresql-python- +postgresql-python libxml2-python libxslt-python +python-lxml python-imaging -python-psycopg +python-psycopg2 python-reportlab graphviz You can find pyparsing at http://pyparsing.sourceforge.net/ From 2d58fc61e28d07f9b63df5a2ba9e2c88e1e20425 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Fri, 30 Jan 2009 13:52:39 +0100 Subject: [PATCH 14/92] [FIX] Set the template0 as default template when you create a new database http://www.postgresql.org/docs/8.2/static/manage-ag-templatedbs.html http://www.postgresql.org/docs/8.2/static/app-pgrestore.html Thank you to Christophe Chauvet (SYLEAM) for this fix. bzr revid: stephane@tinyerp.com-20090130125239-4h8agooloymfjy0m --- bin/service/web_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 44c853a6d4b..53936d202f5 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -204,7 +204,7 @@ class db(netsvc.Service): cr = db.cursor() cr.autocommit(True) try: - cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\'' % db_name) + cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE 'template0'""" % db_name) finally: cr.close() sql_db.close_db('template1') From 5e0e53690662c704955ea41787e758703e4d08f7 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Fri, 30 Jan 2009 16:19:03 +0100 Subject: [PATCH 15/92] [FIX] generate the pyc for redhat lp bug: https://launchpad.net/bugs/311981 fixed bzr revid: stephane@tinyerp.com-20090130151903-nggkdf0iord5o0g3 --- rpminstall_sh.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/rpminstall_sh.txt b/rpminstall_sh.txt index 5694f250b5d..bb7bb3fc10c 100644 --- a/rpminstall_sh.txt +++ b/rpminstall_sh.txt @@ -7,6 +7,7 @@ # Need to overwrite the install-part of the RPM to append the # compression-suffix onto the filenames for the man-pages. # +python -c "import compileall, os; compileall.compile_dir(os.path.join(os.environ['PWD'], 'doc'), force=True)" python -O -c "import compileall, os; compileall.compile_dir(os.path.join(os.environ['PWD'], 'doc'), force=True)" python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES From 8a3a776bbdec771e1f39814bbea57d2a62176485 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Fri, 30 Jan 2009 16:31:01 +0100 Subject: [PATCH 16/92] [FIX] Don't use the color if we use the logfile as logger bzr revid: stephane@tinyerp.com-20090130153101-94qlxou5fq8bcp0t --- bin/netsvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index e4df96a2b0d..59e56937184 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -127,7 +127,7 @@ def init_logger(): logger.addHandler(handler) logger.setLevel(tools.config['log_level'] or '0') - if isinstance(handler, logging.StreamHandler) and os.name != 'nt': + if handler is logging.StreamHandler and os.name != 'nt': # change color of level names # uses of ANSI color codes # see http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html From 27240361ca5ead2597ae8f0c63043bab0e969001 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Fri, 30 Jan 2009 17:55:51 +0100 Subject: [PATCH 17/92] [FIX] reactive the colored logging bzr revid: christophe@tinyerp.com-20090130165551-7e6nnn6f2xxabijd --- bin/netsvc.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index 59e56937184..b9e4a589fab 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -93,7 +93,8 @@ def init_logger(): logger = logging.getLogger() # 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') - + + logging_to_stdout = False if tools.config['syslog']: # SysLog Handler if os.name == 'nt': @@ -113,11 +114,13 @@ def init_logger(): os.makedirs(dirname) handler = logging.handlers.TimedRotatingFileHandler(logf,'D',1,30) except Exception, ex: - sys.stderr.write("ERROR: couldn't create the logfile directory\n") - handler = logging.StreamHandler(sys.stdout) + sys.stderr.write("ERROR: couldn't create the logfile directory. Logging to the standard output.\n") + handler = logging.StreamHandler(sys.stdout) + logging_to_stdout = True else: # Normal Handler on standard output handler = logging.StreamHandler(sys.stdout) + logging_to_stdout = True # tell the handler to use this format @@ -127,7 +130,7 @@ def init_logger(): logger.addHandler(handler) logger.setLevel(tools.config['log_level'] or '0') - if handler is logging.StreamHandler and os.name != 'nt': + if logging_to_stdout and os.name != 'nt': # change color of level names # uses of ANSI color codes # see http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html From 9c721d3090d41f25da4a93afcfe46822e0350224 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@taupe> Date: Sat, 31 Jan 2009 19:36:18 +0100 Subject: [PATCH 18/92] [FIX] database connections aren't serialized by default lp bug: https://launchpad.net/bugs/314449 fixed bzr revid: christophe@taupe-20090131183618-pglu86hzq3ewsfxi --- bin/service/web_services.py | 12 ++++++------ bin/sql_db.py | 11 ++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 53936d202f5..d4b2a6e9780 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -69,9 +69,9 @@ class db(netsvc.Service): self.actions[id] = {'clean': False} db = sql_db.db_connect('template1') - cr = db.cursor() + cr = db.serialized_cursor() try: - cr.autocommit(True) + cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ? cr.execute('CREATE DATABASE "%s" ENCODING \'unicode\'' % db_name) finally: cr.close() @@ -149,8 +149,8 @@ class db(netsvc.Service): logger = netsvc.Logger() db = sql_db.db_connect('template1') - cr = db.cursor() - cr.autocommit(True) + cr = db.serialized_cursor() + cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ? try: try: cr.execute('DROP DATABASE "%s"' % db_name) @@ -201,8 +201,8 @@ class db(netsvc.Service): raise Exception, "Database already exists" db = sql_db.db_connect('template1') - cr = db.cursor() - cr.autocommit(True) + cr = db.serialized_cursor() + cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ? try: cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE 'template0'""" % db_name) finally: diff --git a/bin/sql_db.py b/bin/sql_db.py index b0212ac1ea4..ff9a6b0c2c6 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -21,7 +21,7 @@ ############################################################################## import netsvc -from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_SERIALIZABLE +from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE from psycopg2.pool import ThreadedConnectionPool from psycopg2.psycopg1 import cursor as psycopg1cursor @@ -76,8 +76,9 @@ class Cursor(object): return f(self, *args, **kwargs) return wrapper - def __init__(self, pool): + def __init__(self, pool, serialized=False): self._pool = pool + self._serialized = serialized self._cnx = pool.getconn() self._obj = self._cnx.cursor(cursor_factory=psycopg1cursor) self.autocommit(False) @@ -168,7 +169,8 @@ class Cursor(object): @check def autocommit(self, on): - self._cnx.set_isolation_level([ISOLATION_LEVEL_SERIALIZABLE, ISOLATION_LEVEL_AUTOCOMMIT][bool(on)]) + offlevel = [ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE][bool(self._serialized)] + self._cnx.set_isolation_level([offlevel, ISOLATION_LEVEL_AUTOCOMMIT][bool(on)]) @check def commit(self): @@ -190,6 +192,9 @@ class ConnectionPool(object): def cursor(self): return Cursor(self) + def serialized_cursor(self): + return Cursor(self, True) + def __getattr__(self, name): return getattr(self._pool, name) From 5d4c72c177e720487fe7dff501dafd0b46bb38be Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@taupe> Date: Sat, 31 Jan 2009 21:29:14 +0100 Subject: [PATCH 19/92] [FIX] Avoid an infinite loop when a module can not be physically found. Thanks a lot to P. Christeas for the initial patch. bzr revid: christophe@taupe-20090131202914-m3stut6b62ysd0dm --- bin/addons/__init__.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 8d630b267b1..fcc60ca1809 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -275,12 +275,14 @@ def get_modules(): def create_graph(module_list, force=None): graph = Graph() - return upgrade_graph(graph, module_list, force) + upgrade_graph(graph, module_list, force) + return graph def upgrade_graph(graph, module_list, force=None): if force is None: force = [] packages = [] + len_graph = len(graph) for module in module_list: try: mod_path = get_module_path(module) @@ -326,8 +328,11 @@ def upgrade_graph(graph, module_list, force=None): for package in later: unmet_deps = filter(lambda p: p not in graph, dependencies[package]) logger.notifyChannel('init', netsvc.LOG_ERROR, 'module %s: Unmet dependencies: %s' % (package, ', '.join(unmet_deps))) - - return graph + + result = len(graph) - len_graph + if result != len(module_list): + logger.notifyChannel('init', netsvc.LOG_WARNING, 'Not all modules have loaded.') + return result def init_module_objects(cr, module_name, obj_list): @@ -682,14 +687,23 @@ def load_modules(db, force_demo=False, status=None, update_module=False): STATES_TO_LOAD += ['to install'] + loop_guardrail = 0 while True: + loop_guardrail += 1 + if loop_guardrail > 100: + raise ProgrammingError() cr.execute("SELECT name from ir_module_module WHERE state in (%s)" % ','.join(['%s']*len(STATES_TO_LOAD)), STATES_TO_LOAD) module_list = [name for (name,) in cr.fetchall() if name not in graph] if not module_list: break - - upgrade_graph(graph, module_list, force) + + new_modules_in_graph = upgrade_graph(graph, module_list, force) + if new_modules_in_graph == 0: + # nothing to load + break + + logger.notifyChannel('init', netsvc.LOG_DEBUG, 'Updating graph with %d more modules' % (len(module_list))) r = load_module_graph(cr, graph, status, report=report) has_updates = has_updates or r @@ -703,7 +717,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): obj = pool.get(model) if obj: obj._check_removed_columns(cr, log=True) - + if report.get_report(): logger.notifyChannel('init', netsvc.LOG_INFO, report) From f04edba892820b07b11973f2407d09d731dbdabc Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Mon, 2 Feb 2009 08:13:47 +0100 Subject: [PATCH 20/92] [FIX] allow to use the rowspan attribute on the group tag lp bug: https://launchpad.net/bugs/323551 fixed bzr revid: stephane@tinyerp.com-20090202071347-af02011b97ro5237 --- bin/addons/base/rng/view.rng | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/addons/base/rng/view.rng b/bin/addons/base/rng/view.rng index 6255c9f7650..40db5265c92 100644 --- a/bin/addons/base/rng/view.rng +++ b/bin/addons/base/rng/view.rng @@ -272,6 +272,7 @@ <rng:optional><rng:attribute name="attrs"/></rng:optional> <rng:optional><rng:attribute name="col"/></rng:optional> <rng:optional><rng:attribute name="colspan"/></rng:optional> + <rng:optional><rng:attribute name="rowspan"/></rng:optional> <rng:optional><rng:attribute name="position"/></rng:optional> <rng:optional><rng:attribute name="expand"/></rng:optional> <rng:optional><rng:attribute name="states"/></rng:optional> From 720ff8a9e56117f027c064293a0ed1df4b6fc47b Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Mon, 2 Feb 2009 14:02:14 +0100 Subject: [PATCH 21/92] [FIX] Use the translation in the selection field for the print screen functionnality lp bug: https://launchpad.net/bugs/323229 fixed bzr revid: stephane@tinyerp.com-20090202130214-z3bknh0n2j0wpspa --- bin/report/printscreen/ps_list.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index b59be30f1c8..d75d2ecad20 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -156,8 +156,15 @@ class report_printscreen_list(report_int): if fields[f]['type']=='many2one' and line[f]: line[f]= line[f][1] + if fields[f]['type']=='selection' and line[f]: + for key, value in fields[f]['selection']: + if key == line[f]: + line[f] = value + break + if fields[f]['type'] in ('one2many','many2many') and 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]) From 557cc93aae95e85cd2d9cb662127b3aec0c86a3b Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Mon, 2 Feb 2009 15:07:15 +0100 Subject: [PATCH 22/92] [IMP] Add a new function, last_day_of_current_month, this function returns the last day of the current month. bzr revid: stephane@tinyerp.com-20090202140715-e5lw28lvrd9fep13 --- bin/osv/orm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 737fc40c194..ff48da700a0 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -40,6 +40,7 @@ # import time +import calendar import types import string import netsvc @@ -62,6 +63,12 @@ from tools.config import config regex_order = re.compile('^([a-zA-Z0-9_]+( desc)?( asc)?,?)+$', re.I) +def last_day_of_current_month(): + import datetime + import calendar + today = datetime.date.today() + last_day = str(calendar.monthrange(today.year, today.month)[1]) + return time.strftime('%Y-%m-' + last_day) def intersect(la, lb): return filter(lambda x: x in lb, la) From 392bf7f4427f921544144dc94b59ebcc2bbd0f0f Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Mon, 2 Feb 2009 15:35:18 +0100 Subject: [PATCH 23/92] [FIX] Python typo fix lp bug: https://launchpad.net/bugs/324285 fixed bzr revid: stephane@tinyerp.com-20090202143518-6x96x6syd82se26d --- bin/service/web_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/service/web_services.py b/bin/service/web_services.py index d4b2a6e9780..10a11a4819f 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -204,7 +204,7 @@ class db(netsvc.Service): cr = db.serialized_cursor() cr.autocommit(True) # XXX inhibit the effect of a serialized cursor. is it what we want ? try: - cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE 'template0'""" % db_name) + cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "template0" """ % db_name) finally: cr.close() sql_db.close_db('template1') From 81445ead23856a5ab7e2fc49490df0fa9f36f981 Mon Sep 17 00:00:00 2001 From: "Sofia (Open ERP)" <sso@tinyerp.com> Date: Tue, 3 Feb 2009 10:49:30 +0530 Subject: [PATCH 24/92] bugfixed for date problem bzr revid: sso@tinyerp.com-20090203051930-mga8q88yr0qvnnru --- addons/crm_configuration/crm_jobs_demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm_configuration/crm_jobs_demo.xml b/addons/crm_configuration/crm_jobs_demo.xml index 4894457415e..cd9f6bdb073 100644 --- a/addons/crm_configuration/crm_jobs_demo.xml +++ b/addons/crm_configuration/crm_jobs_demo.xml @@ -105,7 +105,7 @@ </record> <record id="crm_case_financejob0" model="crm.case"> <field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/> - <field eval="time.strftime('%Y-%m-29')" name="date_deadline"/> + <field eval="time.strftime('%Y-%m-28')" name="date_deadline"/> <field name="category2_id" ref="crm_configuration.category_job2"/> <field name="partner_id" ref="base.res_partner_11"/> <field eval=""4"" name="priority"/> From 4d08668b31a50354ecd89973a20e3dfa37872d15 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" <jvo@tinyerp.com> Date: Tue, 3 Feb 2009 12:50:04 +0530 Subject: [PATCH 25/92] Bug 324585 lp bug: https://launchpad.net/bugs/324285 fixed bzr revid: jvo@tinyerp.com-20090203072004-ts0b7euzgzqmn4do --- addons/account/account_view.xml | 2 +- addons/product/product_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index ab8678439fb..cdc0786c6eb 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1309,7 +1309,7 @@ </record> <record id="action_move_line_tree1" model="ir.actions.act_window"> - <field name="name" eval="False"/> + <field name="name">Entry Lines</field> <field name="res_model">account.move.line</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index a03c7afcc86..572cd331007 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -213,7 +213,7 @@ <record id="product_normal_action_tree" model="ir.actions.act_window"> - <field name="name" eval="False"/> + <field name="name">Products"</field> <field name="type">ir.actions.act_window</field> <field name="res_model">product.product</field> <field name="view_type">form</field> From de2e10095ebf057b91dc02713c34180aa96caacf Mon Sep 17 00:00:00 2001 From: husen daudi <hda@hda> Date: Tue, 3 Feb 2009 13:01:23 +0530 Subject: [PATCH 26/92] bugfix lp bug: https://launchpad.net/bugs/323638 fixed bzr revid: hda@hda-20090203073123-2c0zibxh495o7ldo --- bin/addons/base/res/partner/partner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/res/partner/partner.py b/bin/addons/base/res/partner/partner.py index f9e6d74c515..cfe1cb41710 100644 --- a/bin/addons/base/res/partner/partner.py +++ b/bin/addons/base/res/partner/partner.py @@ -32,12 +32,12 @@ class res_partner_function(osv.osv): _description = 'Function of the contact' _columns = { 'name': fields.char('Function Name', size=64, required=True), - 'code': fields.char('Code', size=8), - 'ref':fields.char('Notes', size=32, required=True), + 'code': fields.char('Code', size=8, required=True), + 'ref':fields.char('Notes', size=32,), } _order = 'name' _sql_constraints = [ - ('ref_uniq', 'unique (ref)', 'The Notes of the Partner Function must be unique !') + ('code_uniq', 'unique (code)', 'The Code of the Partner Function must be unique !') ] res_partner_function() From 7f28b06e6a7ad5124f69b4a3159e54a878b95a35 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" <mra@tinyerp.com> Date: Tue, 3 Feb 2009 15:17:03 +0530 Subject: [PATCH 27/92] bug fix on res.partner.function demo data bzr revid: mra@tinyerp.com-20090203094703-b0qt00qjudqa7t5h --- bin/addons/base/res/partner/partner_data.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/addons/base/res/partner/partner_data.xml b/bin/addons/base/res/partner/partner_data.xml index 1e66a8f2183..61286b755d3 100644 --- a/bin/addons/base/res/partner/partner_data.xml +++ b/bin/addons/base/res/partner/partner_data.xml @@ -10,13 +10,13 @@ <field name="name">Corp.</field> <field name="shortcut">Corp.</field> </record> - + <record id="res_partner_title_ltd" model="res.partner.title"> <field name="domain">partner</field> <field name="name">Ltd</field> <field name="shortcut">ltd</field> </record> - + <record id="res_partner_title_madam" model="res.partner.title"> <field name="domain">contact</field> <field name="name">Madam</field> @@ -32,18 +32,18 @@ <field name="name">Sir</field> <field name="shortcut">M.</field> </record> - + <record id="function_director" model="res.partner.function"> <field name="name">Director</field> - <field name="ref">CEO</field> + <field name="code">CEO</field> </record> <record id="function_it" model="res.partner.function"> <field name="name">Chief Technical Officer</field> - <field name="ref">CTO</field> + <field name="code">CTO</field> </record> <record id="function_sale" model="res.partner.function"> <field name="name">Salesman</field> - <field name="ref">SAL</field> + <field name="code">SAL</field> </record> <!-- Default bank account description --> From 2a18349ad6fb193b01740433df5df4f207b53dd4 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" <mra@tinyerp.com> Date: Tue, 3 Feb 2009 15:18:30 +0530 Subject: [PATCH 28/92] bug fix on base_contact module for res.partner.function demo bzr revid: mra@tinyerp.com-20090203094830-hl8h6ymwfds3q1yt --- addons/base_contact/base_contact_demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_contact/base_contact_demo.xml b/addons/base_contact/base_contact_demo.xml index fe6266e6bba..c92d6294ab5 100644 --- a/addons/base_contact/base_contact_demo.xml +++ b/addons/base_contact/base_contact_demo.xml @@ -4,7 +4,7 @@ <!-- Create the functions --> <record id="res_partner_function_privateaddress0" model="res.partner.function"> <field eval=""""Private Address"""" name="name"/> - <field name="ref"></field> + <field name="code">PA</field> </record> <!-- Create the contacts --> From d75143727d8d4a31ad58cafc70a9cfb7e1797f61 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 11:50:03 +0100 Subject: [PATCH 29/92] [FIX] Check if the iban key is present and has a value in the dictionary lp bug: https://launchpad.net/bugs/323238 fixed bzr revid: stephane@tinyerp.com-20090203105003-4ix3ct06qj93xeux --- addons/base_iban/base_iban.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/base_iban/base_iban.py b/addons/base_iban/base_iban.py index aebaa940a9a..2d91e1d5b4c 100644 --- a/addons/base_iban/base_iban.py +++ b/addons/base_iban/base_iban.py @@ -38,13 +38,13 @@ class res_partner_bank(osv.osv): def create(self, cr, uid, vals, context={}): #overwrite to format the iban number correctly - if vals.has_key('iban'): + if 'iban' in vals and vals['iban']: vals['iban'] = _format_iban(vals['iban']) return super(res_partner_bank, self).create(cr, uid, vals, context) def write(self, cr, uid, ids, vals, context={}): #overwrite to format the iban number correctly - if vals.has_key('iban'): + if 'iban' in vals and vals['iban']: vals['iban'] = _format_iban(vals['iban']) return super(res_partner_bank, self).write(cr, uid, ids, vals, context) From e25ef1a054dbca340e6746940b2cd83e6eb3265e Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 13:43:27 +0100 Subject: [PATCH 30/92] [FIX] Remove the wrong demo data in the demo file lp bug: https://launchpad.net/bugs/324412 fixed bzr revid: stephane@tinyerp.com-20090203124327-wl5e8onkyhw6za3v --- addons/hr_expense/__terp__.py | 2 +- addons/hr_expense/hr.expense.expense.csv | 1 - addons/hr_expense/hr_expense_demo.xml | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 addons/hr_expense/hr_expense_demo.xml diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index 8c08af34e70..12fcbed1ac4 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -51,7 +51,7 @@ 'hr_expense_report.xml', 'process/hr_expense_process.xml' ], - 'demo_xml': ['hr_expense_demo.xml', 'hr.expense.expense.csv'], + 'demo_xml': ['hr.expense.expense.csv'], 'installable': True, 'active': False, 'certificate': '62479841789', diff --git a/addons/hr_expense/hr.expense.expense.csv b/addons/hr_expense/hr.expense.expense.csv index 56cc2cd0056..9cf0cf7d2aa 100644 --- a/addons/hr_expense/hr.expense.expense.csv +++ b/addons/hr_expense/hr.expense.expense.csv @@ -1,4 +1,3 @@ name,ref,employee_id,line_ids/date_value,line_ids/name,line_ids/analytic_account,line_ids/unit_quantity,line_ids/ref,line_ids/unit_amount September Expenses,09/06,Fabien Pinckaers,2006-09-05,Travel by Car - Customer Seagate 2 - Double,Thymbra,130.0,,0.22 -,,,2006-09-05,Travel by Car - Trainging,Trainings,100.0,,0.22 ,,,2006-09-05,Basic PC - Server for Seagate,Seagate P2,1.0,S1234435,300.0 diff --git a/addons/hr_expense/hr_expense_demo.xml b/addons/hr_expense/hr_expense_demo.xml deleted file mode 100644 index 1168fd29679..00000000000 --- a/addons/hr_expense/hr_expense_demo.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<openerp> - <data noupdate="1"> - - </data> -</openerp> From e4bc01cdc80d9b60864c0430d24d7dacb66acc27 Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Tue, 3 Feb 2009 15:03:11 +0100 Subject: [PATCH 31/92] [FIX] bgufixed the 2 wizards of l10n_be -vat_subjected wasn't take in considearation in vat_linting -wrong value was filled for <MONTH> tag in vat_declaration + [IMP] improved the vat_declaration wizard in oorder to: -work for quarter based accountings -have a generic solution for zip_id that is added in cci_partner bzr revid: qdp@tinyerp.com-20090203140311-74erq47phor2l5q3 --- addons/l10n_be/__init__.py | 1 + addons/l10n_be/company.py | 43 +++++++++++++++++++ .../l10n_be/wizard/account_vat_declaration.py | 34 +++++++++------ addons/l10n_be/wizard/partner_vat_listing.py | 3 +- 4 files changed, 65 insertions(+), 16 deletions(-) create mode 100644 addons/l10n_be/company.py diff --git a/addons/l10n_be/__init__.py b/addons/l10n_be/__init__.py index f5dd0969f16..c652b702c26 100644 --- a/addons/l10n_be/__init__.py +++ b/addons/l10n_be/__init__.py @@ -20,6 +20,7 @@ # ############################################################################## +import company import wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/company.py b/addons/l10n_be/company.py new file mode 100644 index 00000000000..3538f6e0dfd --- /dev/null +++ b/addons/l10n_be/company.py @@ -0,0 +1,43 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). 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 <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import osv + +class res_company(osv.osv): + _inherit = "res.company" + _description = 'res.company' + + + def _get_default_ad(self, addresses): + city = post_code = address = "" + for ads in addresses: + if ads.type == 'default': + city = ads.city + post_code = ads.zip + if ads.street: + address = ads.street + if ads.street2: + address += " " + ads.street2 + return city, post_code, address +res_company() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/wizard/account_vat_declaration.py b/addons/l10n_be/wizard/account_vat_declaration.py index 1dfd85aa52f..a6123d7c5c7 100644 --- a/addons/l10n_be/wizard/account_vat_declaration.py +++ b/addons/l10n_be/wizard/account_vat_declaration.py @@ -25,6 +25,8 @@ import datetime import pooler import base64 +from tools.translate import _ + form_fyear = """<?xml version="1.0"?> <form string="Select Period"> <field name="period" /> @@ -48,6 +50,7 @@ fields = { 'readonly': True,}, } + class wizard_vat_declaration(wizard.interface): def _create_xml(self, cr, uid, data, context): @@ -58,7 +61,7 @@ class wizard_vat_declaration(wizard.interface): user_cmpny = obj_company.name vat_no=obj_company.partner_id.vat if not vat_no: - raise wizard.except_wizard('Data Insufficient','No VAT Number Associated with Main Company!') + raise wizard.except_wizard(_('Data Insufficient'),_('No VAT Number Associated with Main Company!')) tax_ids = pool_obj.get('account.tax.code').search(cr,uid,[]) ctx = context.copy() @@ -69,30 +72,33 @@ class wizard_vat_declaration(wizard.interface): if not obj_company.partner_id.address: address=post_code=city='' - for ads in obj_company.partner_id.address: - if ads.type=='default': - if ads.zip_id: - city=ads.zip_id.city - post_code=ads.zip_id.name - if ads.street: - address=ads.street - if ads.street2: - address +=ads.street2 + city, post_code, address = pooler.get_pool(cr.dbname).get('res.company')._get_default_ad(obj_company.partner_id.address) obj_fyear = pool_obj.get('account.fiscalyear') year_id = obj_fyear.find(cr, uid) current_year = obj_fyear.browse(cr,uid,year_id).name - month=time.strftime('%m') period_code = pool_obj.get('account.period').browse(cr, uid, data['form']['period']).code + send_ref = user_cmpny if period_code: send_ref = send_ref + period_code data_of_file='<?xml version="1.0"?>\n<VATSENDING xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MultiDeclarationTVA-NoSignature-14.xml">' - data_of_file +='\n\t<DECLARER>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<NAME>'+str(obj_company.name)+'</NAME>\n\t\t<ADDRESS>'+str(address)+'</ADDRESS>' - data_of_file +='\n\t\t<POSTCODE>'+str(post_code)+'</POSTCODE>\n\t\t<CITY>'+str(city)+'</CITY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>' - data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t<MONTH>'+str(month)+'</MONTH>\n\t\t\t<YEAR>'+str(current_year[-4:])+'</YEAR>\n\t\t</DPERIODE>\n\t\t<ASK RESTITUTION="NO" PAYMENT="NO"/>' + data_of_file +='\n\t<DECLARER>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<NAME>'+str(obj_company.name)+'</NAME>\n\t\t<ADDRESS>'+address+'</ADDRESS>' + data_of_file +='\n\t\t<POSTCODE>'+post_code+'</POSTCODE>\n\t\t<CITY>'+city+'</CITY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>' + data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t' + + starting_month = pool_obj.get('account.period').browse(cr, uid, data['form']['period']).date_start[5:7] + ending_month = pool_obj.get('account.period').browse(cr, uid, data['form']['period']).date_stop[5:7] + if starting_month != ending_month: + #starting month and ending month of selected period are not the same + #it means that the accounting isn't based on periods of 1 month but on quarters + quarter = str(((int(starting_month) - 1) / 3) + 1) + data_of_file += '<QUARTER>'+quarter+'</QUARTER>\n\t\t\t' + else: + data_of_file += '<MONTH>'+starting_month+'</MONTH>\n\t\t\t' + data_of_file += '<YEAR>'+str(current_year[-4:])+'</YEAR>\n\t\t</DPERIODE>\n\t\t<ASK RESTITUTION="NO" PAYMENT="NO"/>' data_of_file +='\n\t\t<DATA>\n\t\t\t<DATA_ELEM>' for item in tax_info: diff --git a/addons/l10n_be/wizard/partner_vat_listing.py b/addons/l10n_be/wizard/partner_vat_listing.py index cac723612ae..e259d194608 100644 --- a/addons/l10n_be/wizard/partner_vat_listing.py +++ b/addons/l10n_be/wizard/partner_vat_listing.py @@ -76,8 +76,7 @@ class wizard_vat(wizard.interface): # obj_company=pooler.get_pool(cr.dbname).get('res.company').browse(cr,uid,1) # vat_company=obj_company.partner_id.vat -#TODO: can be improved if we replace this test => add a new field on res_partner for cases when a partner has a number and is not subjected to the VAT... have to see if this situation could happen - p_id_list=pooler.get_pool(cr.dbname).get('res.partner').search(cr,uid,[('vat','!=',False)]) + p_id_list=pooler.get_pool(cr.dbname).get('res.partner').search(cr,uid,[('vat_subjected','!=',False)]) if not p_id_list: raise wizard.except_wizard('Data Insufficient!','No partner has a VAT Number asociated with him.') From 1de14e18c5ae77fdab317aa0490f3def88ef5ae2 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 15:08:30 +0100 Subject: [PATCH 32/92] [FIX] Decode to utf-8 [IMP] Don't compute twice the xml stream lp bug: https://launchpad.net/bugs/324759 fixed bzr revid: stephane@tinyerp.com-20090203140830-ij2s919zywxs9fvi --- addons/base_module_record/base_module_record.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/base_module_record/base_module_record.py b/addons/base_module_record/base_module_record.py index fa9c8a6b51f..9cfa5058031 100644 --- a/addons/base_module_record/base_module_record.py +++ b/addons/base_module_record/base_module_record.py @@ -182,7 +182,7 @@ class base_module_record(osv.osv): val = str(val) val = val and ('"""%s"""' % val.replace('\\', '\\\\').replace('"', '\"')) or 'False' - field.setAttribute(u"eval", val) + field.setAttribute(u"eval", val.decode('utf-8')) record.appendChild(field) return record_list, noupdate @@ -324,8 +324,8 @@ class base_module_record(osv.osv): data.appendChild(res) elif rec[0]=='assert': pass - res = doc.toprettyxml(indent="\t") - return doc.toprettyxml(indent="\t").encode('utf8') + + return doc.toprettyxml(indent="\t").encode('utf-8') base_module_record() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 8fb89ff578f8a58dbabbf5462c1ef71d09ed69d9 Mon Sep 17 00:00:00 2001 From: Olivier Laurent <olt@tinyerp.com> Date: Tue, 3 Feb 2009 15:48:04 +0100 Subject: [PATCH 33/92] New certificate number: added a prefix to tell if the module comes from extraaddons or from addons bzr revid: olt@tinyerp.com-20090203144804-b1rqhm05bpxla0y0 --- bin/addons/base/module/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 8176565a871..e5e764184c5 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -482,7 +482,7 @@ class module(osv.osv): if not mod.certificate: logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: no quality certificate' % (mod.name,)) else: - val = long(mod.certificate) % 97 == 29 + val = long(mod.certificate[2:]) % 97 == 29 if not val: logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module %s: invalid quality certificate: %s' % (mod.name, mod.certificate)) raise osv.except_osv(_('Error'), _('Module %s: Invalid Quality Certificate') % (mod.name,)) From ce2e992b06fb8d8184a13b015ae3b1e0fdb4511e Mon Sep 17 00:00:00 2001 From: Olivier Laurent <olt@tinyerp.com> Date: Tue, 3 Feb 2009 16:07:15 +0100 Subject: [PATCH 34/92] New certificate number: added a prefix to tell if the module comes from extraaddons or from addons bzr revid: olt@tinyerp.com-20090203150715-kmursj9b0v8swl3l --- addons/account/__terp__.py | 64 +++++++++---------- addons/account_analytic_analysis/__terp__.py | 23 +++---- addons/account_analytic_default/__terp__.py | 2 +- addons/account_analytic_plans/__terp__.py | 12 ++-- addons/account_balance/__terp__.py | 2 +- addons/account_budget/__terp__.py | 14 ++-- addons/account_chart/__terp__.py | 2 +- addons/account_date_check/__terp__.py | 2 +- addons/account_followup/__terp__.py | 12 ++-- addons/account_invoice_layout/__terp__.py | 10 ++- addons/account_payment/__terp__.py | 31 ++++----- addons/account_report/__terp__.py | 12 ++-- addons/account_reporting/__terp__.py | 12 ++-- addons/account_tax_include/__terp__.py | 2 +- addons/account_voucher/__terp__.py | 14 ++-- .../analytic_journal_billing_rate/__terp__.py | 2 +- addons/analytic_user_function/__terp__.py | 2 +- addons/auction/__terp__.py | 12 ++-- addons/audittrail/__terp__.py | 10 ++- addons/base_contact/__terp__.py | 10 ++- addons/base_iban/__terp__.py | 2 +- addons/base_module_merge/__terp__.py | 2 +- addons/base_module_publish/__terp__.py | 2 +- addons/base_module_record/__terp__.py | 2 +- addons/base_report_creator/__terp__.py | 10 ++- addons/base_report_designer/__terp__.py | 2 +- addons/base_setup/__terp__.py | 2 +- addons/base_vat/__terp__.py | 2 +- addons/board/__terp__.py | 2 +- addons/board_account/__terp__.py | 18 +++--- addons/board_association/__terp__.py | 2 +- addons/board_auction/__terp__.py | 2 +- addons/board_crm_configuration/__terp__.py | 2 +- addons/board_document/__terp__.py | 2 +- addons/board_manufacturing/__terp__.py | 2 +- addons/board_project/__terp__.py | 18 +++--- addons/board_sale/__terp__.py | 2 +- addons/crm/__terp__.py | 14 ++-- addons/crm_configuration/__terp__.py | 26 ++++---- addons/crm_profiling/__terp__.py | 2 +- addons/crm_vertical/__terp__.py | 2 +- addons/delivery/__terp__.py | 12 ++-- addons/document/__terp__.py | 12 ++-- addons/document_ics/__terp__.py | 2 +- addons/event/__terp__.py | 14 ++-- addons/event_project/__terp__.py | 2 +- addons/google_map/__terp__.py | 2 +- addons/hr/__terp__.py | 26 ++++---- addons/hr_attendance/__terp__.py | 14 ++-- addons/hr_contract/__terp__.py | 10 ++- addons/hr_expense/__terp__.py | 16 ++--- addons/hr_holidays/__terp__.py | 26 ++++---- addons/hr_timesheet/__terp__.py | 14 ++-- addons/hr_timesheet_invoice/__terp__.py | 12 ++-- addons/hr_timesheet_sheet/__terp__.py | 12 ++-- addons/idea/__terp__.py | 12 ++-- addons/l10n_be/__terp__.py | 24 ++----- addons/l10n_chart_uk_minimal/__terp__.py | 50 ++------------- addons/l10n_fr/__terp__.py | 50 +++++++-------- addons/l10n_lu/__terp__.py | 14 ++-- addons/membership/__terp__.py | 12 ++-- addons/mrp/__terp__.py | 37 +++++------ addons/mrp_jit/__terp__.py | 2 +- addons/mrp_operations/__terp__.py | 14 ++-- addons/mrp_repair/__terp__.py | 16 ++--- addons/mrp_subproduct/__terp__.py | 2 +- addons/point_of_sale/__terp__.py | 20 +++--- addons/process/__terp__.py | 2 +- addons/product/__terp__.py | 34 ++++------ addons/product_margin/__terp__.py | 2 +- addons/profile_accounting/__terp__.py | 2 +- addons/profile_association/__terp__.py | 2 +- addons/profile_auction/__terp__.py | 2 +- addons/profile_crm/__terp__.py | 2 +- addons/profile_manufacturing/__terp__.py | 9 ++- addons/profile_service/__terp__.py | 2 +- addons/project/__terp__.py | 35 +++++----- addons/project_gtd/__terp__.py | 10 ++- addons/project_mrp/__terp__.py | 2 +- addons/project_retro_planning/__terp__.py | 2 +- addons/project_timesheet/__terp__.py | 2 +- addons/purchase/__terp__.py | 26 ++++---- addons/purchase_analytic_plans/__terp__.py | 2 +- addons/report_account/__terp__.py | 2 +- addons/report_analytic/__terp__.py | 2 +- addons/report_analytic_line/__terp__.py | 2 +- addons/report_analytic_planning/__terp__.py | 10 ++- addons/report_crm/__terp__.py | 2 +- addons/report_document/__terp__.py | 2 +- addons/report_intrastat/__terp__.py | 10 ++- addons/report_mrp/__terp__.py | 2 +- addons/report_project/__terp__.py | 2 +- addons/report_purchase/__terp__.py | 2 +- addons/report_sale/__terp__.py | 10 ++- addons/report_task/__terp__.py | 2 +- addons/report_timesheet/__terp__.py | 2 +- addons/sale/__terp__.py | 28 ++++---- addons/sale_analytic_plans/__terp__.py | 2 +- addons/sale_crm/__terp__.py | 2 +- addons/sale_delivery_report/__terp__.py | 6 +- addons/sale_journal/__terp__.py | 12 ++-- addons/scrum/__terp__.py | 14 ++-- addons/stock/__terp__.py | 47 +++++++------- addons/stock_invoice_directly/__terp__.py | 2 +- addons/stock_location/__terp__.py | 2 +- addons/stock_no_autopicking/__terp__.py | 2 +- addons/subscription/__terp__.py | 2 +- addons/warning/__terp__.py | 2 +- addons/wiki/__terp__.py | 14 ++-- 109 files changed, 474 insertions(+), 642 deletions(-) diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index eb9786c9d63..3caedb2b285 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -22,11 +22,9 @@ { - "name" : "Accounting and financial management", - "version" : "1.1", - "depends" : ["product", "base", "process"], - "author" : "Tiny", - "description": """Financial and accounting module that covers: + 'name': 'Accounting and financial management', + 'version': '1.1', + 'description': """Financial and accounting module that covers: General accounting Cost / Analytic accounting Third party accounting @@ -39,37 +37,33 @@ 'website': 'http://www.openerp.com', 'depends': ['product', 'base', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/account_security.xml', - 'security/ir.model.access.csv', - 'account_menuitem.xml', - 'account_wizard.xml', - 'account_view.xml', - 'account_end_fy.xml', - 'account_invoice_view.xml', - 'account_report.xml', - 'partner_view.xml', - 'data/account_invoice.xml', - 'data/account_data2.xml', - 'account_invoice_workflow.xml', - 'project/project_view.xml', - 'project/project_report.xml', - 'product_view.xml', - 'account_assert_test.xml', - 'process/statement_process.xml', - 'process/customer_invoice_process.xml', - 'process/supplier_invoice_process.xml', - 'sequence_view.xml' - ], - 'demo_xml': [ - 'account_demo.xml', - 'project/project_demo.xml', - 'project/analytic_account_demo.xml', - 'demo/account_minimal.xml', - 'account_unit_test.xml' - ], + 'update_xml': [ 'security/account_security.xml', + 'security/ir.model.access.csv', + 'account_menuitem.xml', + 'account_wizard.xml', + 'account_view.xml', + 'account_end_fy.xml', + 'account_invoice_view.xml', + 'account_report.xml', + 'partner_view.xml', + 'data/account_invoice.xml', + 'data/account_data2.xml', + 'account_invoice_workflow.xml', + 'project/project_view.xml', + 'project/project_report.xml', + 'product_view.xml', + 'account_assert_test.xml', + 'process/statement_process.xml', + 'process/customer_invoice_process.xml', + 'process/supplier_invoice_process.xml', + 'sequence_view.xml'], + 'demo_xml': [ 'account_demo.xml', + 'project/project_demo.xml', + 'project/analytic_account_demo.xml', + 'demo/account_minimal.xml', + 'account_unit_test.xml'], 'installable': True, 'active': False, - 'certificate': '80331923549', + 'certificate': '0021841915058685', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_analysis/__terp__.py b/addons/account_analytic_analysis/__terp__.py index b45b828c2a8..52d95bbfe4d 100644 --- a/addons/account_analytic_analysis/__terp__.py +++ b/addons/account_analytic_analysis/__terp__.py @@ -23,26 +23,21 @@ { 'name': 'report_account_analytic', - 'version': '1.0', + 'version': '1.1', 'category': 'Generic Modules/Accounting', 'description': """Modify account analytic view to show important data for project manager of services companies. Add menu to show relevant information for each manager.""", - "version" : "1.1", - "author" : "Camptocamp", - "category" : "Generic Modules/Accounting", - "module": "", - "website": "http://www.camptocamp.com/", - "depends" : ["account","hr_timesheet","hr_timesheet_invoice","project"], - "init_xml" : [], - "update_xml" : [ - "security/ir.model.access.csv", - "account_analytic_analysis_view.xml", - "account_analytic_analysis_menu.xml", - ], + 'author': 'Camptocamp', + 'website': 'http://www.camptocamp.com/', + 'depends': ['account', 'hr_timesheet', 'hr_timesheet_invoice', 'project'], + 'init_xml': [], + 'update_xml': [ 'security/ir.model.access.csv', + 'account_analytic_analysis_view.xml', + 'account_analytic_analysis_menu.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '42927202589', + 'certificate': '0018849810007757', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_default/__terp__.py b/addons/account_analytic_default/__terp__.py index ae3e599119d..88075ef8ba0 100644 --- a/addons/account_analytic_default/__terp__.py +++ b/addons/account_analytic_default/__terp__.py @@ -41,6 +41,6 @@ Allows to automatically select analytic accounts based on criterions: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '74229833581', + 'certificate': '0012267336671725', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/__terp__.py b/addons/account_analytic_plans/__terp__.py index 722bf2727d3..8b082c0477a 100644 --- a/addons/account_analytic_plans/__terp__.py +++ b/addons/account_analytic_plans/__terp__.py @@ -57,15 +57,13 @@ for one account entry. 'website': 'http://www.openerp.com', 'depends': ['account', 'account_analytic_default'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'model_wizard.xml', - 'account_analytic_plans_view.xml', - 'account_analytic_plans_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'model_wizard.xml', + 'account_analytic_plans_view.xml', + 'account_analytic_plans_report.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '36417675373', + 'certificate': '0018550331377437', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_balance/__terp__.py b/addons/account_balance/__terp__.py index 05de61e62ae..968047324f0 100644 --- a/addons/account_balance/__terp__.py +++ b/addons/account_balance/__terp__.py @@ -47,6 +47,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '81928745309', + 'certificate': '009275148897645', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/__terp__.py b/addons/account_budget/__terp__.py index bcb1ab7ffd6..979e188cf58 100644 --- a/addons/account_budget/__terp__.py +++ b/addons/account_budget/__terp__.py @@ -48,16 +48,14 @@ Three reports are available: 'website': 'http://www.openerp.com', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'account_budget_wizard.xml', - 'crossovered_budget_view.xml', - 'crossovered_budget_report.xml', - 'crossovered_budget_workflow.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'account_budget_wizard.xml', + 'crossovered_budget_view.xml', + 'crossovered_budget_report.xml', + 'crossovered_budget_workflow.xml'], 'demo_xml': ['crossovered_budget_demo.xml'], 'installable': True, 'active': False, - 'certificate': '43819694157', + 'certificate': '0020645028723437', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_chart/__terp__.py b/addons/account_chart/__terp__.py index bb3aee9760c..37104986f0f 100644 --- a/addons/account_chart/__terp__.py +++ b/addons/account_chart/__terp__.py @@ -33,6 +33,6 @@ 'update_xml': [], 'demo_xml': [], 'installable': True, - 'certificate': '73332443901', + 'certificate': '0014960165741629', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_date_check/__terp__.py b/addons/account_date_check/__terp__.py index 9f38a0c5305..65c047ed913 100644 --- a/addons/account_date_check/__terp__.py +++ b/addons/account_date_check/__terp__.py @@ -42,6 +42,6 @@ period !" 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '66174843389', + 'certificate': '0010472116996909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py index 5c58289f215..3f80342abf0 100644 --- a/addons/account_followup/__terp__.py +++ b/addons/account_followup/__terp__.py @@ -42,15 +42,13 @@ 'website': 'http://www.openerp.com', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'wizard/wizard_view.xml', - 'followup_view.xml', - 'followup_report_view.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'wizard/wizard_view.xml', + 'followup_view.xml', + 'followup_report_view.xml'], 'demo_xml': ['followup_demo.xml'], 'installable': True, 'active': False, - 'certificate': '72481076453', + 'certificate': '0015558742212861', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_invoice_layout/__terp__.py b/addons/account_invoice_layout/__terp__.py index 05389645833..b78eac44ccc 100644 --- a/addons/account_invoice_layout/__terp__.py +++ b/addons/account_invoice_layout/__terp__.py @@ -40,14 +40,12 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'account'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'account_invoice_layout_view.xml', - 'account_invoice_layout_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'account_invoice_layout_view.xml', + 'account_invoice_layout_report.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '57235078173', + 'certificate': '0025731486677245', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_payment/__terp__.py b/addons/account_payment/__terp__.py index 348b9b1ce08..8cc543031fc 100644 --- a/addons/account_payment/__terp__.py +++ b/addons/account_payment/__terp__.py @@ -22,13 +22,10 @@ { - "name": "Payment Management", - "version": "1.1", - "author": "Tiny", - "category": "Generic Modules/Payment", - "depends": ["account"], - "init_xml": [], - "description": """ + 'name': 'Payment Management', + 'version': '1.1', + 'category': 'Generic Modules/Payment', + 'description': """ This module provide : * a more efficient way to manage invoice payment. * a basic mechanism to easily plug various automated payment. @@ -36,19 +33,17 @@ 'author': 'Tiny', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ - 'security/account_payment_security.xml', - 'security/ir.model.access.csv', - 'payment_wizard.xml', - 'payment_view.xml', - 'payment_workflow.xml', - 'payment_sequence.xml', - 'account_invoice_view.xml', - 'payment_report.xml' - ], + 'update_xml': [ 'security/account_payment_security.xml', + 'security/ir.model.access.csv', + 'payment_wizard.xml', + 'payment_view.xml', + 'payment_workflow.xml', + 'payment_sequence.xml', + 'account_invoice_view.xml', + 'payment_report.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '61703998541', + 'certificate': '0028723518223901', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report/__terp__.py b/addons/account_report/__terp__.py index 4b7e64864fc..61646eeff53 100644 --- a/addons/account_report/__terp__.py +++ b/addons/account_report/__terp__.py @@ -33,15 +33,13 @@ 'website': 'http://www.openerp.com', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'account_view.xml', - 'account_report.xml', - 'account_wizard.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'account_view.xml', + 'account_report.xml', + 'account_wizard.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '50976406925', + 'certificate': '009873710157725', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_reporting/__terp__.py b/addons/account_reporting/__terp__.py index 4f98660da09..5509dd645e6 100644 --- a/addons/account_reporting/__terp__.py +++ b/addons/account_reporting/__terp__.py @@ -30,15 +30,13 @@ 'author': 'Tiny', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'account_view.xml', - 'account_report.xml', - 'account_data.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'account_view.xml', + 'account_report.xml', + 'account_data.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '72305016797', + 'certificate': '0010472149969149', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_tax_include/__terp__.py b/addons/account_tax_include/__terp__.py index 9e8c138cd41..4b174647dff 100644 --- a/addons/account_tax_include/__terp__.py +++ b/addons/account_tax_include/__terp__.py @@ -38,6 +38,6 @@ This module implement the modification on the invoice form. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '70514190381', + 'certificate': '0024534751356253', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py index 20c6e7c885a..2ca77746d34 100755 --- a/addons/account_voucher/__terp__.py +++ b/addons/account_voucher/__terp__.py @@ -39,16 +39,14 @@ Basic Accounting, plus new things that are available: 'website': 'http://www.openerp.com', 'depends': ['base', 'account'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'account_voucher_sequence.xml', - 'account_view.xml', - 'account_report.xml', - 'voucher_view.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'account_voucher_sequence.xml', + 'account_view.xml', + 'account_report.xml', + 'voucher_view.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '37580727101', + 'certificate': '0013165089564733', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/analytic_journal_billing_rate/__terp__.py b/addons/analytic_journal_billing_rate/__terp__.py index 882ef832758..52209779563 100644 --- a/addons/analytic_journal_billing_rate/__terp__.py +++ b/addons/analytic_journal_billing_rate/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '30271787965', + 'certificate': '0012865885319477', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/analytic_user_function/__terp__.py b/addons/analytic_user_function/__terp__.py index ae5231cb84e..fa1d44a3555 100644 --- a/addons/analytic_user_function/__terp__.py +++ b/addons/analytic_user_function/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '82277138269', + 'certificate': '0022440249660029', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/auction/__terp__.py b/addons/auction/__terp__.py index e2e7cd53e11..f99092ae1fa 100644 --- a/addons/auction/__terp__.py +++ b/addons/auction/__terp__.py @@ -33,15 +33,13 @@ 'author': 'Tiny', 'depends': ['base', 'account', 'hr_attendance'], 'init_xml': ['auction_sequence.xml'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'auction_view.xml', - 'auction_report.xml', - 'auction_wizard.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'auction_view.xml', + 'auction_report.xml', + 'auction_wizard.xml'], 'demo_xml': ['auction_demo.xml'], 'installable': True, 'active': False, - 'certificate': '39333102717', + 'certificate': '008676977189565', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/audittrail/__terp__.py b/addons/audittrail/__terp__.py index ccd86944270..63c0ca8d957 100644 --- a/addons/audittrail/__terp__.py +++ b/addons/audittrail/__terp__.py @@ -31,14 +31,12 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'account', 'purchase', 'mrp'], 'init_xml': [], - 'update_xml': [ - 'audittrail_view.xml', - 'security/ir.model.access.csv', - 'security/audittrail_security.xml' - ], + 'update_xml': [ 'audittrail_view.xml', + 'security/ir.model.access.csv', + 'security/audittrail_security.xml'], 'demo_xml': ['audittrail_demo.xml'], 'installable': True, 'active': False, - 'certificate': '62572348749', + 'certificate': '0010173008267165', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py index f50bfdef95a..97a8c68c55d 100644 --- a/addons/base_contact/__terp__.py +++ b/addons/base_contact/__terp__.py @@ -43,14 +43,12 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'base_contact_view.xml', - 'process/base_contact_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'base_contact_view.xml', + 'process/base_contact_process.xml'], 'demo_xml': ['base_contact_demo.xml'], 'installable': True, 'active': False, - 'certificate': '31287885469', + 'certificate': '0027227757067813', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_iban/__terp__.py b/addons/base_iban/__terp__.py index 99af88babf2..2d0329746b9 100644 --- a/addons/base_iban/__terp__.py +++ b/addons/base_iban/__terp__.py @@ -35,6 +35,6 @@ This module install the base for IBAN bank accounts. 'update_xml': ['base_iban_view.xml'], 'installable': True, 'active': False, - 'certificate': '50014379549', + 'certificate': '0016157146365533', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_merge/__terp__.py b/addons/base_module_merge/__terp__.py index 6d7b4d97fe1..7950cce66a3 100644 --- a/addons/base_module_merge/__terp__.py +++ b/addons/base_module_merge/__terp__.py @@ -41,6 +41,6 @@ 'update_xml': ['base_module_merge_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '35756279709', + 'certificate': '009275389048693', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_publish/__terp__.py b/addons/base_module_publish/__terp__.py index af3afdfad0b..257663338ed 100644 --- a/addons/base_module_publish/__terp__.py +++ b/addons/base_module_publish/__terp__.py @@ -43,6 +43,6 @@ to call this button when you want to release a new version of your module. 'update_xml': ['base_module_publish_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '67939821245', + 'certificate': '008976182484749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_record/__terp__.py b/addons/base_module_record/__terp__.py index aaf16cc283f..9bb1f76c7de 100644 --- a/addons/base_module_record/__terp__.py +++ b/addons/base_module_record/__terp__.py @@ -51,6 +51,6 @@ How to use it: 'update_xml': ['security/ir.model.access.csv', 'base_module_record_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '83134865813', + 'certificate': '0020046809368957', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_creator/__terp__.py b/addons/base_report_creator/__terp__.py index d95ebf3ef09..c9746a4cb50 100644 --- a/addons/base_report_creator/__terp__.py +++ b/addons/base_report_creator/__terp__.py @@ -36,14 +36,12 @@ the "Dashboard" menu. 'website': '', 'depends': ['base', 'board'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'base_report_creator_wizard.xml', - 'base_report_creator_view.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'base_report_creator_wizard.xml', + 'base_report_creator_view.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '31285794149', + 'certificate': '0027826168589381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/__terp__.py b/addons/base_report_designer/__terp__.py index 38c9eb12b42..9606d7a17ca 100644 --- a/addons/base_report_designer/__terp__.py +++ b/addons/base_report_designer/__terp__.py @@ -37,6 +37,6 @@ OpenOffice. 'demo_xml': ['base_report_data.xml'], 'installable': True, 'active': False, - 'certificate': '56379010493', + 'certificate': '0018850014946253', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_setup/__terp__.py b/addons/base_setup/__terp__.py index d4499f2e093..33ecef974ea 100644 --- a/addons/base_setup/__terp__.py +++ b/addons/base_setup/__terp__.py @@ -46,6 +46,6 @@ 'demo_xml': ['base_setup_demo.xml'], 'installable': True, 'active': True, - 'certificate': '86711085869', + 'certificate': '0021243634084373', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_vat/__terp__.py b/addons/base_vat/__terp__.py index a4e15b75188..7a95130606d 100644 --- a/addons/base_vat/__terp__.py +++ b/addons/base_vat/__terp__.py @@ -31,6 +31,6 @@ 'update_xml': ['base_vat_data.xml'], 'installable': True, 'active': False, - 'certificate': '84849360989', + 'certificate': '0014361902367773', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board/__terp__.py b/addons/board/__terp__.py index fe03a113ea3..1f285501513 100644 --- a/addons/board/__terp__.py +++ b/addons/board/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '76912305725', + 'certificate': '008676896805277', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_account/__terp__.py b/addons/board_account/__terp__.py index e44cc0b45c5..b468abf2748 100644 --- a/addons/board_account/__terp__.py +++ b/addons/board_account/__terp__.py @@ -35,19 +35,17 @@ * Graph of aged incomes """, 'author': 'Tiny', - 'depends': [ - 'account', - 'hr_timesheet_invoice', - 'board', - 'report_account', - 'report_analytic', - 'report_analytic_line', - 'account_report' - ], + 'depends': [ 'account', + 'hr_timesheet_invoice', + 'board', + 'report_account', + 'report_analytic', + 'report_analytic_line', + 'account_report'], 'update_xml': ['board_account_view.xml'], 'demo_xml': ['board_account_demo.xml'], 'installable': True, 'active': False, - 'certificate': '76016921229', + 'certificate': '0014361759782429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_association/__terp__.py b/addons/board_association/__terp__.py index 58557ed5a97..c7989d3dbcc 100644 --- a/addons/board_association/__terp__.py +++ b/addons/board_association/__terp__.py @@ -34,6 +34,6 @@ This module implements a dashboard for associations. 'demo_xml': ['board_association_demo.xml'], 'installable': True, 'active': False, - 'certificate': '79647781773', + 'certificate': '0023338115437757', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_auction/__terp__.py b/addons/board_auction/__terp__.py index e7e49542632..4c47ec8b4ac 100644 --- a/addons/board_auction/__terp__.py +++ b/addons/board_auction/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': ['board_auction_demo.xml'], 'installable': True, 'active': False, - 'certificate': '49187078189', + 'certificate': '0027825909145421', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_crm_configuration/__terp__.py b/addons/board_crm_configuration/__terp__.py index eb6e0a435d1..845595adcb4 100644 --- a/addons/board_crm_configuration/__terp__.py +++ b/addons/board_crm_configuration/__terp__.py @@ -40,6 +40,6 @@ This module implements a dashboard for CRM that includes: 'demo_xml': ['board_crm_demo.xml'], 'installable': True, 'active': False, - 'certificate': '71599098909', + 'certificate': '0023637319471165', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_document/__terp__.py b/addons/board_document/__terp__.py index 17e44ae48d7..ff0e2aaf886 100644 --- a/addons/board_document/__terp__.py +++ b/addons/board_document/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': ['board_document_demo.xml'], 'installable': True, 'active': False, - 'certificate': '44628458429', + 'certificate': '0019747483618397', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_manufacturing/__terp__.py b/addons/board_manufacturing/__terp__.py index 41e0d37bcdf..99459bc575e 100644 --- a/addons/board_manufacturing/__terp__.py +++ b/addons/board_manufacturing/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': ['board_manufacturing_demo.xml'], 'installable': True, 'active': False, - 'certificate': '30407612797', + 'certificate': '0026629097091997', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_project/__terp__.py b/addons/board_project/__terp__.py index d89aecab86e..1edc75136de 100644 --- a/addons/board_project/__terp__.py +++ b/addons/board_project/__terp__.py @@ -34,19 +34,17 @@ This module implements a dashboard for project member that includes: * Graph of my work analysis """, 'author': 'Tiny', - 'depends': [ - 'project', - 'report_timesheet', - 'board', - 'report_analytic_planning', - 'report_analytic_line', - 'report_task', - 'hr_timesheet_sheet' - ], + 'depends': [ 'project', + 'report_timesheet', + 'board', + 'report_analytic_planning', + 'report_analytic_line', + 'report_task', + 'hr_timesheet_sheet'], 'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml'], 'demo_xml': ['board_project_demo.xml'], 'installable': True, 'active': False, - 'certificate': '39350482013', + 'certificate': '0013464149376989', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_sale/__terp__.py b/addons/board_sale/__terp__.py index 0546c03b50f..f7100b32d08 100644 --- a/addons/board_sale/__terp__.py +++ b/addons/board_sale/__terp__.py @@ -39,6 +39,6 @@ This module implements a dashboard for salesman that includes: 'demo_xml': ['board_sale_demo.xml'], 'installable': True, 'active': False, - 'certificate': '46503501021', + 'certificate': '0011668930186397', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py index 34927ec17a3..2a7c357e41d 100644 --- a/addons/crm/__terp__.py +++ b/addons/crm/__terp__.py @@ -47,16 +47,14 @@ between mails and Open ERP.""", 'website': 'http://www.openerp.com', 'depends': ['base'], 'init_xml': ['crm_data.xml'], - 'update_xml': [ - 'crm_view.xml', - 'crm_report.xml', - 'crm_wizard.xml', - 'security/crm_security.xml', - 'security/ir.model.access.csv' - ], + 'update_xml': [ 'crm_view.xml', + 'crm_report.xml', + 'crm_wizard.xml', + 'security/crm_security.xml', + 'security/ir.model.access.csv'], 'demo_xml': ['crm_demo.xml'], 'installable': True, 'active': False, - 'certificate': '79056041421', + 'certificate': '0024235645566773', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py index d5da400d409..fe44a662ca8 100644 --- a/addons/crm_configuration/__terp__.py +++ b/addons/crm_configuration/__terp__.py @@ -38,23 +38,21 @@ meetings, eso. 'author': 'Tiny', 'website': 'http://www.openerp.com', 'depends': ['crm', 'report_crm', 'process'], - 'init_xml': [ - 'crm_configuration_wizard.xml', - 'crm_config_view.xml', - 'crm_bugs_view.xml', - 'crm_jobs_view.xml', - 'crm_lead_view.xml', - 'crm_meeting_view.xml', - 'crm_opportunity_view.xml', - 'crm_fund_view.xml', - 'crm_claims_view.xml', - 'crm_phonecall_view.xml', - 'crm_report_view.xml' - ], + 'init_xml': [ 'crm_configuration_wizard.xml', + 'crm_config_view.xml', + 'crm_bugs_view.xml', + 'crm_jobs_view.xml', + 'crm_lead_view.xml', + 'crm_meeting_view.xml', + 'crm_opportunity_view.xml', + 'crm_fund_view.xml', + 'crm_claims_view.xml', + 'crm_phonecall_view.xml', + 'crm_report_view.xml'], 'update_xml': ['security/ir.model.access.csv', 'process/crm_configuration_process.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '80531386589', + 'certificate': '0012865886253781', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_profiling/__terp__.py b/addons/crm_profiling/__terp__.py index 37629b2071e..4b70fe07807 100644 --- a/addons/crm_profiling/__terp__.py +++ b/addons/crm_profiling/__terp__.py @@ -45,6 +45,6 @@ 'demo_xml': ['crm_profiling_demo.xml'], 'installable': True, 'active': False, - 'certificate': '33984979005', + 'certificate': '0012566539614077', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_vertical/__terp__.py b/addons/crm_vertical/__terp__.py index 44e8113a165..411d5ff8962 100644 --- a/addons/crm_vertical/__terp__.py +++ b/addons/crm_vertical/__terp__.py @@ -33,6 +33,6 @@ 'update_xml': [], 'demo_xml': [], 'installable': True, - 'certificate': '59915476845', + 'certificate': '0017050451838029', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/delivery/__terp__.py b/addons/delivery/__terp__.py index 1aec98e6f6f..b00a6c519bd 100644 --- a/addons/delivery/__terp__.py +++ b/addons/delivery/__terp__.py @@ -29,15 +29,13 @@ 'author': 'Tiny', 'depends': ['sale', 'purchase', 'stock'], 'init_xml': ['delivery_data.xml'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'delivery_view.xml', - 'delivery_wizard.xml', - 'partner_view.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'delivery_view.xml', + 'delivery_wizard.xml', + 'partner_view.xml'], 'demo_xml': ['delivery_demo.xml'], 'installable': True, 'active': False, - 'certificate': '33981912253', + 'certificate': '0023337859283261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/__terp__.py b/addons/document/__terp__.py index c6a772f5287..8a38319859d 100644 --- a/addons/document/__terp__.py +++ b/addons/document/__terp__.py @@ -34,15 +34,13 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'process'], 'init_xml': ['document_data.xml', 'document_demo.xml'], - 'update_xml': [ - 'document_view.xml', - 'document_data.xml', - 'security/document_security.xml', - 'security/ir.model.access.csv' - ], + 'update_xml': [ 'document_view.xml', + 'document_data.xml', + 'security/document_security.xml', + 'security/ir.model.access.csv'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '70515416461', + 'certificate': '0025133162533277', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_ics/__terp__.py b/addons/document_ics/__terp__.py index 0a9a626d3cc..4a0cc474e16 100644 --- a/addons/document_ics/__terp__.py +++ b/addons/document_ics/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': ['document_demo.xml'], 'installable': True, 'active': False, - 'certificate': '71242387229', + 'certificate': '0013463924422349', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event/__terp__.py b/addons/event/__terp__.py index 2cd05130736..f7bb8acfc1e 100644 --- a/addons/event/__terp__.py +++ b/addons/event/__terp__.py @@ -41,16 +41,14 @@ 'author': 'Tiny', 'depends': ['crm', 'base_contact', 'account'], 'init_xml': ['event_data.xml'], - 'update_xml': [ - 'event_wizard.xml', - 'event_view.xml', - 'event_sequence.xml', - 'security/event_security.xml', - 'security/ir.model.access.csv' - ], + 'update_xml': [ 'event_wizard.xml', + 'event_view.xml', + 'event_sequence.xml', + 'security/event_security.xml', + 'security/ir.model.access.csv'], 'demo_xml': ['event_demo.xml'], 'installable': True, 'active': False, - 'certificate': '83059161581', + 'certificate': '0011369839138589', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event_project/__terp__.py b/addons/event_project/__terp__.py index 741f9796509..219a08875ab 100644 --- a/addons/event_project/__terp__.py +++ b/addons/event_project/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '69726863885', + 'certificate': '0028125369597165', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/google_map/__terp__.py b/addons/google_map/__terp__.py index 6b6b15b0838..5b9057a64b8 100644 --- a/addons/google_map/__terp__.py +++ b/addons/google_map/__terp__.py @@ -36,6 +36,6 @@ url widget.""", 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '29498930765', + 'certificate': '009275388447293', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/__terp__.py b/addons/hr/__terp__.py index 2a82c2ba01f..2657fd0b716 100644 --- a/addons/hr/__terp__.py +++ b/addons/hr/__terp__.py @@ -22,12 +22,10 @@ { - "name" : "Human Resources", - "version" : "1.1", - "author" : "Tiny", - "category" : "Generic Modules/Human Resources", - "website" : "http://www.openerp.com", - "description": """ + 'name': 'Human Resources', + 'version': '1.1', + 'category': 'Generic Modules/Human Resources', + 'description': """ Module for human resource management. You can manage: * Employees and hierarchies * Work hours sheets @@ -39,17 +37,15 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/hr_security.xml', - 'security/ir.model.access.csv', - 'hr_view.xml', - 'hr_wizard.xml', - 'hr_department_view.xml', - 'process/hr_process.xml' - ], + 'update_xml': [ 'security/hr_security.xml', + 'security/ir.model.access.csv', + 'hr_view.xml', + 'hr_wizard.xml', + 'hr_department_view.xml', + 'process/hr_process.xml'], 'demo_xml': ['hr_demo.xml', 'hr_department_demo.xml'], 'installable': True, 'active': False, - 'certificate': '86710558965', + 'certificate': '0021842042346741', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_attendance/__terp__.py b/addons/hr_attendance/__terp__.py index 6afa17c958c..dc196a15e66 100644 --- a/addons/hr_attendance/__terp__.py +++ b/addons/hr_attendance/__terp__.py @@ -28,16 +28,14 @@ 'description': """This module aims to manage employee's attendances.""", 'author': 'Tiny', 'depends': ['base', 'hr'], - 'update_xml': [ - 'security/hr_security.xml', - 'hr_attendance_view.xml', - 'hr_attendance_wizard.xml', - 'hr_attendance_report.xml', - 'security/ir.model.access.csv' - ], + 'update_xml': [ 'security/hr_security.xml', + 'hr_attendance_view.xml', + 'hr_attendance_wizard.xml', + 'hr_attendance_report.xml', + 'security/ir.model.access.csv'], 'demo_xml': ['hr_attendance_demo.xml'], 'installable': True, 'active': False, - 'certificate': '63495605613', + 'certificate': '0021542640344093', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_contract/__terp__.py b/addons/hr_contract/__terp__.py index a253d60109e..1967f7304ac 100644 --- a/addons/hr_contract/__terp__.py +++ b/addons/hr_contract/__terp__.py @@ -37,14 +37,12 @@ 'website': 'http://www.openerp.com', 'depends': ['hr'], 'init_xml': ['hr_contract_data.xml'], - 'update_xml': [ - 'security/hr_contract_security.xml', - 'security/ir.model.access.csv', - 'hr_contract_view.xml' - ], + 'update_xml': [ 'security/hr_contract_security.xml', + 'security/ir.model.access.csv', + 'hr_contract_view.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '46298028637', + 'certificate': '0011369849872221', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index 8c08af34e70..dfe1eb54ec2 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -43,17 +43,15 @@ 'website': 'http://www.openerp.com', 'depends': ['hr', 'account', 'account_tax_include'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'hr_expense_sequence.xml', - 'hr_expense_workflow.xml', - 'hr_expense_view.xml', - 'hr_expense_report.xml', - 'process/hr_expense_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'hr_expense_sequence.xml', + 'hr_expense_workflow.xml', + 'hr_expense_view.xml', + 'hr_expense_report.xml', + 'process/hr_expense_process.xml'], 'demo_xml': ['hr_expense_demo.xml', 'hr.expense.expense.csv'], 'installable': True, 'active': False, - 'certificate': '62479841789', + 'certificate': '0028424408828349', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py index 948df531ceb..6c433a7b078 100644 --- a/addons/hr_holidays/__terp__.py +++ b/addons/hr_holidays/__terp__.py @@ -2,12 +2,10 @@ { - "name" : "Human Resources: Holidays management", - "version" : "1.1", - "author" : "Tiny & Axelor", - "category" : "Generic Modules/Human Resources", - "website" : "http://www.openerp.com", - "description": """Human Ressources: Holidays tracking and workflow + 'name': 'Human Resources: Holidays management', + 'version': '1.1', + 'category': 'Generic Modules/Human Resources', + 'description': """Human Ressources: Holidays tracking and workflow This module allows you to manage holidays and holidays requests. For each employee, you can also define a number of available holidays per holiday status. @@ -30,17 +28,15 @@ 'website': 'http://www.openerp.com', 'depends': ['hr', 'crm_configuration', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'hr_workflow.xml', - 'hr_view.xml', - 'hr_holidays_report.xml', - 'hr_holidays_wizard.xml', - 'process/hr_holidays_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'hr_workflow.xml', + 'hr_view.xml', + 'hr_holidays_report.xml', + 'hr_holidays_wizard.xml', + 'process/hr_holidays_process.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '86579209325', + 'certificate': '0020345896856477', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/__terp__.py b/addons/hr_timesheet/__terp__.py index c17deafa743..0f85e543310 100644 --- a/addons/hr_timesheet/__terp__.py +++ b/addons/hr_timesheet/__terp__.py @@ -40,16 +40,14 @@ to set up a management by affair. 'website': 'http://www.openerp.com', 'depends': ['account', 'hr', 'base', 'hr_attendance', 'process'], 'init_xml': ['hr_timesheet_data.xml'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'hr_timesheet_view.xml', - 'hr_timesheet_report.xml', - 'hr_timesheet_wizard.xml', - 'process/hr_timesheet_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'hr_timesheet_view.xml', + 'hr_timesheet_report.xml', + 'hr_timesheet_wizard.xml', + 'process/hr_timesheet_process.xml'], 'demo_xml': ['hr_timesheet_demo.xml'], 'installable': True, 'active': False, - 'certificate': '71405533469', + 'certificate': '0022739527534493', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/__terp__.py b/addons/hr_timesheet_invoice/__terp__.py index 899c466bdf7..e3b77502a76 100644 --- a/addons/hr_timesheet_invoice/__terp__.py +++ b/addons/hr_timesheet_invoice/__terp__.py @@ -33,15 +33,13 @@ reports, eso.""", 'website': 'http://www.openerp.com', 'depends': ['account', 'hr_timesheet'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'hr_timesheet_invoice_view.xml', - 'hr_timesheet_invoice_wizard.xml', - 'hr_timesheet_invoice_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'hr_timesheet_invoice_view.xml', + 'hr_timesheet_invoice_wizard.xml', + 'hr_timesheet_invoice_report.xml'], 'demo_xml': ['hr_timesheet_invoice_demo.xml'], 'installable': True, 'active': False, - 'certificate': '56091842381', + 'certificate': '0020346051941629', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_sheet/__terp__.py b/addons/hr_timesheet_sheet/__terp__.py index 006569b4c0e..de80e66421a 100644 --- a/addons/hr_timesheet_sheet/__terp__.py +++ b/addons/hr_timesheet_sheet/__terp__.py @@ -48,15 +48,13 @@ The validation can be configured in te company: 'website': 'http://www.openerp.com', 'depends': ['hr_timesheet', 'hr_timesheet_invoice', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'hr_timesheet_sheet_view.xml', - 'hr_timesheet_workflow.xml', - 'process/hr_timesheet_sheet_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'hr_timesheet_sheet_view.xml', + 'hr_timesheet_workflow.xml', + 'process/hr_timesheet_sheet_process.xml'], 'demo_xml': ['hr_timesheet_sheet_demo.xml'], 'installable': True, 'active': False, - 'certificate': '73297700829', + 'certificate': '0011669036322245', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/idea/__terp__.py b/addons/idea/__terp__.py index 37b6d0c52ab..294d8dcbe58 100644 --- a/addons/idea/__terp__.py +++ b/addons/idea/__terp__.py @@ -30,14 +30,12 @@ 'website': 'http://openerp.com', 'depends': ['base'], 'init_xml': [], - 'update_xml': [ - 'idea_view.xml', - 'idea_workflow.xml', - 'security/idea_security.xml', - 'security/ir.model.access.csv' - ], + 'update_xml': [ 'idea_view.xml', + 'idea_workflow.xml', + 'security/idea_security.xml', + 'security/ir.model.access.csv'], 'demo_xml': [], 'installable': True, - 'certificate': '71515601309', + 'certificate': '0015857924651741', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/__terp__.py b/addons/l10n_be/__terp__.py index 05c87181e45..971135e6393 100644 --- a/addons/l10n_be/__terp__.py +++ b/addons/l10n_be/__terp__.py @@ -40,24 +40,14 @@ """, 'author': 'Tiny', - 'depends': [ - 'account', - 'account_report', - 'base_vat', - 'base_iban', - 'account_chart' - ], + 'depends': ['account', 'account_report', 'base_vat', 'base_iban', 'account_chart'], 'init_xml': [], - 'update_xml': [ - 'account_pcmn_belgium.xml', - 'l10n_be_wizard.xml', - 'l10n_be_sequence.xml', - 'fiscal_templates.xml', - ], - 'demo_xml': [ - 'account.report.report.csv' - ], + 'update_xml': [ 'account_pcmn_belgium.xml', + 'l10n_be_wizard.xml', + 'l10n_be_sequence.xml', + 'fiscal_templates.xml'], + 'demo_xml': ['account.report.report.csv'], 'installable': True, - 'certificate': '31977724637', + 'certificate': '0019747560288749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_chart_uk_minimal/__terp__.py b/addons/l10n_chart_uk_minimal/__terp__.py index 3b714b16986..3add68dd4bf 100644 --- a/addons/l10n_chart_uk_minimal/__terp__.py +++ b/addons/l10n_chart_uk_minimal/__terp__.py @@ -20,44 +20,6 @@ # ############################################################################## -# -# This module provides a minimal UK chart of accounts for building upon further -# Open ERP's default currency and accounts are remapped to this chart -# -# This module works for Open ERP 4.1.0 (and, assumed, onwards). -# This module does not work for Open ERP 4.0.2 and before. -# -# VAT is structured thus: -# - the user company is assumed to be non-VAT exempt (easy to modify, however) -# - categories OVATS (Standard), OVATR (Reduced), OVATZ (Zero) should be -# assigned to the customer taxes section of products (depending on the product) -# - categories IVATS (Standard), IVATR (Reduced), IVATZ (Zero) should be -# assigned to the supplier taxes section of products (depending on the product) -# - categories OVATX (eXempt), OVATO (Out of scope), or nothing at all should be -# assigned to default tax field of customers (depending on the customer) -# - customer categorization trumps product categorization (unchanged Tiny functionality) -# - on purchases, upon invoicing -# - the base amount (ex-VAT) appears in the appropriate input base category (S, R, Z) -# - the VAT amount appears in the appropriate input VAT category (S, R) -# - invoice lines can be traced in these VAT categories -# - refunds of invoices are deducted from the input category -# - on sales, upon invoicing -# - the base amount (ex-VAT) appears in the appropriate output base category (S, R, Z, X, O) -# - the VAT amount appears in the appropriate output VAT category (S, R) -# - invoice lines can be traced in these VAT categories -# - refunds of invoices are deducted from the output category -# -# This forms a basis for accrual tax accounting -# Cash tax accounting can be accommodated with further processing in Open ERP -# -# Status beta 0.92 - tested on Open ERP 4.1.0 -# Status beta 0.93 - tested on Open ERP 4.1.0 -# - trivial change to depend only on 'account' -# (seemed to be important for importing with no demo data) -# Status 1.0 - tested on Open ERP 4.1.0, 4.0.3 -# - COGS account type fixed -# - { 'name': 'United Kingdom - minimal', @@ -68,14 +30,12 @@ 'website': 'http://www.seathsolutions.com', 'depends': ['base', 'account', 'base_iban', 'base_vat', 'account_chart'], 'init_xml': [], - 'update_xml': [ - 'account_types.xml', - 'account_chart.xml', - 'account_tax.xml', - 'l10n_uk_wizard.xml' - ], + 'update_xml': [ 'account_types.xml', + 'account_chart.xml', + 'account_tax.xml', + 'l10n_uk_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '64392144797', + 'certificate': '0025133078445917', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_fr/__terp__.py b/addons/l10n_fr/__terp__.py index 6d9bccc590d..3151a7e2ffb 100644 --- a/addons/l10n_fr/__terp__.py +++ b/addons/l10n_fr/__terp__.py @@ -25,35 +25,33 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## + + { - "name" : "France - Plan Comptable Général", - "version" : "1.0", - "author" : "OpenERP", - "website": "http://www.openerp.com", - "category" : "Localisation/Account Charts", - "description": """This is the module to manage the accounting chart for France in Open ERP. + 'name': 'France - Plan Comptable G\xc3\xa9n\xc3\xa9ral', + 'version': '1.0', + 'category': 'Localisation/Account Charts', + 'description': """This is the module to manage the accounting chart for France in Open ERP. Credits: Sistheo Zeekom CrysaLEAD """, - "depends" : ['base', 'account', 'account_chart', 'account_report', 'base_vat'], - "init_xml" : [ - ], - "update_xml" : [ - "report.xml", - "pcg.xml", - "l10n_fr_pcg_taxes.xml", - "tax.xml", - "fiscal_templates_fr.xml", - "l10n_fr_pcg_account_report.xml", - "l10n_fr_pcg_report.xml", - "l10n_fr_pcg_wizard.xml", - "l10n_fr_pcg_view.xml", - "security/ir.model.access.csv", - ], - "demo_xml" : [], - "certificate" : "435321693876313629", - "active": False, - "installable": True + 'author': 'OpenERP', + 'website': 'http://www.openerp.com', + 'depends': ['base', 'account', 'account_chart', 'account_report', 'base_vat'], + 'init_xml': [], + 'update_xml': [ 'report.xml', + 'pcg.xml', + 'l10n_fr_pcg_taxes.xml', + 'tax.xml', + 'fiscal_templates_fr.xml', + 'l10n_fr_pcg_account_report.xml', + 'l10n_fr_pcg_report.xml', + 'l10n_fr_pcg_wizard.xml', + 'l10n_fr_pcg_view.xml', + 'security/ir.model.access.csv'], + 'demo_xml': [], + 'installable': True, + 'active': False, + 'certificate': '0012865552406941', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/l10n_lu/__terp__.py b/addons/l10n_lu/__terp__.py index 62d39d81e67..69f29bdf6bc 100644 --- a/addons/l10n_lu/__terp__.py +++ b/addons/l10n_lu/__terp__.py @@ -35,15 +35,13 @@ This module installs: 'website': 'http://openerp.com', 'depends': ['account', 'account_report', 'base_vat', 'base_iban'], 'init_xml': [], - 'update_xml': [ - 'account.tax.code.template.csv', - 'l10n_lu_data.xml', - 'account.tax.template.csv', - 'l10n_lu_wizard.xml', - 'l10n_lu_report.xml' - ], + 'update_xml': [ 'account.tax.code.template.csv', + 'l10n_lu_data.xml', + 'account.tax.template.csv', + 'l10n_lu_wizard.xml', + 'l10n_lu_report.xml'], 'demo_xml': ['account.report.report.csv'], 'installable': True, - 'certificate': '78164766621', + 'certificate': '0011967958241629', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/membership/__terp__.py b/addons/membership/__terp__.py index 54dce054fad..c346da6b35e 100644 --- a/addons/membership/__terp__.py +++ b/addons/membership/__terp__.py @@ -40,15 +40,13 @@ invoice and send propositions for membership renewal. 'author': 'Tiny', 'depends': ['base', 'product', 'account', 'process'], 'init_xml': ['membership_data.xml'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'membership_view.xml', - 'membership_wizard.xml', - 'process/membership_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'membership_view.xml', + 'membership_wizard.xml', + 'process/membership_process.xml'], 'demo_xml': ['membership_demo.xml'], 'installable': True, 'active': False, - 'certificate': '42907796381', + 'certificate': '0025731724123933', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index 47d2a6a2836..8469f1d9cc2 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -22,13 +22,10 @@ { - "name" : "Manufacturing Resource Planning", - "version" : "1.1", - "author" : "Tiny", - "website" : "http://www.openerp.com", - "category" : "Generic Modules/Production", - "depends" : ["stock", "hr", "purchase", "product","process"], - "description": """ + 'name': 'Manufacturing Resource Planning', + 'version': '1.1', + 'category': 'Generic Modules/Production', + 'description': """ This is the base module to manage the manufacturing process in Open ERP. Features: @@ -59,22 +56,20 @@ 'website': 'http://www.openerp.com', 'depends': ['stock', 'hr', 'purchase', 'product', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/mrp_security.xml', - 'security/ir.model.access.csv', - 'mrp_workflow.xml', - 'mrp_data.xml', - 'mrp_view.xml', - 'mrp_wizard.xml', - 'mrp_report.xml', - 'company_view.xml', - 'process/stockable_product_process.xml', - 'process/service_product_process.xml', - 'process/procurement_process.xml' - ], + 'update_xml': [ 'security/mrp_security.xml', + 'security/ir.model.access.csv', + 'mrp_workflow.xml', + 'mrp_data.xml', + 'mrp_view.xml', + 'mrp_wizard.xml', + 'mrp_report.xml', + 'company_view.xml', + 'process/stockable_product_process.xml', + 'process/service_product_process.xml', + 'process/procurement_process.xml'], 'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'], 'installable': True, 'active': False, - 'certificate': '32052481373', + 'certificate': '009574614938141', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_jit/__terp__.py b/addons/mrp_jit/__terp__.py index 399419d0d82..75954145503 100644 --- a/addons/mrp_jit/__terp__.py +++ b/addons/mrp_jit/__terp__.py @@ -42,6 +42,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '86634760061', + 'certificate': '0016456348340989', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_operations/__terp__.py b/addons/mrp_operations/__terp__.py index ed7f848fe5f..00c430c8036 100644 --- a/addons/mrp_operations/__terp__.py +++ b/addons/mrp_operations/__terp__.py @@ -54,16 +54,14 @@ 'website': 'http://www.openerp.com', 'depends': ['stock', 'hr', 'purchase', 'product', 'mrp'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'mrp_operations_workflow.xml', - 'mrp_operations_view.xml', - 'mrp_operations_report.xml', - 'process/mrp_operation_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'mrp_operations_workflow.xml', + 'mrp_operations_view.xml', + 'mrp_operations_report.xml', + 'process/mrp_operation_process.xml'], 'demo_xml': ['mrp_operation_data.xml'], 'installable': True, 'active': False, - 'certificate': '56233813133', + 'certificate': '0016755442036509', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_repair/__terp__.py b/addons/mrp_repair/__terp__.py index 380e02a6c67..5202e722bbe 100644 --- a/addons/mrp_repair/__terp__.py +++ b/addons/mrp_repair/__terp__.py @@ -36,17 +36,15 @@ """, 'author': 'Tiny', 'depends': ['base', 'sale', 'account'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'mrp_repair_sequence.xml', - 'mrp_repair_wizard.xml', - 'mrp_repair_view.xml', - 'mrp_repair_workflow.xml', - 'mrp_repair_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'mrp_repair_sequence.xml', + 'mrp_repair_wizard.xml', + 'mrp_repair_view.xml', + 'mrp_repair_workflow.xml', + 'mrp_repair_report.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '60814381277', + 'certificate': '0019747418778941', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py index 80181422a55..c6f0590de28 100644 --- a/addons/mrp_subproduct/__terp__.py +++ b/addons/mrp_subproduct/__terp__.py @@ -41,6 +41,6 @@ With this module: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '50060616733', + 'certificate': '0010472212219869', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/__terp__.py b/addons/point_of_sale/__terp__.py index 46e6f519b08..6377d9d59ef 100644 --- a/addons/point_of_sale/__terp__.py +++ b/addons/point_of_sale/__terp__.py @@ -38,18 +38,16 @@ Main features : 'author': 'Tiny', 'depends': ['sale', 'purchase', 'account', 'account_tax_include'], 'init_xml': [], - 'update_xml': [ - 'security/point_of_sale_security.xml', - 'security/ir.model.access.csv', - 'pos_report.xml', - 'pos_wizard.xml', - 'pos_view.xml', - 'pos_sequence.xml', - 'pos_data.xml', - 'pos_workflow.xml' - ], + 'update_xml': [ 'security/point_of_sale_security.xml', + 'security/ir.model.access.csv', + 'pos_report.xml', + 'pos_wizard.xml', + 'pos_view.xml', + 'pos_sequence.xml', + 'pos_data.xml', + 'pos_workflow.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '48272150909', + 'certificate': '0014361891603101', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/process/__terp__.py b/addons/process/__terp__.py index b76360ee420..ac203b938ce 100644 --- a/addons/process/__terp__.py +++ b/addons/process/__terp__.py @@ -36,6 +36,6 @@ This module allows you to manage your process for the end-users. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '55447636669', + 'certificate': '0021841841982765', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py index 568471df253..23aa914b798 100644 --- a/addons/product/__terp__.py +++ b/addons/product/__terp__.py @@ -22,14 +22,10 @@ { - "name" : "Products & Pricelists", - "version" : "1.1", - "author" : "Tiny", - "category" : "Generic Modules/Inventory Control", - "depends" : ["base", "process"], - "init_xml" : [], - "demo_xml" : ["product_demo.xml"], - "description": """ + 'name': 'Products & Pricelists', + 'version': '1.1', + 'category': 'Generic Modules/Inventory Control', + 'description': """ This is the base module for managing products and pricelists in Open ERP. Products support variants, different pricing methods, suppliers @@ -50,20 +46,18 @@ 'author': 'Tiny', 'depends': ['base', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/product_security.xml', - 'security/ir.model.access.csv', - 'product_data.xml', - 'product_report.xml', - 'product_view.xml', - 'pricelist_view.xml', - 'partner_view.xml', - 'product_wizard.xml', - 'process/product_process.xml' - ], + 'update_xml': [ 'security/product_security.xml', + 'security/ir.model.access.csv', + 'product_data.xml', + 'product_report.xml', + 'product_view.xml', + 'pricelist_view.xml', + 'partner_view.xml', + 'product_wizard.xml', + 'process/product_process.xml'], 'demo_xml': ['product_demo.xml'], 'installable': True, 'active': False, - 'certificate': '68861431437', + 'certificate': '0025731486276829', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product_margin/__terp__.py b/addons/product_margin/__terp__.py index 0096c61abe6..7c983946613 100644 --- a/addons/product_margin/__terp__.py +++ b/addons/product_margin/__terp__.py @@ -36,6 +36,6 @@ the report has several options to help you get the data you need. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '64392591773', + 'certificate': '0021542640008861', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_accounting/__terp__.py b/addons/profile_accounting/__terp__.py index 73f6f984624..de397d2a63e 100644 --- a/addons/profile_accounting/__terp__.py +++ b/addons/profile_accounting/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '38455352045', + 'certificate': '008676896400205', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_association/__terp__.py b/addons/profile_association/__terp__.py index 7a7efca044b..2c357e73080 100644 --- a/addons/profile_association/__terp__.py +++ b/addons/profile_association/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '78696047261', + 'certificate': '0022739451927261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_auction/__terp__.py b/addons/profile_auction/__terp__.py index 997087a1049..44b08959c09 100644 --- a/addons/profile_auction/__terp__.py +++ b/addons/profile_auction/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '65280135565', + 'certificate': '0022739451927261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_crm/__terp__.py b/addons/profile_crm/__terp__.py index bbee7356313..3c24f777121 100644 --- a/addons/profile_crm/__terp__.py +++ b/addons/profile_crm/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '73301264221', + 'certificate': '0017653158886645', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_manufacturing/__terp__.py b/addons/profile_manufacturing/__terp__.py index 167343d05de..906be82f08c 100644 --- a/addons/profile_manufacturing/__terp__.py +++ b/addons/profile_manufacturing/__terp__.py @@ -27,11 +27,16 @@ 'category': 'Profile', 'description': """Profile for manufacturing industries""", 'author': 'Tiny', - 'depends': ['mrp', 'sale', 'delivery', 'board_manufacturing', 'product_margin', 'sale_delivery_report'], + 'depends': [ 'mrp', + 'sale', + 'delivery', + 'board_manufacturing', + 'product_margin', + 'sale_delivery_report'], 'update_xml': ['security/ir.model.access.csv', 'profile_manufacturing.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '27737506213', + 'certificate': '0013464299079029', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_service/__terp__.py b/addons/profile_service/__terp__.py index 828722a2389..7c86f2d7aef 100644 --- a/addons/profile_service/__terp__.py +++ b/addons/profile_service/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '30405502077', + 'certificate': '0023038656317629', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py index 01059dc193e..78a85dc082c 100644 --- a/addons/project/__terp__.py +++ b/addons/project/__terp__.py @@ -22,29 +22,26 @@ { - "name" : "Project Management", - "version": "1.1", - "author" : "Tiny", - "website" : "http://www.openerp.com", - "category" : "Generic Modules/Projects & Services", - "depends" : ["product", "account", "hr", "process"], - "description": """Project management module that track multi-level projects, tasks, + 'name': 'Project Management', + 'version': '1.1', + 'category': 'Generic Modules/Projects & Services', + 'description': """Project management module that track multi-level projects, tasks, works done on tasks, eso. It is able to render planning, order tasks, eso. """, - "init_xml" : [], - "demo_xml" : ["project_demo.xml"], - "update_xml": [ - "security/project_security.xml", - "security/ir.model.access.csv", - "project_data.xml", - "project_wizard.xml", - "project_view.xml", - "project_report.xml", - "process/task_process.xml" - ], + 'author': 'Tiny', + 'website': 'http://www.openerp.com', + 'depends': ['product', 'account', 'hr', 'process'], + 'init_xml': [], + 'update_xml': [ 'security/project_security.xml', + 'security/ir.model.access.csv', + 'project_data.xml', + 'project_wizard.xml', + 'project_view.xml', + 'project_report.xml', + 'process/task_process.xml'], 'demo_xml': ['project_demo.xml'], 'installable': True, 'active': False, - 'certificate': '75116868317', + 'certificate': '0020645028723437', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_gtd/__terp__.py b/addons/project_gtd/__terp__.py index 272c7e69a12..e628e500817 100644 --- a/addons/project_gtd/__terp__.py +++ b/addons/project_gtd/__terp__.py @@ -41,14 +41,12 @@ performing those tasks. 'author': 'Tiny', 'depends': ['project'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'project_gtd_view.xml', - 'project_gtd_wizard.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'project_gtd_view.xml', + 'project_gtd_wizard.xml'], 'demo_xml': ['project_gtd_demo.xml'], 'installable': True, 'active': False, - 'certificate': '43525236301', + 'certificate': '0022739115882013', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_mrp/__terp__.py b/addons/project_mrp/__terp__.py index f1da23862e1..b7990b7d9ff 100644 --- a/addons/project_mrp/__terp__.py +++ b/addons/project_mrp/__terp__.py @@ -40,6 +40,6 @@ created by sales orders. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '31976495453', + 'certificate': '0025132707027485', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_retro_planning/__terp__.py b/addons/project_retro_planning/__terp__.py index 14cb39754e8..032ebce2879 100644 --- a/addons/project_retro_planning/__terp__.py +++ b/addons/project_retro_planning/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '57235475485', + 'certificate': '0014660963339373', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/__terp__.py b/addons/project_timesheet/__terp__.py index d764fc80684..d82bcbf86c3 100644 --- a/addons/project_timesheet/__terp__.py +++ b/addons/project_timesheet/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '75123647453', + 'certificate': '0017952200286749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py index f66c1d75dbe..90624337a13 100644 --- a/addons/purchase/__terp__.py +++ b/addons/purchase/__terp__.py @@ -31,22 +31,20 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'account', 'stock', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/purchase_security.xml', - 'security/ir.model.access.csv', - 'purchase_workflow.xml', - 'purchase_sequence.xml', - 'purchase_data.xml', - 'purchase_view.xml', - 'purchase_report.xml', - 'purchase_wizard.xml', - 'stock_view.xml', - 'partner_view.xml', - 'process/purchase_process.xml' - ], + 'update_xml': [ 'security/purchase_security.xml', + 'security/ir.model.access.csv', + 'purchase_workflow.xml', + 'purchase_sequence.xml', + 'purchase_data.xml', + 'purchase_view.xml', + 'purchase_report.xml', + 'purchase_wizard.xml', + 'stock_view.xml', + 'partner_view.xml', + 'process/purchase_process.xml'], 'demo_xml': ['purchase_demo.xml'], 'installable': True, 'active': False, - 'certificate': '57234283549', + 'certificate': '0014361760229405', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_analytic_plans/__terp__.py b/addons/purchase_analytic_plans/__terp__.py index c639aa1eb66..dd5282287fb 100644 --- a/addons/purchase_analytic_plans/__terp__.py +++ b/addons/purchase_analytic_plans/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '62176518909', + 'certificate': '0013463950193309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_account/__terp__.py b/addons/report_account/__terp__.py index 2b568ce08b0..62c19c659a5 100644 --- a/addons/report_account/__terp__.py +++ b/addons/report_account/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '61754222813', + 'certificate': '0023038913848749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic/__terp__.py b/addons/report_analytic/__terp__.py index 0d072fcf1ef..3e400773397 100644 --- a/addons/report_analytic/__terp__.py +++ b/addons/report_analytic/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '59950675429', + 'certificate': '0015259537848101', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_line/__terp__.py b/addons/report_analytic_line/__terp__.py index 905eca096eb..e6b7051e1da 100644 --- a/addons/report_analytic_line/__terp__.py +++ b/addons/report_analytic_line/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '75179053853', + 'certificate': '0025731773908989', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_planning/__terp__.py b/addons/report_analytic_planning/__terp__.py index 73a71fc0bca..d9a870cd17d 100644 --- a/addons/report_analytic_planning/__terp__.py +++ b/addons/report_analytic_planning/__terp__.py @@ -30,14 +30,12 @@ 'website': 'http://www.openerp.com', 'depends': ['account', 'hr_timesheet_invoice', 'project', 'report_analytic_line'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'report_analytic_planning_view.xml', - 'report_analytic_planning_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'report_analytic_planning_view.xml', + 'report_analytic_planning_report.xml'], 'demo_xml': ['report_account_analytic.planning.csv'], 'installable': True, 'active': False, - 'certificate': '34901836973', + 'certificate': '0019149225704477', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_crm/__terp__.py b/addons/report_crm/__terp__.py index 35ea350abf8..c42b2c97b6a 100644 --- a/addons/report_crm/__terp__.py +++ b/addons/report_crm/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '30422968285', + 'certificate': '008976199060109', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_document/__terp__.py b/addons/report_document/__terp__.py index d6ae3bccef3..8c9e9374df2 100644 --- a/addons/report_document/__terp__.py +++ b/addons/report_document/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '68012774557', + 'certificate': '0016456365242269', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/__terp__.py b/addons/report_intrastat/__terp__.py index f23feae9786..08f8bb1950d 100644 --- a/addons/report_intrastat/__terp__.py +++ b/addons/report_intrastat/__terp__.py @@ -30,14 +30,12 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'product', 'stock', 'sale', 'purchase'], 'init_xml': ['report_intrastat_data.xml'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'report_intrastat_view.xml', - 'intrastat_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'report_intrastat_view.xml', + 'intrastat_report.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '56982189085', + 'certificate': '0027227801344045', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_mrp/__terp__.py b/addons/report_mrp/__terp__.py index 4e75a21e41d..d5958a90d6e 100644 --- a/addons/report_mrp/__terp__.py +++ b/addons/report_mrp/__terp__.py @@ -34,6 +34,6 @@ 'update_xml': ['security/ir.model.access.csv', 'report_mrp_view.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '71582896029', + 'certificate': '0011070646110413', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_project/__terp__.py b/addons/report_project/__terp__.py index c88f64c45e2..b4bae62699f 100644 --- a/addons/report_project/__terp__.py +++ b/addons/report_project/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '86804423149', + 'certificate': '0016755572187229', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py index 5cc72c7de17..e5f1a6e6b07 100644 --- a/addons/report_purchase/__terp__.py +++ b/addons/report_purchase/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '73370750365', + 'certificate': '0019149228485661', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_sale/__terp__.py b/addons/report_sale/__terp__.py index 6f8f4408c49..45a28f2651b 100644 --- a/addons/report_sale/__terp__.py +++ b/addons/report_sale/__terp__.py @@ -40,14 +40,12 @@ 'website': 'http://www.openerp.com', 'depends': ['sale'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'report_sale_view.xml', - 'report_sale_graph.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'report_sale_view.xml', + 'report_sale_graph.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '59949739573', + 'certificate': '0027527007452477', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_task/__terp__.py b/addons/report_task/__terp__.py index 4784e0d6c87..9f091656c7a 100644 --- a/addons/report_task/__terp__.py +++ b/addons/report_task/__terp__.py @@ -32,6 +32,6 @@ 'update_xml': ['security/ir.model.access.csv', 'report_task_view.xml'], 'installable': True, 'active': False, - 'certificate': '27671328157', + 'certificate': '0026629187427709', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py index bdf3189755f..8dc1c45977f 100644 --- a/addons/report_timesheet/__terp__.py +++ b/addons/report_timesheet/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '78701510301', + 'certificate': '0016156980258077', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/__terp__.py b/addons/sale/__terp__.py index 3f1a147e541..a18923b3312 100644 --- a/addons/sale/__terp__.py +++ b/addons/sale/__terp__.py @@ -45,23 +45,21 @@ 'website': 'http://www.openerp.com', 'depends': ['product', 'stock', 'mrp', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/sale_security.xml', - 'security/ir.model.access.csv', - 'sale_workflow.xml', - 'sale_sequence.xml', - 'sale_data.xml', - 'sale_wizard.xml', - 'sale_view.xml', - 'sale_report.xml', - 'sale_wizard.xml', - 'stock_view.xml', - 'process/sale_process.xml', - 'product_view.xml' - ], + 'update_xml': [ 'security/sale_security.xml', + 'security/ir.model.access.csv', + 'sale_workflow.xml', + 'sale_sequence.xml', + 'sale_data.xml', + 'sale_wizard.xml', + 'sale_view.xml', + 'sale_report.xml', + 'sale_wizard.xml', + 'stock_view.xml', + 'process/sale_process.xml', + 'product_view.xml'], 'demo_xml': ['sale_demo.xml'], 'installable': True, 'active': False, - 'certificate': '58103601429', + 'certificate': '0013763479809933', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_analytic_plans/__terp__.py b/addons/sale_analytic_plans/__terp__.py index 09583f59f11..60d87ab3582 100644 --- a/addons/sale_analytic_plans/__terp__.py +++ b/addons/sale_analytic_plans/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '66055860861', + 'certificate': '0024833956156349', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_crm/__terp__.py b/addons/sale_crm/__terp__.py index e950030db95..ad9675217ec 100644 --- a/addons/sale_crm/__terp__.py +++ b/addons/sale_crm/__terp__.py @@ -46,6 +46,6 @@ crm_configuration modules. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '64360130141', + 'certificate': '0025432520667869', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_delivery_report/__terp__.py b/addons/sale_delivery_report/__terp__.py index 32084e730eb..5df5c2c7635 100644 --- a/addons/sale_delivery_report/__terp__.py +++ b/addons/sale_delivery_report/__terp__.py @@ -29,12 +29,10 @@ 'author': 'Tiny', 'depends': ['sale', 'delivery'], 'init_xml': [], - 'update_xml': [ - 'delivery_report.xml' - ], + 'update_xml': ['delivery_report.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '803459507494914221', + 'certificate': '0026629095848845', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_journal/__terp__.py b/addons/sale_journal/__terp__.py index b03479be8b8..838e4e1c622 100644 --- a/addons/sale_journal/__terp__.py +++ b/addons/sale_journal/__terp__.py @@ -52,15 +52,13 @@ 'website': 'http://www.openerp.com', 'depends': ['stock', 'sale'], 'init_xml': ['sale_journal_data.xml'], - 'update_xml': [ - 'security/ir.model.access.csv', - 'sale_journal_view.xml', - 'picking_journal_view.xml', - 'picking_journal_view_report.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'sale_journal_view.xml', + 'picking_journal_view.xml', + 'picking_journal_view_report.xml'], 'demo_xml': ['sale_journal_demo.xml'], 'installable': True, 'active': False, - 'certificate': '77661619085', + 'certificate': '0021841915965053', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/scrum/__terp__.py b/addons/scrum/__terp__.py index 3915aa5e57a..e43cf21e7ca 100644 --- a/addons/scrum/__terp__.py +++ b/addons/scrum/__terp__.py @@ -50,16 +50,14 @@ 'author': 'Tiny', 'depends': ['project', 'process'], 'init_xml': [], - 'update_xml': [ - 'security/ir.model.access.csv', - 'scrum_view.xml', - 'scrum_report.xml', - 'scrum_wizard.xml', - 'process/scrum_process.xml' - ], + 'update_xml': [ 'security/ir.model.access.csv', + 'scrum_view.xml', + 'scrum_report.xml', + 'scrum_wizard.xml', + 'process/scrum_process.xml'], 'demo_xml': ['scrum_demo.xml'], 'installable': True, 'active': False, - 'certificate': '84121063261', + 'certificate': '0012566677771565', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index fff0e892b82..3e14a6e1f93 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -22,10 +22,10 @@ { - "name" : "Stock Management", - "version" : "1.1", - "author" : "Tiny", - "description" : """OpenERP Stock Management module can manage multi-warehouses, multi and structured stock locations. + 'name': 'Stock Management', + 'version': '1.1', + 'category': 'Generic Modules/Inventory Control', + 'description': """OpenERP Stock Management module can manage multi-warehouses, multi and structured stock locations. Thanks to the double entry management, the inventory controlling is powerful and flexible: * Moves history and planning, * Different inventory methods (FIFO, LIFO, ...) @@ -36,29 +36,26 @@ Thanks to the double entry management, the inventory controlling is powerful and * Rapid detection of mistakes through double entry system * Traceability (upstream/downstream, production lots, serial number, ...) """, - "website" : "http://www.openerp.com", - "depends" : ["product", "account"], - "category" : "Generic Modules/Inventory Control", - "init_xml" : [], - "demo_xml" : ["stock_demo.xml"], - "update_xml" : [ - "stock_workflow.xml", - "stock_data.xml", - "stock_incoterms.xml", - "stock_wizard.xml", - "stock_view.xml", - "stock_report.xml", - "stock_sequence.xml", - "product_data.xml", - "product_view.xml", - "partner_view.xml", - "report_stock_view.xml", - "security/stock_security.xml", - "security/ir.model.access.csv", - ], + 'author': 'Tiny', + 'website': 'http://www.openerp.com', + 'depends': ['product', 'account'], + 'init_xml': [], + 'update_xml': [ 'stock_workflow.xml', + 'stock_data.xml', + 'stock_incoterms.xml', + 'stock_wizard.xml', + 'stock_view.xml', + 'stock_report.xml', + 'stock_sequence.xml', + 'product_data.xml', + 'product_view.xml', + 'partner_view.xml', + 'report_stock_view.xml', + 'security/stock_security.xml', + 'security/ir.model.access.csv'], 'demo_xml': ['stock_demo.xml'], 'installable': True, 'active': False, - 'certificate': '55421559965', + 'certificate': '0023038870767557', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_invoice_directly/__terp__.py b/addons/stock_invoice_directly/__terp__.py index e89b1b2d56d..09a4cb056b2 100644 --- a/addons/stock_invoice_directly/__terp__.py +++ b/addons/stock_invoice_directly/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '81385081261', + 'certificate': '008676896670253', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_location/__terp__.py b/addons/stock_location/__terp__.py index 42b9f52eeb0..64bc6ba15cc 100644 --- a/addons/stock_location/__terp__.py +++ b/addons/stock_location/__terp__.py @@ -44,6 +44,6 @@ This module may be useful for different purposes: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '46505115101', + 'certificate': '0026928300011069', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_no_autopicking/__terp__.py b/addons/stock_no_autopicking/__terp__.py index 31a01a2ae93..32f2af4b1a7 100644 --- a/addons/stock_no_autopicking/__terp__.py +++ b/addons/stock_no_autopicking/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '75124168925', + 'certificate': '0015259369768829', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/subscription/__terp__.py b/addons/subscription/__terp__.py index 97e2f7cef54..8c4ee6680b0 100644 --- a/addons/subscription/__terp__.py +++ b/addons/subscription/__terp__.py @@ -33,6 +33,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '29454782573', + 'certificate': '0025731569029469', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/warning/__terp__.py b/addons/warning/__terp__.py index 09c6cdc854e..9248ba63fc1 100644 --- a/addons/warning/__terp__.py +++ b/addons/warning/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '80334018749', + 'certificate': '0017054645297021', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/__terp__.py b/addons/wiki/__terp__.py index 6ed97909ded..20c8ad34f3a 100644 --- a/addons/wiki/__terp__.py +++ b/addons/wiki/__terp__.py @@ -13,16 +13,14 @@ 'website': 'http://openerp.com', 'depends': ['base'], 'init_xml': [], - 'update_xml': [ - 'wiki_view.xml', - 'data/wiki_quickstart.xml', - 'data/wiki_main.xml', - 'wizard/wizard_view.xml', - 'security/ir.model.access.csv' - ], + 'update_xml': [ 'wiki_view.xml', + 'data/wiki_quickstart.xml', + 'data/wiki_main.xml', + 'wizard/wizard_view.xml', + 'security/ir.model.access.csv'], 'demo_xml': ['data/wiki_faq.xml'], 'installable': True, 'active': False, - 'certificate': '86363630317', + 'certificate': '009574612852253', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 6f9fd16ecde19a895eb790cfb3fcb8c44b030eab Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 17:13:00 +0100 Subject: [PATCH 35/92] [FIX] Use the picture widget instead of image, because it's a readonly field lp bug: https://launchpad.net/bugs/324830 fixed bzr revid: stephane@tinyerp.com-20090203161300-95yds9v0k0js4tyt --- bin/addons/base/ir/ir.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index 9a6bf4a0503..3f4d1635250 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -583,7 +583,7 @@ <separator string="Preview" colspan="4"/> <field name="preview" - widget="image" + widget="picture" readonly="1" nolabel="1" colspan="4" From 6c78bfe44e5986b88ca9e95188bd62969ab34ce5 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 17:54:02 +0100 Subject: [PATCH 36/92] [FIX] Revert bzr revid: stephane@tinyerp.com-20090203165402-ge1pi3i0r8xn1ynq --- addons/account/__terp__.py | 64 ++++++++++--------- addons/account_analytic_analysis/__terp__.py | 23 ++++--- addons/account_analytic_default/__terp__.py | 2 +- addons/account_analytic_plans/__terp__.py | 12 ++-- addons/account_balance/__terp__.py | 2 +- addons/account_budget/__terp__.py | 14 ++-- addons/account_chart/__terp__.py | 2 +- addons/account_date_check/__terp__.py | 2 +- addons/account_followup/__terp__.py | 12 ++-- addons/account_invoice_layout/__terp__.py | 10 +-- addons/account_payment/__terp__.py | 31 +++++---- addons/account_report/__terp__.py | 12 ++-- addons/account_reporting/__terp__.py | 12 ++-- addons/account_tax_include/__terp__.py | 2 +- addons/account_voucher/__terp__.py | 14 ++-- .../analytic_journal_billing_rate/__terp__.py | 2 +- addons/analytic_user_function/__terp__.py | 2 +- addons/auction/__terp__.py | 12 ++-- addons/audittrail/__terp__.py | 10 +-- addons/base_contact/__terp__.py | 10 +-- addons/base_iban/__terp__.py | 2 +- addons/base_module_merge/__terp__.py | 2 +- addons/base_module_publish/__terp__.py | 2 +- addons/base_module_record/__terp__.py | 2 +- addons/base_report_creator/__terp__.py | 10 +-- addons/base_report_designer/__terp__.py | 2 +- addons/base_setup/__terp__.py | 2 +- addons/base_vat/__terp__.py | 2 +- addons/board/__terp__.py | 2 +- addons/board_account/__terp__.py | 18 +++--- addons/board_association/__terp__.py | 2 +- addons/board_auction/__terp__.py | 2 +- addons/board_crm_configuration/__terp__.py | 2 +- addons/board_document/__terp__.py | 2 +- addons/board_manufacturing/__terp__.py | 2 +- addons/board_project/__terp__.py | 18 +++--- addons/board_sale/__terp__.py | 2 +- addons/crm/__terp__.py | 14 ++-- addons/crm_configuration/__terp__.py | 26 ++++---- addons/crm_profiling/__terp__.py | 2 +- addons/crm_vertical/__terp__.py | 2 +- addons/delivery/__terp__.py | 12 ++-- addons/document/__terp__.py | 12 ++-- addons/document_ics/__terp__.py | 2 +- addons/event/__terp__.py | 14 ++-- addons/event_project/__terp__.py | 2 +- addons/google_map/__terp__.py | 2 +- addons/hr/__terp__.py | 26 ++++---- addons/hr_attendance/__terp__.py | 14 ++-- addons/hr_contract/__terp__.py | 10 +-- addons/hr_expense/__terp__.py | 16 +++-- addons/hr_holidays/__terp__.py | 26 ++++---- addons/hr_timesheet/__terp__.py | 14 ++-- addons/hr_timesheet_invoice/__terp__.py | 12 ++-- addons/hr_timesheet_sheet/__terp__.py | 12 ++-- addons/idea/__terp__.py | 12 ++-- addons/l10n_be/__terp__.py | 24 +++++-- addons/l10n_chart_uk_minimal/__terp__.py | 50 +++++++++++++-- addons/l10n_fr/__terp__.py | 50 ++++++++------- addons/l10n_lu/__terp__.py | 14 ++-- addons/membership/__terp__.py | 12 ++-- addons/mrp/__terp__.py | 37 ++++++----- addons/mrp_jit/__terp__.py | 2 +- addons/mrp_operations/__terp__.py | 14 ++-- addons/mrp_repair/__terp__.py | 16 +++-- addons/mrp_subproduct/__terp__.py | 2 +- addons/point_of_sale/__terp__.py | 20 +++--- addons/process/__terp__.py | 2 +- addons/product/__terp__.py | 34 ++++++---- addons/product_margin/__terp__.py | 2 +- addons/profile_accounting/__terp__.py | 2 +- addons/profile_association/__terp__.py | 2 +- addons/profile_auction/__terp__.py | 2 +- addons/profile_crm/__terp__.py | 2 +- addons/profile_manufacturing/__terp__.py | 9 +-- addons/profile_service/__terp__.py | 2 +- addons/project/__terp__.py | 35 +++++----- addons/project_gtd/__terp__.py | 10 +-- addons/project_mrp/__terp__.py | 2 +- addons/project_retro_planning/__terp__.py | 2 +- addons/project_timesheet/__terp__.py | 2 +- addons/purchase/__terp__.py | 26 ++++---- addons/purchase_analytic_plans/__terp__.py | 2 +- addons/report_account/__terp__.py | 2 +- addons/report_analytic/__terp__.py | 2 +- addons/report_analytic_line/__terp__.py | 2 +- addons/report_analytic_planning/__terp__.py | 10 +-- addons/report_crm/__terp__.py | 2 +- addons/report_document/__terp__.py | 2 +- addons/report_intrastat/__terp__.py | 10 +-- addons/report_mrp/__terp__.py | 2 +- addons/report_project/__terp__.py | 2 +- addons/report_purchase/__terp__.py | 2 +- addons/report_sale/__terp__.py | 10 +-- addons/report_task/__terp__.py | 2 +- addons/report_timesheet/__terp__.py | 2 +- addons/sale/__terp__.py | 28 ++++---- addons/sale_analytic_plans/__terp__.py | 2 +- addons/sale_crm/__terp__.py | 2 +- addons/sale_delivery_report/__terp__.py | 6 +- addons/sale_journal/__terp__.py | 12 ++-- addons/scrum/__terp__.py | 14 ++-- addons/stock/__terp__.py | 47 +++++++------- addons/stock_invoice_directly/__terp__.py | 2 +- addons/stock_location/__terp__.py | 2 +- addons/stock_no_autopicking/__terp__.py | 2 +- addons/subscription/__terp__.py | 2 +- addons/warning/__terp__.py | 2 +- addons/wiki/__terp__.py | 14 ++-- 109 files changed, 642 insertions(+), 474 deletions(-) diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index 3caedb2b285..eb9786c9d63 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -22,9 +22,11 @@ { - 'name': 'Accounting and financial management', - 'version': '1.1', - 'description': """Financial and accounting module that covers: + "name" : "Accounting and financial management", + "version" : "1.1", + "depends" : ["product", "base", "process"], + "author" : "Tiny", + "description": """Financial and accounting module that covers: General accounting Cost / Analytic accounting Third party accounting @@ -37,33 +39,37 @@ 'website': 'http://www.openerp.com', 'depends': ['product', 'base', 'process'], 'init_xml': [], - 'update_xml': [ 'security/account_security.xml', - 'security/ir.model.access.csv', - 'account_menuitem.xml', - 'account_wizard.xml', - 'account_view.xml', - 'account_end_fy.xml', - 'account_invoice_view.xml', - 'account_report.xml', - 'partner_view.xml', - 'data/account_invoice.xml', - 'data/account_data2.xml', - 'account_invoice_workflow.xml', - 'project/project_view.xml', - 'project/project_report.xml', - 'product_view.xml', - 'account_assert_test.xml', - 'process/statement_process.xml', - 'process/customer_invoice_process.xml', - 'process/supplier_invoice_process.xml', - 'sequence_view.xml'], - 'demo_xml': [ 'account_demo.xml', - 'project/project_demo.xml', - 'project/analytic_account_demo.xml', - 'demo/account_minimal.xml', - 'account_unit_test.xml'], + 'update_xml': [ + 'security/account_security.xml', + 'security/ir.model.access.csv', + 'account_menuitem.xml', + 'account_wizard.xml', + 'account_view.xml', + 'account_end_fy.xml', + 'account_invoice_view.xml', + 'account_report.xml', + 'partner_view.xml', + 'data/account_invoice.xml', + 'data/account_data2.xml', + 'account_invoice_workflow.xml', + 'project/project_view.xml', + 'project/project_report.xml', + 'product_view.xml', + 'account_assert_test.xml', + 'process/statement_process.xml', + 'process/customer_invoice_process.xml', + 'process/supplier_invoice_process.xml', + 'sequence_view.xml' + ], + 'demo_xml': [ + 'account_demo.xml', + 'project/project_demo.xml', + 'project/analytic_account_demo.xml', + 'demo/account_minimal.xml', + 'account_unit_test.xml' + ], 'installable': True, 'active': False, - 'certificate': '0021841915058685', + 'certificate': '80331923549', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_analysis/__terp__.py b/addons/account_analytic_analysis/__terp__.py index 52d95bbfe4d..b45b828c2a8 100644 --- a/addons/account_analytic_analysis/__terp__.py +++ b/addons/account_analytic_analysis/__terp__.py @@ -23,21 +23,26 @@ { 'name': 'report_account_analytic', - 'version': '1.1', + 'version': '1.0', 'category': 'Generic Modules/Accounting', 'description': """Modify account analytic view to show important data for project manager of services companies. Add menu to show relevant information for each manager.""", - 'author': 'Camptocamp', - 'website': 'http://www.camptocamp.com/', - 'depends': ['account', 'hr_timesheet', 'hr_timesheet_invoice', 'project'], - 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'account_analytic_analysis_view.xml', - 'account_analytic_analysis_menu.xml'], + "version" : "1.1", + "author" : "Camptocamp", + "category" : "Generic Modules/Accounting", + "module": "", + "website": "http://www.camptocamp.com/", + "depends" : ["account","hr_timesheet","hr_timesheet_invoice","project"], + "init_xml" : [], + "update_xml" : [ + "security/ir.model.access.csv", + "account_analytic_analysis_view.xml", + "account_analytic_analysis_menu.xml", + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0018849810007757', + 'certificate': '42927202589', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_default/__terp__.py b/addons/account_analytic_default/__terp__.py index 88075ef8ba0..ae3e599119d 100644 --- a/addons/account_analytic_default/__terp__.py +++ b/addons/account_analytic_default/__terp__.py @@ -41,6 +41,6 @@ Allows to automatically select analytic accounts based on criterions: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0012267336671725', + 'certificate': '74229833581', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/__terp__.py b/addons/account_analytic_plans/__terp__.py index 8b082c0477a..722bf2727d3 100644 --- a/addons/account_analytic_plans/__terp__.py +++ b/addons/account_analytic_plans/__terp__.py @@ -57,13 +57,15 @@ for one account entry. 'website': 'http://www.openerp.com', 'depends': ['account', 'account_analytic_default'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'model_wizard.xml', - 'account_analytic_plans_view.xml', - 'account_analytic_plans_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'model_wizard.xml', + 'account_analytic_plans_view.xml', + 'account_analytic_plans_report.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0018550331377437', + 'certificate': '36417675373', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_balance/__terp__.py b/addons/account_balance/__terp__.py index 968047324f0..05de61e62ae 100644 --- a/addons/account_balance/__terp__.py +++ b/addons/account_balance/__terp__.py @@ -47,6 +47,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '009275148897645', + 'certificate': '81928745309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/__terp__.py b/addons/account_budget/__terp__.py index 979e188cf58..bcb1ab7ffd6 100644 --- a/addons/account_budget/__terp__.py +++ b/addons/account_budget/__terp__.py @@ -48,14 +48,16 @@ Three reports are available: 'website': 'http://www.openerp.com', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'account_budget_wizard.xml', - 'crossovered_budget_view.xml', - 'crossovered_budget_report.xml', - 'crossovered_budget_workflow.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'account_budget_wizard.xml', + 'crossovered_budget_view.xml', + 'crossovered_budget_report.xml', + 'crossovered_budget_workflow.xml' + ], 'demo_xml': ['crossovered_budget_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0020645028723437', + 'certificate': '43819694157', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_chart/__terp__.py b/addons/account_chart/__terp__.py index 37104986f0f..bb3aee9760c 100644 --- a/addons/account_chart/__terp__.py +++ b/addons/account_chart/__terp__.py @@ -33,6 +33,6 @@ 'update_xml': [], 'demo_xml': [], 'installable': True, - 'certificate': '0014960165741629', + 'certificate': '73332443901', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_date_check/__terp__.py b/addons/account_date_check/__terp__.py index 65c047ed913..9f38a0c5305 100644 --- a/addons/account_date_check/__terp__.py +++ b/addons/account_date_check/__terp__.py @@ -42,6 +42,6 @@ period !" 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0010472116996909', + 'certificate': '66174843389', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py index 3f80342abf0..5c58289f215 100644 --- a/addons/account_followup/__terp__.py +++ b/addons/account_followup/__terp__.py @@ -42,13 +42,15 @@ 'website': 'http://www.openerp.com', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'wizard/wizard_view.xml', - 'followup_view.xml', - 'followup_report_view.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'wizard/wizard_view.xml', + 'followup_view.xml', + 'followup_report_view.xml' + ], 'demo_xml': ['followup_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0015558742212861', + 'certificate': '72481076453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_invoice_layout/__terp__.py b/addons/account_invoice_layout/__terp__.py index b78eac44ccc..05389645833 100644 --- a/addons/account_invoice_layout/__terp__.py +++ b/addons/account_invoice_layout/__terp__.py @@ -40,12 +40,14 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'account'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'account_invoice_layout_view.xml', - 'account_invoice_layout_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'account_invoice_layout_view.xml', + 'account_invoice_layout_report.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0025731486677245', + 'certificate': '57235078173', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_payment/__terp__.py b/addons/account_payment/__terp__.py index 8cc543031fc..348b9b1ce08 100644 --- a/addons/account_payment/__terp__.py +++ b/addons/account_payment/__terp__.py @@ -22,10 +22,13 @@ { - 'name': 'Payment Management', - 'version': '1.1', - 'category': 'Generic Modules/Payment', - 'description': """ + "name": "Payment Management", + "version": "1.1", + "author": "Tiny", + "category": "Generic Modules/Payment", + "depends": ["account"], + "init_xml": [], + "description": """ This module provide : * a more efficient way to manage invoice payment. * a basic mechanism to easily plug various automated payment. @@ -33,17 +36,19 @@ 'author': 'Tiny', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ 'security/account_payment_security.xml', - 'security/ir.model.access.csv', - 'payment_wizard.xml', - 'payment_view.xml', - 'payment_workflow.xml', - 'payment_sequence.xml', - 'account_invoice_view.xml', - 'payment_report.xml'], + 'update_xml': [ + 'security/account_payment_security.xml', + 'security/ir.model.access.csv', + 'payment_wizard.xml', + 'payment_view.xml', + 'payment_workflow.xml', + 'payment_sequence.xml', + 'account_invoice_view.xml', + 'payment_report.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0028723518223901', + 'certificate': '61703998541', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report/__terp__.py b/addons/account_report/__terp__.py index ab9a04435b7..1d1ac5ca605 100644 --- a/addons/account_report/__terp__.py +++ b/addons/account_report/__terp__.py @@ -33,13 +33,15 @@ 'website': 'http://www.openerp.com', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'account_view.xml', - 'account_report.xml', - 'account_wizard.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'account_view.xml', + 'account_report.xml', + 'account_wizard.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '009873710157725', + 'certificate': '50976406925', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_reporting/__terp__.py b/addons/account_reporting/__terp__.py index 5509dd645e6..4f98660da09 100644 --- a/addons/account_reporting/__terp__.py +++ b/addons/account_reporting/__terp__.py @@ -30,13 +30,15 @@ 'author': 'Tiny', 'depends': ['account'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'account_view.xml', - 'account_report.xml', - 'account_data.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'account_view.xml', + 'account_report.xml', + 'account_data.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0010472149969149', + 'certificate': '72305016797', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_tax_include/__terp__.py b/addons/account_tax_include/__terp__.py index 4b174647dff..9e8c138cd41 100644 --- a/addons/account_tax_include/__terp__.py +++ b/addons/account_tax_include/__terp__.py @@ -38,6 +38,6 @@ This module implement the modification on the invoice form. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0024534751356253', + 'certificate': '70514190381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py index 2ca77746d34..20c6e7c885a 100755 --- a/addons/account_voucher/__terp__.py +++ b/addons/account_voucher/__terp__.py @@ -39,14 +39,16 @@ Basic Accounting, plus new things that are available: 'website': 'http://www.openerp.com', 'depends': ['base', 'account'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'account_voucher_sequence.xml', - 'account_view.xml', - 'account_report.xml', - 'voucher_view.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'account_voucher_sequence.xml', + 'account_view.xml', + 'account_report.xml', + 'voucher_view.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0013165089564733', + 'certificate': '37580727101', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/analytic_journal_billing_rate/__terp__.py b/addons/analytic_journal_billing_rate/__terp__.py index 52209779563..882ef832758 100644 --- a/addons/analytic_journal_billing_rate/__terp__.py +++ b/addons/analytic_journal_billing_rate/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0012865885319477', + 'certificate': '30271787965', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/analytic_user_function/__terp__.py b/addons/analytic_user_function/__terp__.py index fa1d44a3555..ae5231cb84e 100644 --- a/addons/analytic_user_function/__terp__.py +++ b/addons/analytic_user_function/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0022440249660029', + 'certificate': '82277138269', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/auction/__terp__.py b/addons/auction/__terp__.py index f99092ae1fa..e2e7cd53e11 100644 --- a/addons/auction/__terp__.py +++ b/addons/auction/__terp__.py @@ -33,13 +33,15 @@ 'author': 'Tiny', 'depends': ['base', 'account', 'hr_attendance'], 'init_xml': ['auction_sequence.xml'], - 'update_xml': [ 'security/ir.model.access.csv', - 'auction_view.xml', - 'auction_report.xml', - 'auction_wizard.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'auction_view.xml', + 'auction_report.xml', + 'auction_wizard.xml' + ], 'demo_xml': ['auction_demo.xml'], 'installable': True, 'active': False, - 'certificate': '008676977189565', + 'certificate': '39333102717', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/audittrail/__terp__.py b/addons/audittrail/__terp__.py index 63c0ca8d957..ccd86944270 100644 --- a/addons/audittrail/__terp__.py +++ b/addons/audittrail/__terp__.py @@ -31,12 +31,14 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'account', 'purchase', 'mrp'], 'init_xml': [], - 'update_xml': [ 'audittrail_view.xml', - 'security/ir.model.access.csv', - 'security/audittrail_security.xml'], + 'update_xml': [ + 'audittrail_view.xml', + 'security/ir.model.access.csv', + 'security/audittrail_security.xml' + ], 'demo_xml': ['audittrail_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0010173008267165', + 'certificate': '62572348749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py index 97a8c68c55d..f50bfdef95a 100644 --- a/addons/base_contact/__terp__.py +++ b/addons/base_contact/__terp__.py @@ -43,12 +43,14 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'process'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'base_contact_view.xml', - 'process/base_contact_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'base_contact_view.xml', + 'process/base_contact_process.xml' + ], 'demo_xml': ['base_contact_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0027227757067813', + 'certificate': '31287885469', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_iban/__terp__.py b/addons/base_iban/__terp__.py index 8969e7de62a..d677b401dba 100644 --- a/addons/base_iban/__terp__.py +++ b/addons/base_iban/__terp__.py @@ -35,6 +35,6 @@ This module install the base for IBAN bank accounts. 'update_xml': ['base_iban_view.xml'], 'installable': True, 'active': False, - 'certificate': '0016157146365533', + 'certificate': '50014379549', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_merge/__terp__.py b/addons/base_module_merge/__terp__.py index 7950cce66a3..6d7b4d97fe1 100644 --- a/addons/base_module_merge/__terp__.py +++ b/addons/base_module_merge/__terp__.py @@ -41,6 +41,6 @@ 'update_xml': ['base_module_merge_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '009275389048693', + 'certificate': '35756279709', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_publish/__terp__.py b/addons/base_module_publish/__terp__.py index 257663338ed..af3afdfad0b 100644 --- a/addons/base_module_publish/__terp__.py +++ b/addons/base_module_publish/__terp__.py @@ -43,6 +43,6 @@ to call this button when you want to release a new version of your module. 'update_xml': ['base_module_publish_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '008976182484749', + 'certificate': '67939821245', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_record/__terp__.py b/addons/base_module_record/__terp__.py index 9bb1f76c7de..aaf16cc283f 100644 --- a/addons/base_module_record/__terp__.py +++ b/addons/base_module_record/__terp__.py @@ -51,6 +51,6 @@ How to use it: 'update_xml': ['security/ir.model.access.csv', 'base_module_record_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '0020046809368957', + 'certificate': '83134865813', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_creator/__terp__.py b/addons/base_report_creator/__terp__.py index c9746a4cb50..d95ebf3ef09 100644 --- a/addons/base_report_creator/__terp__.py +++ b/addons/base_report_creator/__terp__.py @@ -36,12 +36,14 @@ the "Dashboard" menu. 'website': '', 'depends': ['base', 'board'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'base_report_creator_wizard.xml', - 'base_report_creator_view.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'base_report_creator_wizard.xml', + 'base_report_creator_view.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0027826168589381', + 'certificate': '31285794149', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/__terp__.py b/addons/base_report_designer/__terp__.py index 9606d7a17ca..38c9eb12b42 100644 --- a/addons/base_report_designer/__terp__.py +++ b/addons/base_report_designer/__terp__.py @@ -37,6 +37,6 @@ OpenOffice. 'demo_xml': ['base_report_data.xml'], 'installable': True, 'active': False, - 'certificate': '0018850014946253', + 'certificate': '56379010493', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_setup/__terp__.py b/addons/base_setup/__terp__.py index 33ecef974ea..d4499f2e093 100644 --- a/addons/base_setup/__terp__.py +++ b/addons/base_setup/__terp__.py @@ -46,6 +46,6 @@ 'demo_xml': ['base_setup_demo.xml'], 'installable': True, 'active': True, - 'certificate': '0021243634084373', + 'certificate': '86711085869', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_vat/__terp__.py b/addons/base_vat/__terp__.py index 7a95130606d..a4e15b75188 100644 --- a/addons/base_vat/__terp__.py +++ b/addons/base_vat/__terp__.py @@ -31,6 +31,6 @@ 'update_xml': ['base_vat_data.xml'], 'installable': True, 'active': False, - 'certificate': '0014361902367773', + 'certificate': '84849360989', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board/__terp__.py b/addons/board/__terp__.py index 1f285501513..fe03a113ea3 100644 --- a/addons/board/__terp__.py +++ b/addons/board/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '008676896805277', + 'certificate': '76912305725', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_account/__terp__.py b/addons/board_account/__terp__.py index b468abf2748..e44cc0b45c5 100644 --- a/addons/board_account/__terp__.py +++ b/addons/board_account/__terp__.py @@ -35,17 +35,19 @@ * Graph of aged incomes """, 'author': 'Tiny', - 'depends': [ 'account', - 'hr_timesheet_invoice', - 'board', - 'report_account', - 'report_analytic', - 'report_analytic_line', - 'account_report'], + 'depends': [ + 'account', + 'hr_timesheet_invoice', + 'board', + 'report_account', + 'report_analytic', + 'report_analytic_line', + 'account_report' + ], 'update_xml': ['board_account_view.xml'], 'demo_xml': ['board_account_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0014361759782429', + 'certificate': '76016921229', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_association/__terp__.py b/addons/board_association/__terp__.py index c7989d3dbcc..58557ed5a97 100644 --- a/addons/board_association/__terp__.py +++ b/addons/board_association/__terp__.py @@ -34,6 +34,6 @@ This module implements a dashboard for associations. 'demo_xml': ['board_association_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0023338115437757', + 'certificate': '79647781773', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_auction/__terp__.py b/addons/board_auction/__terp__.py index 4c47ec8b4ac..e7e49542632 100644 --- a/addons/board_auction/__terp__.py +++ b/addons/board_auction/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': ['board_auction_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0027825909145421', + 'certificate': '49187078189', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_crm_configuration/__terp__.py b/addons/board_crm_configuration/__terp__.py index 845595adcb4..eb6e0a435d1 100644 --- a/addons/board_crm_configuration/__terp__.py +++ b/addons/board_crm_configuration/__terp__.py @@ -40,6 +40,6 @@ This module implements a dashboard for CRM that includes: 'demo_xml': ['board_crm_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0023637319471165', + 'certificate': '71599098909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_document/__terp__.py b/addons/board_document/__terp__.py index ff0e2aaf886..17e44ae48d7 100644 --- a/addons/board_document/__terp__.py +++ b/addons/board_document/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': ['board_document_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0019747483618397', + 'certificate': '44628458429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_manufacturing/__terp__.py b/addons/board_manufacturing/__terp__.py index 99459bc575e..41e0d37bcdf 100644 --- a/addons/board_manufacturing/__terp__.py +++ b/addons/board_manufacturing/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': ['board_manufacturing_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0026629097091997', + 'certificate': '30407612797', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_project/__terp__.py b/addons/board_project/__terp__.py index 1edc75136de..d89aecab86e 100644 --- a/addons/board_project/__terp__.py +++ b/addons/board_project/__terp__.py @@ -34,17 +34,19 @@ This module implements a dashboard for project member that includes: * Graph of my work analysis """, 'author': 'Tiny', - 'depends': [ 'project', - 'report_timesheet', - 'board', - 'report_analytic_planning', - 'report_analytic_line', - 'report_task', - 'hr_timesheet_sheet'], + 'depends': [ + 'project', + 'report_timesheet', + 'board', + 'report_analytic_planning', + 'report_analytic_line', + 'report_task', + 'hr_timesheet_sheet' + ], 'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml'], 'demo_xml': ['board_project_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0013464149376989', + 'certificate': '39350482013', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_sale/__terp__.py b/addons/board_sale/__terp__.py index f7100b32d08..0546c03b50f 100644 --- a/addons/board_sale/__terp__.py +++ b/addons/board_sale/__terp__.py @@ -39,6 +39,6 @@ This module implements a dashboard for salesman that includes: 'demo_xml': ['board_sale_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0011668930186397', + 'certificate': '46503501021', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py index 2a7c357e41d..34927ec17a3 100644 --- a/addons/crm/__terp__.py +++ b/addons/crm/__terp__.py @@ -47,14 +47,16 @@ between mails and Open ERP.""", 'website': 'http://www.openerp.com', 'depends': ['base'], 'init_xml': ['crm_data.xml'], - 'update_xml': [ 'crm_view.xml', - 'crm_report.xml', - 'crm_wizard.xml', - 'security/crm_security.xml', - 'security/ir.model.access.csv'], + 'update_xml': [ + 'crm_view.xml', + 'crm_report.xml', + 'crm_wizard.xml', + 'security/crm_security.xml', + 'security/ir.model.access.csv' + ], 'demo_xml': ['crm_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0024235645566773', + 'certificate': '79056041421', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py index fe44a662ca8..d5da400d409 100644 --- a/addons/crm_configuration/__terp__.py +++ b/addons/crm_configuration/__terp__.py @@ -38,21 +38,23 @@ meetings, eso. 'author': 'Tiny', 'website': 'http://www.openerp.com', 'depends': ['crm', 'report_crm', 'process'], - 'init_xml': [ 'crm_configuration_wizard.xml', - 'crm_config_view.xml', - 'crm_bugs_view.xml', - 'crm_jobs_view.xml', - 'crm_lead_view.xml', - 'crm_meeting_view.xml', - 'crm_opportunity_view.xml', - 'crm_fund_view.xml', - 'crm_claims_view.xml', - 'crm_phonecall_view.xml', - 'crm_report_view.xml'], + 'init_xml': [ + 'crm_configuration_wizard.xml', + 'crm_config_view.xml', + 'crm_bugs_view.xml', + 'crm_jobs_view.xml', + 'crm_lead_view.xml', + 'crm_meeting_view.xml', + 'crm_opportunity_view.xml', + 'crm_fund_view.xml', + 'crm_claims_view.xml', + 'crm_phonecall_view.xml', + 'crm_report_view.xml' + ], 'update_xml': ['security/ir.model.access.csv', 'process/crm_configuration_process.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0012865886253781', + 'certificate': '80531386589', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_profiling/__terp__.py b/addons/crm_profiling/__terp__.py index 4b70fe07807..37629b2071e 100644 --- a/addons/crm_profiling/__terp__.py +++ b/addons/crm_profiling/__terp__.py @@ -45,6 +45,6 @@ 'demo_xml': ['crm_profiling_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0012566539614077', + 'certificate': '33984979005', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_vertical/__terp__.py b/addons/crm_vertical/__terp__.py index 411d5ff8962..44e8113a165 100644 --- a/addons/crm_vertical/__terp__.py +++ b/addons/crm_vertical/__terp__.py @@ -33,6 +33,6 @@ 'update_xml': [], 'demo_xml': [], 'installable': True, - 'certificate': '0017050451838029', + 'certificate': '59915476845', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/delivery/__terp__.py b/addons/delivery/__terp__.py index b00a6c519bd..1aec98e6f6f 100644 --- a/addons/delivery/__terp__.py +++ b/addons/delivery/__terp__.py @@ -29,13 +29,15 @@ 'author': 'Tiny', 'depends': ['sale', 'purchase', 'stock'], 'init_xml': ['delivery_data.xml'], - 'update_xml': [ 'security/ir.model.access.csv', - 'delivery_view.xml', - 'delivery_wizard.xml', - 'partner_view.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'delivery_view.xml', + 'delivery_wizard.xml', + 'partner_view.xml' + ], 'demo_xml': ['delivery_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0023337859283261', + 'certificate': '33981912253', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/__terp__.py b/addons/document/__terp__.py index 8a38319859d..c6a772f5287 100644 --- a/addons/document/__terp__.py +++ b/addons/document/__terp__.py @@ -34,13 +34,15 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'process'], 'init_xml': ['document_data.xml', 'document_demo.xml'], - 'update_xml': [ 'document_view.xml', - 'document_data.xml', - 'security/document_security.xml', - 'security/ir.model.access.csv'], + 'update_xml': [ + 'document_view.xml', + 'document_data.xml', + 'security/document_security.xml', + 'security/ir.model.access.csv' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0025133162533277', + 'certificate': '70515416461', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_ics/__terp__.py b/addons/document_ics/__terp__.py index 4a0cc474e16..0a9a626d3cc 100644 --- a/addons/document_ics/__terp__.py +++ b/addons/document_ics/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': ['document_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0013463924422349', + 'certificate': '71242387229', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event/__terp__.py b/addons/event/__terp__.py index f7bb8acfc1e..2cd05130736 100644 --- a/addons/event/__terp__.py +++ b/addons/event/__terp__.py @@ -41,14 +41,16 @@ 'author': 'Tiny', 'depends': ['crm', 'base_contact', 'account'], 'init_xml': ['event_data.xml'], - 'update_xml': [ 'event_wizard.xml', - 'event_view.xml', - 'event_sequence.xml', - 'security/event_security.xml', - 'security/ir.model.access.csv'], + 'update_xml': [ + 'event_wizard.xml', + 'event_view.xml', + 'event_sequence.xml', + 'security/event_security.xml', + 'security/ir.model.access.csv' + ], 'demo_xml': ['event_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0011369839138589', + 'certificate': '83059161581', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event_project/__terp__.py b/addons/event_project/__terp__.py index 219a08875ab..741f9796509 100644 --- a/addons/event_project/__terp__.py +++ b/addons/event_project/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0028125369597165', + 'certificate': '69726863885', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/google_map/__terp__.py b/addons/google_map/__terp__.py index 5b9057a64b8..6b6b15b0838 100644 --- a/addons/google_map/__terp__.py +++ b/addons/google_map/__terp__.py @@ -36,6 +36,6 @@ url widget.""", 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '009275388447293', + 'certificate': '29498930765', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/__terp__.py b/addons/hr/__terp__.py index 2657fd0b716..2a82c2ba01f 100644 --- a/addons/hr/__terp__.py +++ b/addons/hr/__terp__.py @@ -22,10 +22,12 @@ { - 'name': 'Human Resources', - 'version': '1.1', - 'category': 'Generic Modules/Human Resources', - 'description': """ + "name" : "Human Resources", + "version" : "1.1", + "author" : "Tiny", + "category" : "Generic Modules/Human Resources", + "website" : "http://www.openerp.com", + "description": """ Module for human resource management. You can manage: * Employees and hierarchies * Work hours sheets @@ -37,15 +39,17 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'process'], 'init_xml': [], - 'update_xml': [ 'security/hr_security.xml', - 'security/ir.model.access.csv', - 'hr_view.xml', - 'hr_wizard.xml', - 'hr_department_view.xml', - 'process/hr_process.xml'], + 'update_xml': [ + 'security/hr_security.xml', + 'security/ir.model.access.csv', + 'hr_view.xml', + 'hr_wizard.xml', + 'hr_department_view.xml', + 'process/hr_process.xml' + ], 'demo_xml': ['hr_demo.xml', 'hr_department_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0021842042346741', + 'certificate': '86710558965', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_attendance/__terp__.py b/addons/hr_attendance/__terp__.py index dc196a15e66..6afa17c958c 100644 --- a/addons/hr_attendance/__terp__.py +++ b/addons/hr_attendance/__terp__.py @@ -28,14 +28,16 @@ 'description': """This module aims to manage employee's attendances.""", 'author': 'Tiny', 'depends': ['base', 'hr'], - 'update_xml': [ 'security/hr_security.xml', - 'hr_attendance_view.xml', - 'hr_attendance_wizard.xml', - 'hr_attendance_report.xml', - 'security/ir.model.access.csv'], + 'update_xml': [ + 'security/hr_security.xml', + 'hr_attendance_view.xml', + 'hr_attendance_wizard.xml', + 'hr_attendance_report.xml', + 'security/ir.model.access.csv' + ], 'demo_xml': ['hr_attendance_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0021542640344093', + 'certificate': '63495605613', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_contract/__terp__.py b/addons/hr_contract/__terp__.py index 1967f7304ac..a253d60109e 100644 --- a/addons/hr_contract/__terp__.py +++ b/addons/hr_contract/__terp__.py @@ -37,12 +37,14 @@ 'website': 'http://www.openerp.com', 'depends': ['hr'], 'init_xml': ['hr_contract_data.xml'], - 'update_xml': [ 'security/hr_contract_security.xml', - 'security/ir.model.access.csv', - 'hr_contract_view.xml'], + 'update_xml': [ + 'security/hr_contract_security.xml', + 'security/ir.model.access.csv', + 'hr_contract_view.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0011369849872221', + 'certificate': '46298028637', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index dfe1eb54ec2..8c08af34e70 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -43,15 +43,17 @@ 'website': 'http://www.openerp.com', 'depends': ['hr', 'account', 'account_tax_include'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'hr_expense_sequence.xml', - 'hr_expense_workflow.xml', - 'hr_expense_view.xml', - 'hr_expense_report.xml', - 'process/hr_expense_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'hr_expense_sequence.xml', + 'hr_expense_workflow.xml', + 'hr_expense_view.xml', + 'hr_expense_report.xml', + 'process/hr_expense_process.xml' + ], 'demo_xml': ['hr_expense_demo.xml', 'hr.expense.expense.csv'], 'installable': True, 'active': False, - 'certificate': '0028424408828349', + 'certificate': '62479841789', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py index 6c433a7b078..948df531ceb 100644 --- a/addons/hr_holidays/__terp__.py +++ b/addons/hr_holidays/__terp__.py @@ -2,10 +2,12 @@ { - 'name': 'Human Resources: Holidays management', - 'version': '1.1', - 'category': 'Generic Modules/Human Resources', - 'description': """Human Ressources: Holidays tracking and workflow + "name" : "Human Resources: Holidays management", + "version" : "1.1", + "author" : "Tiny & Axelor", + "category" : "Generic Modules/Human Resources", + "website" : "http://www.openerp.com", + "description": """Human Ressources: Holidays tracking and workflow This module allows you to manage holidays and holidays requests. For each employee, you can also define a number of available holidays per holiday status. @@ -28,15 +30,17 @@ 'website': 'http://www.openerp.com', 'depends': ['hr', 'crm_configuration', 'process'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'hr_workflow.xml', - 'hr_view.xml', - 'hr_holidays_report.xml', - 'hr_holidays_wizard.xml', - 'process/hr_holidays_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'hr_workflow.xml', + 'hr_view.xml', + 'hr_holidays_report.xml', + 'hr_holidays_wizard.xml', + 'process/hr_holidays_process.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0020345896856477', + 'certificate': '86579209325', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/__terp__.py b/addons/hr_timesheet/__terp__.py index 0f85e543310..c17deafa743 100644 --- a/addons/hr_timesheet/__terp__.py +++ b/addons/hr_timesheet/__terp__.py @@ -40,14 +40,16 @@ to set up a management by affair. 'website': 'http://www.openerp.com', 'depends': ['account', 'hr', 'base', 'hr_attendance', 'process'], 'init_xml': ['hr_timesheet_data.xml'], - 'update_xml': [ 'security/ir.model.access.csv', - 'hr_timesheet_view.xml', - 'hr_timesheet_report.xml', - 'hr_timesheet_wizard.xml', - 'process/hr_timesheet_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'hr_timesheet_view.xml', + 'hr_timesheet_report.xml', + 'hr_timesheet_wizard.xml', + 'process/hr_timesheet_process.xml' + ], 'demo_xml': ['hr_timesheet_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0022739527534493', + 'certificate': '71405533469', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/__terp__.py b/addons/hr_timesheet_invoice/__terp__.py index e3b77502a76..899c466bdf7 100644 --- a/addons/hr_timesheet_invoice/__terp__.py +++ b/addons/hr_timesheet_invoice/__terp__.py @@ -33,13 +33,15 @@ reports, eso.""", 'website': 'http://www.openerp.com', 'depends': ['account', 'hr_timesheet'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'hr_timesheet_invoice_view.xml', - 'hr_timesheet_invoice_wizard.xml', - 'hr_timesheet_invoice_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'hr_timesheet_invoice_view.xml', + 'hr_timesheet_invoice_wizard.xml', + 'hr_timesheet_invoice_report.xml' + ], 'demo_xml': ['hr_timesheet_invoice_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0020346051941629', + 'certificate': '56091842381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_sheet/__terp__.py b/addons/hr_timesheet_sheet/__terp__.py index de80e66421a..006569b4c0e 100644 --- a/addons/hr_timesheet_sheet/__terp__.py +++ b/addons/hr_timesheet_sheet/__terp__.py @@ -48,13 +48,15 @@ The validation can be configured in te company: 'website': 'http://www.openerp.com', 'depends': ['hr_timesheet', 'hr_timesheet_invoice', 'process'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'hr_timesheet_sheet_view.xml', - 'hr_timesheet_workflow.xml', - 'process/hr_timesheet_sheet_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'hr_timesheet_sheet_view.xml', + 'hr_timesheet_workflow.xml', + 'process/hr_timesheet_sheet_process.xml' + ], 'demo_xml': ['hr_timesheet_sheet_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0011669036322245', + 'certificate': '73297700829', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/idea/__terp__.py b/addons/idea/__terp__.py index 294d8dcbe58..37b6d0c52ab 100644 --- a/addons/idea/__terp__.py +++ b/addons/idea/__terp__.py @@ -30,12 +30,14 @@ 'website': 'http://openerp.com', 'depends': ['base'], 'init_xml': [], - 'update_xml': [ 'idea_view.xml', - 'idea_workflow.xml', - 'security/idea_security.xml', - 'security/ir.model.access.csv'], + 'update_xml': [ + 'idea_view.xml', + 'idea_workflow.xml', + 'security/idea_security.xml', + 'security/ir.model.access.csv' + ], 'demo_xml': [], 'installable': True, - 'certificate': '0015857924651741', + 'certificate': '71515601309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/__terp__.py b/addons/l10n_be/__terp__.py index 971135e6393..05c87181e45 100644 --- a/addons/l10n_be/__terp__.py +++ b/addons/l10n_be/__terp__.py @@ -40,14 +40,24 @@ """, 'author': 'Tiny', - 'depends': ['account', 'account_report', 'base_vat', 'base_iban', 'account_chart'], + 'depends': [ + 'account', + 'account_report', + 'base_vat', + 'base_iban', + 'account_chart' + ], 'init_xml': [], - 'update_xml': [ 'account_pcmn_belgium.xml', - 'l10n_be_wizard.xml', - 'l10n_be_sequence.xml', - 'fiscal_templates.xml'], - 'demo_xml': ['account.report.report.csv'], + 'update_xml': [ + 'account_pcmn_belgium.xml', + 'l10n_be_wizard.xml', + 'l10n_be_sequence.xml', + 'fiscal_templates.xml', + ], + 'demo_xml': [ + 'account.report.report.csv' + ], 'installable': True, - 'certificate': '0019747560288749', + 'certificate': '31977724637', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_chart_uk_minimal/__terp__.py b/addons/l10n_chart_uk_minimal/__terp__.py index 3add68dd4bf..3b714b16986 100644 --- a/addons/l10n_chart_uk_minimal/__terp__.py +++ b/addons/l10n_chart_uk_minimal/__terp__.py @@ -20,6 +20,44 @@ # ############################################################################## +# +# This module provides a minimal UK chart of accounts for building upon further +# Open ERP's default currency and accounts are remapped to this chart +# +# This module works for Open ERP 4.1.0 (and, assumed, onwards). +# This module does not work for Open ERP 4.0.2 and before. +# +# VAT is structured thus: +# - the user company is assumed to be non-VAT exempt (easy to modify, however) +# - categories OVATS (Standard), OVATR (Reduced), OVATZ (Zero) should be +# assigned to the customer taxes section of products (depending on the product) +# - categories IVATS (Standard), IVATR (Reduced), IVATZ (Zero) should be +# assigned to the supplier taxes section of products (depending on the product) +# - categories OVATX (eXempt), OVATO (Out of scope), or nothing at all should be +# assigned to default tax field of customers (depending on the customer) +# - customer categorization trumps product categorization (unchanged Tiny functionality) +# - on purchases, upon invoicing +# - the base amount (ex-VAT) appears in the appropriate input base category (S, R, Z) +# - the VAT amount appears in the appropriate input VAT category (S, R) +# - invoice lines can be traced in these VAT categories +# - refunds of invoices are deducted from the input category +# - on sales, upon invoicing +# - the base amount (ex-VAT) appears in the appropriate output base category (S, R, Z, X, O) +# - the VAT amount appears in the appropriate output VAT category (S, R) +# - invoice lines can be traced in these VAT categories +# - refunds of invoices are deducted from the output category +# +# This forms a basis for accrual tax accounting +# Cash tax accounting can be accommodated with further processing in Open ERP +# +# Status beta 0.92 - tested on Open ERP 4.1.0 +# Status beta 0.93 - tested on Open ERP 4.1.0 +# - trivial change to depend only on 'account' +# (seemed to be important for importing with no demo data) +# Status 1.0 - tested on Open ERP 4.1.0, 4.0.3 +# - COGS account type fixed +# + { 'name': 'United Kingdom - minimal', @@ -30,12 +68,14 @@ 'website': 'http://www.seathsolutions.com', 'depends': ['base', 'account', 'base_iban', 'base_vat', 'account_chart'], 'init_xml': [], - 'update_xml': [ 'account_types.xml', - 'account_chart.xml', - 'account_tax.xml', - 'l10n_uk_wizard.xml'], + 'update_xml': [ + 'account_types.xml', + 'account_chart.xml', + 'account_tax.xml', + 'l10n_uk_wizard.xml' + ], 'demo_xml': [], 'installable': True, - 'certificate': '0025133078445917', + 'certificate': '64392144797', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_fr/__terp__.py b/addons/l10n_fr/__terp__.py index 3151a7e2ffb..6d9bccc590d 100644 --- a/addons/l10n_fr/__terp__.py +++ b/addons/l10n_fr/__terp__.py @@ -25,33 +25,35 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################## - - { - 'name': 'France - Plan Comptable G\xc3\xa9n\xc3\xa9ral', - 'version': '1.0', - 'category': 'Localisation/Account Charts', - 'description': """This is the module to manage the accounting chart for France in Open ERP. + "name" : "France - Plan Comptable Général", + "version" : "1.0", + "author" : "OpenERP", + "website": "http://www.openerp.com", + "category" : "Localisation/Account Charts", + "description": """This is the module to manage the accounting chart for France in Open ERP. Credits: Sistheo Zeekom CrysaLEAD """, - 'author': 'OpenERP', - 'website': 'http://www.openerp.com', - 'depends': ['base', 'account', 'account_chart', 'account_report', 'base_vat'], - 'init_xml': [], - 'update_xml': [ 'report.xml', - 'pcg.xml', - 'l10n_fr_pcg_taxes.xml', - 'tax.xml', - 'fiscal_templates_fr.xml', - 'l10n_fr_pcg_account_report.xml', - 'l10n_fr_pcg_report.xml', - 'l10n_fr_pcg_wizard.xml', - 'l10n_fr_pcg_view.xml', - 'security/ir.model.access.csv'], - 'demo_xml': [], - 'installable': True, - 'active': False, - 'certificate': '0012865552406941', + "depends" : ['base', 'account', 'account_chart', 'account_report', 'base_vat'], + "init_xml" : [ + ], + "update_xml" : [ + "report.xml", + "pcg.xml", + "l10n_fr_pcg_taxes.xml", + "tax.xml", + "fiscal_templates_fr.xml", + "l10n_fr_pcg_account_report.xml", + "l10n_fr_pcg_report.xml", + "l10n_fr_pcg_wizard.xml", + "l10n_fr_pcg_view.xml", + "security/ir.model.access.csv", + ], + "demo_xml" : [], + "certificate" : "435321693876313629", + "active": False, + "installable": True } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/l10n_lu/__terp__.py b/addons/l10n_lu/__terp__.py index 69f29bdf6bc..62d39d81e67 100644 --- a/addons/l10n_lu/__terp__.py +++ b/addons/l10n_lu/__terp__.py @@ -35,13 +35,15 @@ This module installs: 'website': 'http://openerp.com', 'depends': ['account', 'account_report', 'base_vat', 'base_iban'], 'init_xml': [], - 'update_xml': [ 'account.tax.code.template.csv', - 'l10n_lu_data.xml', - 'account.tax.template.csv', - 'l10n_lu_wizard.xml', - 'l10n_lu_report.xml'], + 'update_xml': [ + 'account.tax.code.template.csv', + 'l10n_lu_data.xml', + 'account.tax.template.csv', + 'l10n_lu_wizard.xml', + 'l10n_lu_report.xml' + ], 'demo_xml': ['account.report.report.csv'], 'installable': True, - 'certificate': '0011967958241629', + 'certificate': '78164766621', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/membership/__terp__.py b/addons/membership/__terp__.py index c346da6b35e..54dce054fad 100644 --- a/addons/membership/__terp__.py +++ b/addons/membership/__terp__.py @@ -40,13 +40,15 @@ invoice and send propositions for membership renewal. 'author': 'Tiny', 'depends': ['base', 'product', 'account', 'process'], 'init_xml': ['membership_data.xml'], - 'update_xml': [ 'security/ir.model.access.csv', - 'membership_view.xml', - 'membership_wizard.xml', - 'process/membership_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'membership_view.xml', + 'membership_wizard.xml', + 'process/membership_process.xml' + ], 'demo_xml': ['membership_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0025731724123933', + 'certificate': '42907796381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index 8469f1d9cc2..47d2a6a2836 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -22,10 +22,13 @@ { - 'name': 'Manufacturing Resource Planning', - 'version': '1.1', - 'category': 'Generic Modules/Production', - 'description': """ + "name" : "Manufacturing Resource Planning", + "version" : "1.1", + "author" : "Tiny", + "website" : "http://www.openerp.com", + "category" : "Generic Modules/Production", + "depends" : ["stock", "hr", "purchase", "product","process"], + "description": """ This is the base module to manage the manufacturing process in Open ERP. Features: @@ -56,20 +59,22 @@ 'website': 'http://www.openerp.com', 'depends': ['stock', 'hr', 'purchase', 'product', 'process'], 'init_xml': [], - 'update_xml': [ 'security/mrp_security.xml', - 'security/ir.model.access.csv', - 'mrp_workflow.xml', - 'mrp_data.xml', - 'mrp_view.xml', - 'mrp_wizard.xml', - 'mrp_report.xml', - 'company_view.xml', - 'process/stockable_product_process.xml', - 'process/service_product_process.xml', - 'process/procurement_process.xml'], + 'update_xml': [ + 'security/mrp_security.xml', + 'security/ir.model.access.csv', + 'mrp_workflow.xml', + 'mrp_data.xml', + 'mrp_view.xml', + 'mrp_wizard.xml', + 'mrp_report.xml', + 'company_view.xml', + 'process/stockable_product_process.xml', + 'process/service_product_process.xml', + 'process/procurement_process.xml' + ], 'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'], 'installable': True, 'active': False, - 'certificate': '009574614938141', + 'certificate': '32052481373', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_jit/__terp__.py b/addons/mrp_jit/__terp__.py index 75954145503..399419d0d82 100644 --- a/addons/mrp_jit/__terp__.py +++ b/addons/mrp_jit/__terp__.py @@ -42,6 +42,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0016456348340989', + 'certificate': '86634760061', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_operations/__terp__.py b/addons/mrp_operations/__terp__.py index 00c430c8036..ed7f848fe5f 100644 --- a/addons/mrp_operations/__terp__.py +++ b/addons/mrp_operations/__terp__.py @@ -54,14 +54,16 @@ 'website': 'http://www.openerp.com', 'depends': ['stock', 'hr', 'purchase', 'product', 'mrp'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'mrp_operations_workflow.xml', - 'mrp_operations_view.xml', - 'mrp_operations_report.xml', - 'process/mrp_operation_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'mrp_operations_workflow.xml', + 'mrp_operations_view.xml', + 'mrp_operations_report.xml', + 'process/mrp_operation_process.xml' + ], 'demo_xml': ['mrp_operation_data.xml'], 'installable': True, 'active': False, - 'certificate': '0016755442036509', + 'certificate': '56233813133', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_repair/__terp__.py b/addons/mrp_repair/__terp__.py index 5202e722bbe..380e02a6c67 100644 --- a/addons/mrp_repair/__terp__.py +++ b/addons/mrp_repair/__terp__.py @@ -36,15 +36,17 @@ """, 'author': 'Tiny', 'depends': ['base', 'sale', 'account'], - 'update_xml': [ 'security/ir.model.access.csv', - 'mrp_repair_sequence.xml', - 'mrp_repair_wizard.xml', - 'mrp_repair_view.xml', - 'mrp_repair_workflow.xml', - 'mrp_repair_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'mrp_repair_sequence.xml', + 'mrp_repair_wizard.xml', + 'mrp_repair_view.xml', + 'mrp_repair_workflow.xml', + 'mrp_repair_report.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0019747418778941', + 'certificate': '60814381277', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py index c6f0590de28..80181422a55 100644 --- a/addons/mrp_subproduct/__terp__.py +++ b/addons/mrp_subproduct/__terp__.py @@ -41,6 +41,6 @@ With this module: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0010472212219869', + 'certificate': '50060616733', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/__terp__.py b/addons/point_of_sale/__terp__.py index 6377d9d59ef..46e6f519b08 100644 --- a/addons/point_of_sale/__terp__.py +++ b/addons/point_of_sale/__terp__.py @@ -38,16 +38,18 @@ Main features : 'author': 'Tiny', 'depends': ['sale', 'purchase', 'account', 'account_tax_include'], 'init_xml': [], - 'update_xml': [ 'security/point_of_sale_security.xml', - 'security/ir.model.access.csv', - 'pos_report.xml', - 'pos_wizard.xml', - 'pos_view.xml', - 'pos_sequence.xml', - 'pos_data.xml', - 'pos_workflow.xml'], + 'update_xml': [ + 'security/point_of_sale_security.xml', + 'security/ir.model.access.csv', + 'pos_report.xml', + 'pos_wizard.xml', + 'pos_view.xml', + 'pos_sequence.xml', + 'pos_data.xml', + 'pos_workflow.xml' + ], 'demo_xml': [], 'installable': True, - 'certificate': '0014361891603101', + 'certificate': '48272150909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/process/__terp__.py b/addons/process/__terp__.py index ac203b938ce..b76360ee420 100644 --- a/addons/process/__terp__.py +++ b/addons/process/__terp__.py @@ -36,6 +36,6 @@ This module allows you to manage your process for the end-users. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0021841841982765', + 'certificate': '55447636669', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py index 23aa914b798..568471df253 100644 --- a/addons/product/__terp__.py +++ b/addons/product/__terp__.py @@ -22,10 +22,14 @@ { - 'name': 'Products & Pricelists', - 'version': '1.1', - 'category': 'Generic Modules/Inventory Control', - 'description': """ + "name" : "Products & Pricelists", + "version" : "1.1", + "author" : "Tiny", + "category" : "Generic Modules/Inventory Control", + "depends" : ["base", "process"], + "init_xml" : [], + "demo_xml" : ["product_demo.xml"], + "description": """ This is the base module for managing products and pricelists in Open ERP. Products support variants, different pricing methods, suppliers @@ -46,18 +50,20 @@ 'author': 'Tiny', 'depends': ['base', 'process'], 'init_xml': [], - 'update_xml': [ 'security/product_security.xml', - 'security/ir.model.access.csv', - 'product_data.xml', - 'product_report.xml', - 'product_view.xml', - 'pricelist_view.xml', - 'partner_view.xml', - 'product_wizard.xml', - 'process/product_process.xml'], + 'update_xml': [ + 'security/product_security.xml', + 'security/ir.model.access.csv', + 'product_data.xml', + 'product_report.xml', + 'product_view.xml', + 'pricelist_view.xml', + 'partner_view.xml', + 'product_wizard.xml', + 'process/product_process.xml' + ], 'demo_xml': ['product_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0025731486276829', + 'certificate': '68861431437', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product_margin/__terp__.py b/addons/product_margin/__terp__.py index 7c983946613..0096c61abe6 100644 --- a/addons/product_margin/__terp__.py +++ b/addons/product_margin/__terp__.py @@ -36,6 +36,6 @@ the report has several options to help you get the data you need. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0021542640008861', + 'certificate': '64392591773', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_accounting/__terp__.py b/addons/profile_accounting/__terp__.py index de397d2a63e..73f6f984624 100644 --- a/addons/profile_accounting/__terp__.py +++ b/addons/profile_accounting/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '008676896400205', + 'certificate': '38455352045', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_association/__terp__.py b/addons/profile_association/__terp__.py index 2c357e73080..7a7efca044b 100644 --- a/addons/profile_association/__terp__.py +++ b/addons/profile_association/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0022739451927261', + 'certificate': '78696047261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_auction/__terp__.py b/addons/profile_auction/__terp__.py index 44b08959c09..997087a1049 100644 --- a/addons/profile_auction/__terp__.py +++ b/addons/profile_auction/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0022739451927261', + 'certificate': '65280135565', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_crm/__terp__.py b/addons/profile_crm/__terp__.py index 3c24f777121..bbee7356313 100644 --- a/addons/profile_crm/__terp__.py +++ b/addons/profile_crm/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0017653158886645', + 'certificate': '73301264221', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_manufacturing/__terp__.py b/addons/profile_manufacturing/__terp__.py index 906be82f08c..167343d05de 100644 --- a/addons/profile_manufacturing/__terp__.py +++ b/addons/profile_manufacturing/__terp__.py @@ -27,16 +27,11 @@ 'category': 'Profile', 'description': """Profile for manufacturing industries""", 'author': 'Tiny', - 'depends': [ 'mrp', - 'sale', - 'delivery', - 'board_manufacturing', - 'product_margin', - 'sale_delivery_report'], + 'depends': ['mrp', 'sale', 'delivery', 'board_manufacturing', 'product_margin', 'sale_delivery_report'], 'update_xml': ['security/ir.model.access.csv', 'profile_manufacturing.xml'], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0013464299079029', + 'certificate': '27737506213', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_service/__terp__.py b/addons/profile_service/__terp__.py index 7c86f2d7aef..828722a2389 100644 --- a/addons/profile_service/__terp__.py +++ b/addons/profile_service/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0023038656317629', + 'certificate': '30405502077', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py index 78a85dc082c..01059dc193e 100644 --- a/addons/project/__terp__.py +++ b/addons/project/__terp__.py @@ -22,26 +22,29 @@ { - 'name': 'Project Management', - 'version': '1.1', - 'category': 'Generic Modules/Projects & Services', - 'description': """Project management module that track multi-level projects, tasks, + "name" : "Project Management", + "version": "1.1", + "author" : "Tiny", + "website" : "http://www.openerp.com", + "category" : "Generic Modules/Projects & Services", + "depends" : ["product", "account", "hr", "process"], + "description": """Project management module that track multi-level projects, tasks, works done on tasks, eso. It is able to render planning, order tasks, eso. """, - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['product', 'account', 'hr', 'process'], - 'init_xml': [], - 'update_xml': [ 'security/project_security.xml', - 'security/ir.model.access.csv', - 'project_data.xml', - 'project_wizard.xml', - 'project_view.xml', - 'project_report.xml', - 'process/task_process.xml'], + "init_xml" : [], + "demo_xml" : ["project_demo.xml"], + "update_xml": [ + "security/project_security.xml", + "security/ir.model.access.csv", + "project_data.xml", + "project_wizard.xml", + "project_view.xml", + "project_report.xml", + "process/task_process.xml" + ], 'demo_xml': ['project_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0020645028723437', + 'certificate': '75116868317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_gtd/__terp__.py b/addons/project_gtd/__terp__.py index e628e500817..272c7e69a12 100644 --- a/addons/project_gtd/__terp__.py +++ b/addons/project_gtd/__terp__.py @@ -41,12 +41,14 @@ performing those tasks. 'author': 'Tiny', 'depends': ['project'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'project_gtd_view.xml', - 'project_gtd_wizard.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'project_gtd_view.xml', + 'project_gtd_wizard.xml' + ], 'demo_xml': ['project_gtd_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0022739115882013', + 'certificate': '43525236301', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_mrp/__terp__.py b/addons/project_mrp/__terp__.py index b7990b7d9ff..f1da23862e1 100644 --- a/addons/project_mrp/__terp__.py +++ b/addons/project_mrp/__terp__.py @@ -40,6 +40,6 @@ created by sales orders. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0025132707027485', + 'certificate': '31976495453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_retro_planning/__terp__.py b/addons/project_retro_planning/__terp__.py index 032ebce2879..14cb39754e8 100644 --- a/addons/project_retro_planning/__terp__.py +++ b/addons/project_retro_planning/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0014660963339373', + 'certificate': '57235475485', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/__terp__.py b/addons/project_timesheet/__terp__.py index d82bcbf86c3..d764fc80684 100644 --- a/addons/project_timesheet/__terp__.py +++ b/addons/project_timesheet/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0017952200286749', + 'certificate': '75123647453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py index 90624337a13..f66c1d75dbe 100644 --- a/addons/purchase/__terp__.py +++ b/addons/purchase/__terp__.py @@ -31,20 +31,22 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'account', 'stock', 'process'], 'init_xml': [], - 'update_xml': [ 'security/purchase_security.xml', - 'security/ir.model.access.csv', - 'purchase_workflow.xml', - 'purchase_sequence.xml', - 'purchase_data.xml', - 'purchase_view.xml', - 'purchase_report.xml', - 'purchase_wizard.xml', - 'stock_view.xml', - 'partner_view.xml', - 'process/purchase_process.xml'], + 'update_xml': [ + 'security/purchase_security.xml', + 'security/ir.model.access.csv', + 'purchase_workflow.xml', + 'purchase_sequence.xml', + 'purchase_data.xml', + 'purchase_view.xml', + 'purchase_report.xml', + 'purchase_wizard.xml', + 'stock_view.xml', + 'partner_view.xml', + 'process/purchase_process.xml' + ], 'demo_xml': ['purchase_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0014361760229405', + 'certificate': '57234283549', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_analytic_plans/__terp__.py b/addons/purchase_analytic_plans/__terp__.py index dd5282287fb..c639aa1eb66 100644 --- a/addons/purchase_analytic_plans/__terp__.py +++ b/addons/purchase_analytic_plans/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0013463950193309', + 'certificate': '62176518909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_account/__terp__.py b/addons/report_account/__terp__.py index 62c19c659a5..2b568ce08b0 100644 --- a/addons/report_account/__terp__.py +++ b/addons/report_account/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0023038913848749', + 'certificate': '61754222813', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic/__terp__.py b/addons/report_analytic/__terp__.py index 3e400773397..0d072fcf1ef 100644 --- a/addons/report_analytic/__terp__.py +++ b/addons/report_analytic/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0015259537848101', + 'certificate': '59950675429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_line/__terp__.py b/addons/report_analytic_line/__terp__.py index e6b7051e1da..905eca096eb 100644 --- a/addons/report_analytic_line/__terp__.py +++ b/addons/report_analytic_line/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0025731773908989', + 'certificate': '75179053853', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_planning/__terp__.py b/addons/report_analytic_planning/__terp__.py index d9a870cd17d..73a71fc0bca 100644 --- a/addons/report_analytic_planning/__terp__.py +++ b/addons/report_analytic_planning/__terp__.py @@ -30,12 +30,14 @@ 'website': 'http://www.openerp.com', 'depends': ['account', 'hr_timesheet_invoice', 'project', 'report_analytic_line'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'report_analytic_planning_view.xml', - 'report_analytic_planning_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'report_analytic_planning_view.xml', + 'report_analytic_planning_report.xml' + ], 'demo_xml': ['report_account_analytic.planning.csv'], 'installable': True, 'active': False, - 'certificate': '0019149225704477', + 'certificate': '34901836973', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_crm/__terp__.py b/addons/report_crm/__terp__.py index c42b2c97b6a..35ea350abf8 100644 --- a/addons/report_crm/__terp__.py +++ b/addons/report_crm/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '008976199060109', + 'certificate': '30422968285', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_document/__terp__.py b/addons/report_document/__terp__.py index 8c9e9374df2..d6ae3bccef3 100644 --- a/addons/report_document/__terp__.py +++ b/addons/report_document/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0016456365242269', + 'certificate': '68012774557', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/__terp__.py b/addons/report_intrastat/__terp__.py index 08f8bb1950d..f23feae9786 100644 --- a/addons/report_intrastat/__terp__.py +++ b/addons/report_intrastat/__terp__.py @@ -30,12 +30,14 @@ 'website': 'http://www.openerp.com', 'depends': ['base', 'product', 'stock', 'sale', 'purchase'], 'init_xml': ['report_intrastat_data.xml'], - 'update_xml': [ 'security/ir.model.access.csv', - 'report_intrastat_view.xml', - 'intrastat_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'report_intrastat_view.xml', + 'intrastat_report.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0027227801344045', + 'certificate': '56982189085', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_mrp/__terp__.py b/addons/report_mrp/__terp__.py index d5958a90d6e..4e75a21e41d 100644 --- a/addons/report_mrp/__terp__.py +++ b/addons/report_mrp/__terp__.py @@ -34,6 +34,6 @@ 'update_xml': ['security/ir.model.access.csv', 'report_mrp_view.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '0011070646110413', + 'certificate': '71582896029', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_project/__terp__.py b/addons/report_project/__terp__.py index b4bae62699f..c88f64c45e2 100644 --- a/addons/report_project/__terp__.py +++ b/addons/report_project/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0016755572187229', + 'certificate': '86804423149', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py index e5f1a6e6b07..5cc72c7de17 100644 --- a/addons/report_purchase/__terp__.py +++ b/addons/report_purchase/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0019149228485661', + 'certificate': '73370750365', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_sale/__terp__.py b/addons/report_sale/__terp__.py index 45a28f2651b..6f8f4408c49 100644 --- a/addons/report_sale/__terp__.py +++ b/addons/report_sale/__terp__.py @@ -40,12 +40,14 @@ 'website': 'http://www.openerp.com', 'depends': ['sale'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'report_sale_view.xml', - 'report_sale_graph.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'report_sale_view.xml', + 'report_sale_graph.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0027527007452477', + 'certificate': '59949739573', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_task/__terp__.py b/addons/report_task/__terp__.py index 9f091656c7a..4784e0d6c87 100644 --- a/addons/report_task/__terp__.py +++ b/addons/report_task/__terp__.py @@ -32,6 +32,6 @@ 'update_xml': ['security/ir.model.access.csv', 'report_task_view.xml'], 'installable': True, 'active': False, - 'certificate': '0026629187427709', + 'certificate': '27671328157', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py index 8dc1c45977f..bdf3189755f 100644 --- a/addons/report_timesheet/__terp__.py +++ b/addons/report_timesheet/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0016156980258077', + 'certificate': '78701510301', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/__terp__.py b/addons/sale/__terp__.py index a18923b3312..3f1a147e541 100644 --- a/addons/sale/__terp__.py +++ b/addons/sale/__terp__.py @@ -45,21 +45,23 @@ 'website': 'http://www.openerp.com', 'depends': ['product', 'stock', 'mrp', 'process'], 'init_xml': [], - 'update_xml': [ 'security/sale_security.xml', - 'security/ir.model.access.csv', - 'sale_workflow.xml', - 'sale_sequence.xml', - 'sale_data.xml', - 'sale_wizard.xml', - 'sale_view.xml', - 'sale_report.xml', - 'sale_wizard.xml', - 'stock_view.xml', - 'process/sale_process.xml', - 'product_view.xml'], + 'update_xml': [ + 'security/sale_security.xml', + 'security/ir.model.access.csv', + 'sale_workflow.xml', + 'sale_sequence.xml', + 'sale_data.xml', + 'sale_wizard.xml', + 'sale_view.xml', + 'sale_report.xml', + 'sale_wizard.xml', + 'stock_view.xml', + 'process/sale_process.xml', + 'product_view.xml' + ], 'demo_xml': ['sale_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0013763479809933', + 'certificate': '58103601429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_analytic_plans/__terp__.py b/addons/sale_analytic_plans/__terp__.py index 60d87ab3582..09583f59f11 100644 --- a/addons/sale_analytic_plans/__terp__.py +++ b/addons/sale_analytic_plans/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0024833956156349', + 'certificate': '66055860861', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_crm/__terp__.py b/addons/sale_crm/__terp__.py index ad9675217ec..e950030db95 100644 --- a/addons/sale_crm/__terp__.py +++ b/addons/sale_crm/__terp__.py @@ -46,6 +46,6 @@ crm_configuration modules. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0025432520667869', + 'certificate': '64360130141', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_delivery_report/__terp__.py b/addons/sale_delivery_report/__terp__.py index 5df5c2c7635..32084e730eb 100644 --- a/addons/sale_delivery_report/__terp__.py +++ b/addons/sale_delivery_report/__terp__.py @@ -29,10 +29,12 @@ 'author': 'Tiny', 'depends': ['sale', 'delivery'], 'init_xml': [], - 'update_xml': ['delivery_report.xml'], + 'update_xml': [ + 'delivery_report.xml' + ], 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0026629095848845', + 'certificate': '803459507494914221', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_journal/__terp__.py b/addons/sale_journal/__terp__.py index 838e4e1c622..b03479be8b8 100644 --- a/addons/sale_journal/__terp__.py +++ b/addons/sale_journal/__terp__.py @@ -52,13 +52,15 @@ 'website': 'http://www.openerp.com', 'depends': ['stock', 'sale'], 'init_xml': ['sale_journal_data.xml'], - 'update_xml': [ 'security/ir.model.access.csv', - 'sale_journal_view.xml', - 'picking_journal_view.xml', - 'picking_journal_view_report.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'sale_journal_view.xml', + 'picking_journal_view.xml', + 'picking_journal_view_report.xml' + ], 'demo_xml': ['sale_journal_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0021841915965053', + 'certificate': '77661619085', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/scrum/__terp__.py b/addons/scrum/__terp__.py index e43cf21e7ca..3915aa5e57a 100644 --- a/addons/scrum/__terp__.py +++ b/addons/scrum/__terp__.py @@ -50,14 +50,16 @@ 'author': 'Tiny', 'depends': ['project', 'process'], 'init_xml': [], - 'update_xml': [ 'security/ir.model.access.csv', - 'scrum_view.xml', - 'scrum_report.xml', - 'scrum_wizard.xml', - 'process/scrum_process.xml'], + 'update_xml': [ + 'security/ir.model.access.csv', + 'scrum_view.xml', + 'scrum_report.xml', + 'scrum_wizard.xml', + 'process/scrum_process.xml' + ], 'demo_xml': ['scrum_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0012566677771565', + 'certificate': '84121063261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index 3e14a6e1f93..fff0e892b82 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -22,10 +22,10 @@ { - 'name': 'Stock Management', - 'version': '1.1', - 'category': 'Generic Modules/Inventory Control', - 'description': """OpenERP Stock Management module can manage multi-warehouses, multi and structured stock locations. + "name" : "Stock Management", + "version" : "1.1", + "author" : "Tiny", + "description" : """OpenERP Stock Management module can manage multi-warehouses, multi and structured stock locations. Thanks to the double entry management, the inventory controlling is powerful and flexible: * Moves history and planning, * Different inventory methods (FIFO, LIFO, ...) @@ -36,26 +36,29 @@ Thanks to the double entry management, the inventory controlling is powerful and * Rapid detection of mistakes through double entry system * Traceability (upstream/downstream, production lots, serial number, ...) """, - 'author': 'Tiny', - 'website': 'http://www.openerp.com', - 'depends': ['product', 'account'], - 'init_xml': [], - 'update_xml': [ 'stock_workflow.xml', - 'stock_data.xml', - 'stock_incoterms.xml', - 'stock_wizard.xml', - 'stock_view.xml', - 'stock_report.xml', - 'stock_sequence.xml', - 'product_data.xml', - 'product_view.xml', - 'partner_view.xml', - 'report_stock_view.xml', - 'security/stock_security.xml', - 'security/ir.model.access.csv'], + "website" : "http://www.openerp.com", + "depends" : ["product", "account"], + "category" : "Generic Modules/Inventory Control", + "init_xml" : [], + "demo_xml" : ["stock_demo.xml"], + "update_xml" : [ + "stock_workflow.xml", + "stock_data.xml", + "stock_incoterms.xml", + "stock_wizard.xml", + "stock_view.xml", + "stock_report.xml", + "stock_sequence.xml", + "product_data.xml", + "product_view.xml", + "partner_view.xml", + "report_stock_view.xml", + "security/stock_security.xml", + "security/ir.model.access.csv", + ], 'demo_xml': ['stock_demo.xml'], 'installable': True, 'active': False, - 'certificate': '0023038870767557', + 'certificate': '55421559965', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_invoice_directly/__terp__.py b/addons/stock_invoice_directly/__terp__.py index 09a4cb056b2..e89b1b2d56d 100644 --- a/addons/stock_invoice_directly/__terp__.py +++ b/addons/stock_invoice_directly/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '008676896670253', + 'certificate': '81385081261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_location/__terp__.py b/addons/stock_location/__terp__.py index 64bc6ba15cc..42b9f52eeb0 100644 --- a/addons/stock_location/__terp__.py +++ b/addons/stock_location/__terp__.py @@ -44,6 +44,6 @@ This module may be useful for different purposes: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0026928300011069', + 'certificate': '46505115101', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_no_autopicking/__terp__.py b/addons/stock_no_autopicking/__terp__.py index 32f2af4b1a7..31a01a2ae93 100644 --- a/addons/stock_no_autopicking/__terp__.py +++ b/addons/stock_no_autopicking/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0015259369768829', + 'certificate': '75124168925', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/subscription/__terp__.py b/addons/subscription/__terp__.py index 8c4ee6680b0..97e2f7cef54 100644 --- a/addons/subscription/__terp__.py +++ b/addons/subscription/__terp__.py @@ -33,6 +33,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0025731569029469', + 'certificate': '29454782573', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/warning/__terp__.py b/addons/warning/__terp__.py index 9248ba63fc1..09c6cdc854e 100644 --- a/addons/warning/__terp__.py +++ b/addons/warning/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '0017054645297021', + 'certificate': '80334018749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/__terp__.py b/addons/wiki/__terp__.py index 20c8ad34f3a..6ed97909ded 100644 --- a/addons/wiki/__terp__.py +++ b/addons/wiki/__terp__.py @@ -13,14 +13,16 @@ 'website': 'http://openerp.com', 'depends': ['base'], 'init_xml': [], - 'update_xml': [ 'wiki_view.xml', - 'data/wiki_quickstart.xml', - 'data/wiki_main.xml', - 'wizard/wizard_view.xml', - 'security/ir.model.access.csv'], + 'update_xml': [ + 'wiki_view.xml', + 'data/wiki_quickstart.xml', + 'data/wiki_main.xml', + 'wizard/wizard_view.xml', + 'security/ir.model.access.csv' + ], 'demo_xml': ['data/wiki_faq.xml'], 'installable': True, 'active': False, - 'certificate': '009574612852253', + 'certificate': '86363630317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 9c2073e44fcbba03ae97cbaf7b3e6eeb94a185bf Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 18:02:20 +0100 Subject: [PATCH 37/92] [IMP] Prefix the certificate ID with 00 bzr revid: stephane@tinyerp.com-20090203170220-t1bem02ey7ivdedr --- addons/account/__terp__.py | 2 +- addons/account_analytic_analysis/__terp__.py | 2 +- addons/account_analytic_default/__terp__.py | 2 +- addons/account_analytic_plans/__terp__.py | 2 +- addons/account_balance/__terp__.py | 2 +- addons/account_budget/__terp__.py | 2 +- addons/account_chart/__terp__.py | 2 +- addons/account_date_check/__terp__.py | 2 +- addons/account_followup/__terp__.py | 2 +- addons/account_invoice_layout/__terp__.py | 2 +- addons/account_payment/__terp__.py | 2 +- addons/account_report/__terp__.py | 2 +- addons/account_reporting/__terp__.py | 2 +- addons/account_tax_include/__terp__.py | 2 +- addons/account_voucher/__terp__.py | 2 +- addons/analytic_journal_billing_rate/__terp__.py | 2 +- addons/analytic_user_function/__terp__.py | 2 +- addons/auction/__terp__.py | 2 +- addons/audittrail/__terp__.py | 2 +- addons/base_contact/__terp__.py | 2 +- addons/base_iban/__terp__.py | 2 +- addons/base_module_merge/__terp__.py | 2 +- addons/base_module_publish/__terp__.py | 2 +- addons/base_module_record/__terp__.py | 2 +- addons/base_report_creator/__terp__.py | 2 +- addons/base_report_designer/__terp__.py | 2 +- addons/base_setup/__terp__.py | 2 +- addons/base_vat/__terp__.py | 2 +- addons/board/__terp__.py | 2 +- addons/board_account/__terp__.py | 2 +- addons/board_association/__terp__.py | 2 +- addons/board_auction/__terp__.py | 2 +- addons/board_crm_configuration/__terp__.py | 2 +- addons/board_document/__terp__.py | 2 +- addons/board_manufacturing/__terp__.py | 2 +- addons/board_project/__terp__.py | 2 +- addons/board_sale/__terp__.py | 2 +- addons/crm/__terp__.py | 2 +- addons/crm_configuration/__terp__.py | 2 +- addons/crm_profiling/__terp__.py | 2 +- addons/crm_vertical/__terp__.py | 2 +- addons/delivery/__terp__.py | 2 +- addons/document/__terp__.py | 2 +- addons/document_ics/__terp__.py | 2 +- addons/event/__terp__.py | 2 +- addons/event_project/__terp__.py | 2 +- addons/google_map/__terp__.py | 2 +- addons/hr/__terp__.py | 2 +- addons/hr_attendance/__terp__.py | 2 +- addons/hr_contract/__terp__.py | 2 +- addons/hr_expense/__terp__.py | 2 +- addons/hr_holidays/__terp__.py | 2 +- addons/hr_timesheet/__terp__.py | 2 +- addons/hr_timesheet_invoice/__terp__.py | 2 +- addons/hr_timesheet_sheet/__terp__.py | 2 +- addons/idea/__terp__.py | 2 +- addons/l10n_be/__terp__.py | 2 +- addons/l10n_chart_uk_minimal/__terp__.py | 2 +- addons/l10n_lu/__terp__.py | 2 +- addons/membership/__terp__.py | 2 +- addons/mrp/__terp__.py | 2 +- addons/mrp_jit/__terp__.py | 2 +- addons/mrp_operations/__terp__.py | 2 +- addons/mrp_repair/__terp__.py | 2 +- addons/mrp_subproduct/__terp__.py | 2 +- addons/point_of_sale/__terp__.py | 2 +- addons/process/__terp__.py | 2 +- addons/product/__terp__.py | 2 +- addons/product_margin/__terp__.py | 2 +- addons/profile_accounting/__terp__.py | 2 +- addons/profile_association/__terp__.py | 2 +- addons/profile_auction/__terp__.py | 2 +- addons/profile_crm/__terp__.py | 2 +- addons/profile_manufacturing/__terp__.py | 2 +- addons/profile_service/__terp__.py | 2 +- addons/project/__terp__.py | 2 +- addons/project_gtd/__terp__.py | 2 +- addons/project_mrp/__terp__.py | 2 +- addons/project_retro_planning/__terp__.py | 2 +- addons/project_timesheet/__terp__.py | 2 +- addons/purchase/__terp__.py | 2 +- addons/purchase_analytic_plans/__terp__.py | 2 +- addons/report_account/__terp__.py | 2 +- addons/report_analytic/__terp__.py | 2 +- addons/report_analytic_line/__terp__.py | 2 +- addons/report_analytic_planning/__terp__.py | 2 +- addons/report_crm/__terp__.py | 2 +- addons/report_document/__terp__.py | 2 +- addons/report_intrastat/__terp__.py | 2 +- addons/report_mrp/__terp__.py | 2 +- addons/report_project/__terp__.py | 2 +- addons/report_purchase/__terp__.py | 2 +- addons/report_sale/__terp__.py | 2 +- addons/report_task/__terp__.py | 2 +- addons/report_timesheet/__terp__.py | 2 +- addons/sale/__terp__.py | 2 +- addons/sale_analytic_plans/__terp__.py | 2 +- addons/sale_crm/__terp__.py | 2 +- addons/sale_delivery_report/__terp__.py | 2 +- addons/sale_journal/__terp__.py | 2 +- addons/scrum/__terp__.py | 2 +- addons/stock/__terp__.py | 2 +- addons/stock_invoice_directly/__terp__.py | 2 +- addons/stock_location/__terp__.py | 2 +- addons/stock_no_autopicking/__terp__.py | 2 +- addons/subscription/__terp__.py | 2 +- addons/warning/__terp__.py | 2 +- addons/wiki/__terp__.py | 2 +- 108 files changed, 108 insertions(+), 108 deletions(-) diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index eb9786c9d63..2679bc5e515 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -70,6 +70,6 @@ ], 'installable': True, 'active': False, - 'certificate': '80331923549', + 'certificate': '0080331923549', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_analysis/__terp__.py b/addons/account_analytic_analysis/__terp__.py index b45b828c2a8..89c9c6741f0 100644 --- a/addons/account_analytic_analysis/__terp__.py +++ b/addons/account_analytic_analysis/__terp__.py @@ -43,6 +43,6 @@ Add menu to show relevant information for each manager.""", 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '42927202589', + 'certificate': '0042927202589', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_default/__terp__.py b/addons/account_analytic_default/__terp__.py index ae3e599119d..cea4b3b981e 100644 --- a/addons/account_analytic_default/__terp__.py +++ b/addons/account_analytic_default/__terp__.py @@ -41,6 +41,6 @@ Allows to automatically select analytic accounts based on criterions: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '74229833581', + 'certificate': '0074229833581', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/__terp__.py b/addons/account_analytic_plans/__terp__.py index 722bf2727d3..97d22b33fe4 100644 --- a/addons/account_analytic_plans/__terp__.py +++ b/addons/account_analytic_plans/__terp__.py @@ -66,6 +66,6 @@ for one account entry. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '36417675373', + 'certificate': '0036417675373', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_balance/__terp__.py b/addons/account_balance/__terp__.py index 05de61e62ae..165e1e75aaa 100644 --- a/addons/account_balance/__terp__.py +++ b/addons/account_balance/__terp__.py @@ -47,6 +47,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '81928745309', + 'certificate': '0081928745309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/__terp__.py b/addons/account_budget/__terp__.py index bcb1ab7ffd6..2b6e84089a5 100644 --- a/addons/account_budget/__terp__.py +++ b/addons/account_budget/__terp__.py @@ -58,6 +58,6 @@ Three reports are available: 'demo_xml': ['crossovered_budget_demo.xml'], 'installable': True, 'active': False, - 'certificate': '43819694157', + 'certificate': '0043819694157', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_chart/__terp__.py b/addons/account_chart/__terp__.py index bb3aee9760c..4733043cc5b 100644 --- a/addons/account_chart/__terp__.py +++ b/addons/account_chart/__terp__.py @@ -33,6 +33,6 @@ 'update_xml': [], 'demo_xml': [], 'installable': True, - 'certificate': '73332443901', + 'certificate': '0073332443901', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_date_check/__terp__.py b/addons/account_date_check/__terp__.py index 9f38a0c5305..6a4741f916b 100644 --- a/addons/account_date_check/__terp__.py +++ b/addons/account_date_check/__terp__.py @@ -42,6 +42,6 @@ period !" 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '66174843389', + 'certificate': '0066174843389', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py index 5c58289f215..6a297ec668f 100644 --- a/addons/account_followup/__terp__.py +++ b/addons/account_followup/__terp__.py @@ -51,6 +51,6 @@ 'demo_xml': ['followup_demo.xml'], 'installable': True, 'active': False, - 'certificate': '72481076453', + 'certificate': '0072481076453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_invoice_layout/__terp__.py b/addons/account_invoice_layout/__terp__.py index 05389645833..c1e28ad8713 100644 --- a/addons/account_invoice_layout/__terp__.py +++ b/addons/account_invoice_layout/__terp__.py @@ -48,6 +48,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '57235078173', + 'certificate': '0057235078173', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_payment/__terp__.py b/addons/account_payment/__terp__.py index 348b9b1ce08..812bd319306 100644 --- a/addons/account_payment/__terp__.py +++ b/addons/account_payment/__terp__.py @@ -49,6 +49,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '61703998541', + 'certificate': '0061703998541', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_report/__terp__.py b/addons/account_report/__terp__.py index 1d1ac5ca605..0aed736ec78 100644 --- a/addons/account_report/__terp__.py +++ b/addons/account_report/__terp__.py @@ -42,6 +42,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '50976406925', + 'certificate': '0050976406925', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_reporting/__terp__.py b/addons/account_reporting/__terp__.py index 4f98660da09..eff79429153 100644 --- a/addons/account_reporting/__terp__.py +++ b/addons/account_reporting/__terp__.py @@ -39,6 +39,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '72305016797', + 'certificate': '0072305016797', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_tax_include/__terp__.py b/addons/account_tax_include/__terp__.py index 9e8c138cd41..db8143735f1 100644 --- a/addons/account_tax_include/__terp__.py +++ b/addons/account_tax_include/__terp__.py @@ -38,6 +38,6 @@ This module implement the modification on the invoice form. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '70514190381', + 'certificate': '0070514190381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py index 20c6e7c885a..dca0f4075f2 100755 --- a/addons/account_voucher/__terp__.py +++ b/addons/account_voucher/__terp__.py @@ -49,6 +49,6 @@ Basic Accounting, plus new things that are available: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '37580727101', + 'certificate': '0037580727101', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/analytic_journal_billing_rate/__terp__.py b/addons/analytic_journal_billing_rate/__terp__.py index 882ef832758..2290900f99a 100644 --- a/addons/analytic_journal_billing_rate/__terp__.py +++ b/addons/analytic_journal_billing_rate/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '30271787965', + 'certificate': '0030271787965', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/analytic_user_function/__terp__.py b/addons/analytic_user_function/__terp__.py index ae5231cb84e..786919785b3 100644 --- a/addons/analytic_user_function/__terp__.py +++ b/addons/analytic_user_function/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '82277138269', + 'certificate': '0082277138269', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/auction/__terp__.py b/addons/auction/__terp__.py index e2e7cd53e11..99e2b87718b 100644 --- a/addons/auction/__terp__.py +++ b/addons/auction/__terp__.py @@ -42,6 +42,6 @@ 'demo_xml': ['auction_demo.xml'], 'installable': True, 'active': False, - 'certificate': '39333102717', + 'certificate': '0039333102717', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/audittrail/__terp__.py b/addons/audittrail/__terp__.py index ccd86944270..122bd6dc789 100644 --- a/addons/audittrail/__terp__.py +++ b/addons/audittrail/__terp__.py @@ -39,6 +39,6 @@ 'demo_xml': ['audittrail_demo.xml'], 'installable': True, 'active': False, - 'certificate': '62572348749', + 'certificate': '0062572348749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py index f50bfdef95a..e02191c703f 100644 --- a/addons/base_contact/__terp__.py +++ b/addons/base_contact/__terp__.py @@ -51,6 +51,6 @@ 'demo_xml': ['base_contact_demo.xml'], 'installable': True, 'active': False, - 'certificate': '31287885469', + 'certificate': '0031287885469', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_iban/__terp__.py b/addons/base_iban/__terp__.py index d677b401dba..b4de833c77b 100644 --- a/addons/base_iban/__terp__.py +++ b/addons/base_iban/__terp__.py @@ -35,6 +35,6 @@ This module install the base for IBAN bank accounts. 'update_xml': ['base_iban_view.xml'], 'installable': True, 'active': False, - 'certificate': '50014379549', + 'certificate': '0050014379549', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_merge/__terp__.py b/addons/base_module_merge/__terp__.py index 6d7b4d97fe1..4a2a004753d 100644 --- a/addons/base_module_merge/__terp__.py +++ b/addons/base_module_merge/__terp__.py @@ -41,6 +41,6 @@ 'update_xml': ['base_module_merge_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '35756279709', + 'certificate': '0035756279709', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_publish/__terp__.py b/addons/base_module_publish/__terp__.py index af3afdfad0b..400409c6ebc 100644 --- a/addons/base_module_publish/__terp__.py +++ b/addons/base_module_publish/__terp__.py @@ -43,6 +43,6 @@ to call this button when you want to release a new version of your module. 'update_xml': ['base_module_publish_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '67939821245', + 'certificate': '0067939821245', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_record/__terp__.py b/addons/base_module_record/__terp__.py index aaf16cc283f..8c6edb399a3 100644 --- a/addons/base_module_record/__terp__.py +++ b/addons/base_module_record/__terp__.py @@ -51,6 +51,6 @@ How to use it: 'update_xml': ['security/ir.model.access.csv', 'base_module_record_wizard.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '83134865813', + 'certificate': '0083134865813', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_creator/__terp__.py b/addons/base_report_creator/__terp__.py index d95ebf3ef09..32e6c4e0c25 100644 --- a/addons/base_report_creator/__terp__.py +++ b/addons/base_report_creator/__terp__.py @@ -44,6 +44,6 @@ the "Dashboard" menu. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '31285794149', + 'certificate': '0031285794149', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_designer/__terp__.py b/addons/base_report_designer/__terp__.py index 38c9eb12b42..c66be0ec379 100644 --- a/addons/base_report_designer/__terp__.py +++ b/addons/base_report_designer/__terp__.py @@ -37,6 +37,6 @@ OpenOffice. 'demo_xml': ['base_report_data.xml'], 'installable': True, 'active': False, - 'certificate': '56379010493', + 'certificate': '0056379010493', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_setup/__terp__.py b/addons/base_setup/__terp__.py index d4499f2e093..0d20c3a01c6 100644 --- a/addons/base_setup/__terp__.py +++ b/addons/base_setup/__terp__.py @@ -46,6 +46,6 @@ 'demo_xml': ['base_setup_demo.xml'], 'installable': True, 'active': True, - 'certificate': '86711085869', + 'certificate': '0086711085869', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_vat/__terp__.py b/addons/base_vat/__terp__.py index a4e15b75188..86e2af8a555 100644 --- a/addons/base_vat/__terp__.py +++ b/addons/base_vat/__terp__.py @@ -31,6 +31,6 @@ 'update_xml': ['base_vat_data.xml'], 'installable': True, 'active': False, - 'certificate': '84849360989', + 'certificate': '0084849360989', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board/__terp__.py b/addons/board/__terp__.py index fe03a113ea3..4477c45ae82 100644 --- a/addons/board/__terp__.py +++ b/addons/board/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '76912305725', + 'certificate': '0076912305725', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_account/__terp__.py b/addons/board_account/__terp__.py index e44cc0b45c5..64f80fba8d1 100644 --- a/addons/board_account/__terp__.py +++ b/addons/board_account/__terp__.py @@ -48,6 +48,6 @@ 'demo_xml': ['board_account_demo.xml'], 'installable': True, 'active': False, - 'certificate': '76016921229', + 'certificate': '0076016921229', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_association/__terp__.py b/addons/board_association/__terp__.py index 58557ed5a97..9c838590a04 100644 --- a/addons/board_association/__terp__.py +++ b/addons/board_association/__terp__.py @@ -34,6 +34,6 @@ This module implements a dashboard for associations. 'demo_xml': ['board_association_demo.xml'], 'installable': True, 'active': False, - 'certificate': '79647781773', + 'certificate': '0079647781773', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_auction/__terp__.py b/addons/board_auction/__terp__.py index e7e49542632..7d44ae3c827 100644 --- a/addons/board_auction/__terp__.py +++ b/addons/board_auction/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': ['board_auction_demo.xml'], 'installable': True, 'active': False, - 'certificate': '49187078189', + 'certificate': '0049187078189', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_crm_configuration/__terp__.py b/addons/board_crm_configuration/__terp__.py index eb6e0a435d1..a00a88a5048 100644 --- a/addons/board_crm_configuration/__terp__.py +++ b/addons/board_crm_configuration/__terp__.py @@ -40,6 +40,6 @@ This module implements a dashboard for CRM that includes: 'demo_xml': ['board_crm_demo.xml'], 'installable': True, 'active': False, - 'certificate': '71599098909', + 'certificate': '0071599098909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_document/__terp__.py b/addons/board_document/__terp__.py index 17e44ae48d7..19114430437 100644 --- a/addons/board_document/__terp__.py +++ b/addons/board_document/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': ['board_document_demo.xml'], 'installable': True, 'active': False, - 'certificate': '44628458429', + 'certificate': '0044628458429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_manufacturing/__terp__.py b/addons/board_manufacturing/__terp__.py index 41e0d37bcdf..8a3c14fba3e 100644 --- a/addons/board_manufacturing/__terp__.py +++ b/addons/board_manufacturing/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': ['board_manufacturing_demo.xml'], 'installable': True, 'active': False, - 'certificate': '30407612797', + 'certificate': '0030407612797', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_project/__terp__.py b/addons/board_project/__terp__.py index d89aecab86e..5b37f5bb323 100644 --- a/addons/board_project/__terp__.py +++ b/addons/board_project/__terp__.py @@ -47,6 +47,6 @@ This module implements a dashboard for project member that includes: 'demo_xml': ['board_project_demo.xml'], 'installable': True, 'active': False, - 'certificate': '39350482013', + 'certificate': '0039350482013', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/board_sale/__terp__.py b/addons/board_sale/__terp__.py index 0546c03b50f..e5a1ae51f72 100644 --- a/addons/board_sale/__terp__.py +++ b/addons/board_sale/__terp__.py @@ -39,6 +39,6 @@ This module implements a dashboard for salesman that includes: 'demo_xml': ['board_sale_demo.xml'], 'installable': True, 'active': False, - 'certificate': '46503501021', + 'certificate': '0046503501021', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py index 34927ec17a3..29450cc9e71 100644 --- a/addons/crm/__terp__.py +++ b/addons/crm/__terp__.py @@ -57,6 +57,6 @@ between mails and Open ERP.""", 'demo_xml': ['crm_demo.xml'], 'installable': True, 'active': False, - 'certificate': '79056041421', + 'certificate': '0079056041421', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py index d5da400d409..6d0cd665546 100644 --- a/addons/crm_configuration/__terp__.py +++ b/addons/crm_configuration/__terp__.py @@ -55,6 +55,6 @@ meetings, eso. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '80531386589', + 'certificate': '0080531386589', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_profiling/__terp__.py b/addons/crm_profiling/__terp__.py index 37629b2071e..6ea05a5fd34 100644 --- a/addons/crm_profiling/__terp__.py +++ b/addons/crm_profiling/__terp__.py @@ -45,6 +45,6 @@ 'demo_xml': ['crm_profiling_demo.xml'], 'installable': True, 'active': False, - 'certificate': '33984979005', + 'certificate': '0033984979005', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm_vertical/__terp__.py b/addons/crm_vertical/__terp__.py index 44e8113a165..34453baad14 100644 --- a/addons/crm_vertical/__terp__.py +++ b/addons/crm_vertical/__terp__.py @@ -33,6 +33,6 @@ 'update_xml': [], 'demo_xml': [], 'installable': True, - 'certificate': '59915476845', + 'certificate': '0059915476845', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/delivery/__terp__.py b/addons/delivery/__terp__.py index 1aec98e6f6f..856404465dc 100644 --- a/addons/delivery/__terp__.py +++ b/addons/delivery/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': ['delivery_demo.xml'], 'installable': True, 'active': False, - 'certificate': '33981912253', + 'certificate': '0033981912253', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document/__terp__.py b/addons/document/__terp__.py index c6a772f5287..f7e326bbc65 100644 --- a/addons/document/__terp__.py +++ b/addons/document/__terp__.py @@ -43,6 +43,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '70515416461', + 'certificate': '0070515416461', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/document_ics/__terp__.py b/addons/document_ics/__terp__.py index 0a9a626d3cc..d5adf71e88f 100644 --- a/addons/document_ics/__terp__.py +++ b/addons/document_ics/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': ['document_demo.xml'], 'installable': True, 'active': False, - 'certificate': '71242387229', + 'certificate': '0071242387229', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event/__terp__.py b/addons/event/__terp__.py index 2cd05130736..49cfe71a53b 100644 --- a/addons/event/__terp__.py +++ b/addons/event/__terp__.py @@ -51,6 +51,6 @@ 'demo_xml': ['event_demo.xml'], 'installable': True, 'active': False, - 'certificate': '83059161581', + 'certificate': '0083059161581', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event_project/__terp__.py b/addons/event_project/__terp__.py index 741f9796509..cd846203c75 100644 --- a/addons/event_project/__terp__.py +++ b/addons/event_project/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '69726863885', + 'certificate': '0069726863885', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/google_map/__terp__.py b/addons/google_map/__terp__.py index 6b6b15b0838..9d5df2f8aed 100644 --- a/addons/google_map/__terp__.py +++ b/addons/google_map/__terp__.py @@ -36,6 +36,6 @@ url widget.""", 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '29498930765', + 'certificate': '0029498930765', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/__terp__.py b/addons/hr/__terp__.py index 2a82c2ba01f..ed6a3a34f60 100644 --- a/addons/hr/__terp__.py +++ b/addons/hr/__terp__.py @@ -50,6 +50,6 @@ 'demo_xml': ['hr_demo.xml', 'hr_department_demo.xml'], 'installable': True, 'active': False, - 'certificate': '86710558965', + 'certificate': '0086710558965', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_attendance/__terp__.py b/addons/hr_attendance/__terp__.py index 6afa17c958c..5f59acab357 100644 --- a/addons/hr_attendance/__terp__.py +++ b/addons/hr_attendance/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': ['hr_attendance_demo.xml'], 'installable': True, 'active': False, - 'certificate': '63495605613', + 'certificate': '0063495605613', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_contract/__terp__.py b/addons/hr_contract/__terp__.py index a253d60109e..2afd71a042a 100644 --- a/addons/hr_contract/__terp__.py +++ b/addons/hr_contract/__terp__.py @@ -45,6 +45,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '46298028637', + 'certificate': '0046298028637', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index 8c08af34e70..a326191b0b1 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -54,6 +54,6 @@ 'demo_xml': ['hr_expense_demo.xml', 'hr.expense.expense.csv'], 'installable': True, 'active': False, - 'certificate': '62479841789', + 'certificate': '0062479841789', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py index 948df531ceb..c8d7e445c9b 100644 --- a/addons/hr_holidays/__terp__.py +++ b/addons/hr_holidays/__terp__.py @@ -41,6 +41,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '86579209325', + 'certificate': '0086579209325', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/__terp__.py b/addons/hr_timesheet/__terp__.py index c17deafa743..56bca69936a 100644 --- a/addons/hr_timesheet/__terp__.py +++ b/addons/hr_timesheet/__terp__.py @@ -50,6 +50,6 @@ to set up a management by affair. 'demo_xml': ['hr_timesheet_demo.xml'], 'installable': True, 'active': False, - 'certificate': '71405533469', + 'certificate': '0071405533469', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_invoice/__terp__.py b/addons/hr_timesheet_invoice/__terp__.py index 899c466bdf7..34cb8b8a16d 100644 --- a/addons/hr_timesheet_invoice/__terp__.py +++ b/addons/hr_timesheet_invoice/__terp__.py @@ -42,6 +42,6 @@ reports, eso.""", 'demo_xml': ['hr_timesheet_invoice_demo.xml'], 'installable': True, 'active': False, - 'certificate': '56091842381', + 'certificate': '0056091842381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet_sheet/__terp__.py b/addons/hr_timesheet_sheet/__terp__.py index 006569b4c0e..129592adfaa 100644 --- a/addons/hr_timesheet_sheet/__terp__.py +++ b/addons/hr_timesheet_sheet/__terp__.py @@ -57,6 +57,6 @@ The validation can be configured in te company: 'demo_xml': ['hr_timesheet_sheet_demo.xml'], 'installable': True, 'active': False, - 'certificate': '73297700829', + 'certificate': '0073297700829', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/idea/__terp__.py b/addons/idea/__terp__.py index 37b6d0c52ab..a30d2854d32 100644 --- a/addons/idea/__terp__.py +++ b/addons/idea/__terp__.py @@ -38,6 +38,6 @@ ], 'demo_xml': [], 'installable': True, - 'certificate': '71515601309', + 'certificate': '0071515601309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_be/__terp__.py b/addons/l10n_be/__terp__.py index 05c87181e45..910df2d39e2 100644 --- a/addons/l10n_be/__terp__.py +++ b/addons/l10n_be/__terp__.py @@ -58,6 +58,6 @@ 'account.report.report.csv' ], 'installable': True, - 'certificate': '31977724637', + 'certificate': '0031977724637', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_chart_uk_minimal/__terp__.py b/addons/l10n_chart_uk_minimal/__terp__.py index 3b714b16986..b4881867bb8 100644 --- a/addons/l10n_chart_uk_minimal/__terp__.py +++ b/addons/l10n_chart_uk_minimal/__terp__.py @@ -76,6 +76,6 @@ ], 'demo_xml': [], 'installable': True, - 'certificate': '64392144797', + 'certificate': '0064392144797', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_lu/__terp__.py b/addons/l10n_lu/__terp__.py index 62d39d81e67..169d95df3fc 100644 --- a/addons/l10n_lu/__terp__.py +++ b/addons/l10n_lu/__terp__.py @@ -44,6 +44,6 @@ This module installs: ], 'demo_xml': ['account.report.report.csv'], 'installable': True, - 'certificate': '78164766621', + 'certificate': '0078164766621', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/membership/__terp__.py b/addons/membership/__terp__.py index 54dce054fad..dfc6774da2f 100644 --- a/addons/membership/__terp__.py +++ b/addons/membership/__terp__.py @@ -49,6 +49,6 @@ invoice and send propositions for membership renewal. 'demo_xml': ['membership_demo.xml'], 'installable': True, 'active': False, - 'certificate': '42907796381', + 'certificate': '0042907796381', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index 47d2a6a2836..508b66a7878 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -75,6 +75,6 @@ 'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'], 'installable': True, 'active': False, - 'certificate': '32052481373', + 'certificate': '0032052481373', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_jit/__terp__.py b/addons/mrp_jit/__terp__.py index 399419d0d82..944971b97e7 100644 --- a/addons/mrp_jit/__terp__.py +++ b/addons/mrp_jit/__terp__.py @@ -42,6 +42,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '86634760061', + 'certificate': '0086634760061', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_operations/__terp__.py b/addons/mrp_operations/__terp__.py index ed7f848fe5f..c53269f5b7c 100644 --- a/addons/mrp_operations/__terp__.py +++ b/addons/mrp_operations/__terp__.py @@ -64,6 +64,6 @@ 'demo_xml': ['mrp_operation_data.xml'], 'installable': True, 'active': False, - 'certificate': '56233813133', + 'certificate': '0056233813133', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_repair/__terp__.py b/addons/mrp_repair/__terp__.py index 380e02a6c67..5db51c15ce4 100644 --- a/addons/mrp_repair/__terp__.py +++ b/addons/mrp_repair/__terp__.py @@ -47,6 +47,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '60814381277', + 'certificate': '0060814381277', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py index 80181422a55..fe005926185 100644 --- a/addons/mrp_subproduct/__terp__.py +++ b/addons/mrp_subproduct/__terp__.py @@ -41,6 +41,6 @@ With this module: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '50060616733', + 'certificate': '0050060616733', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/point_of_sale/__terp__.py b/addons/point_of_sale/__terp__.py index 46e6f519b08..f597c98b0b2 100644 --- a/addons/point_of_sale/__terp__.py +++ b/addons/point_of_sale/__terp__.py @@ -50,6 +50,6 @@ Main features : ], 'demo_xml': [], 'installable': True, - 'certificate': '48272150909', + 'certificate': '0048272150909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/process/__terp__.py b/addons/process/__terp__.py index b76360ee420..68671b965d1 100644 --- a/addons/process/__terp__.py +++ b/addons/process/__terp__.py @@ -36,6 +36,6 @@ This module allows you to manage your process for the end-users. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '55447636669', + 'certificate': '0055447636669', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py index 568471df253..276696ace37 100644 --- a/addons/product/__terp__.py +++ b/addons/product/__terp__.py @@ -64,6 +64,6 @@ 'demo_xml': ['product_demo.xml'], 'installable': True, 'active': False, - 'certificate': '68861431437', + 'certificate': '0068861431437', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/product_margin/__terp__.py b/addons/product_margin/__terp__.py index 0096c61abe6..5be94a6bb95 100644 --- a/addons/product_margin/__terp__.py +++ b/addons/product_margin/__terp__.py @@ -36,6 +36,6 @@ the report has several options to help you get the data you need. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '64392591773', + 'certificate': '0064392591773', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_accounting/__terp__.py b/addons/profile_accounting/__terp__.py index 73f6f984624..ace96c34b35 100644 --- a/addons/profile_accounting/__terp__.py +++ b/addons/profile_accounting/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '38455352045', + 'certificate': '0038455352045', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_association/__terp__.py b/addons/profile_association/__terp__.py index 7a7efca044b..c4344c51458 100644 --- a/addons/profile_association/__terp__.py +++ b/addons/profile_association/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '78696047261', + 'certificate': '0078696047261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_auction/__terp__.py b/addons/profile_auction/__terp__.py index 997087a1049..c08dfbf0149 100644 --- a/addons/profile_auction/__terp__.py +++ b/addons/profile_auction/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '65280135565', + 'certificate': '0065280135565', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_crm/__terp__.py b/addons/profile_crm/__terp__.py index bbee7356313..6f0944baff5 100644 --- a/addons/profile_crm/__terp__.py +++ b/addons/profile_crm/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '73301264221', + 'certificate': '0073301264221', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_manufacturing/__terp__.py b/addons/profile_manufacturing/__terp__.py index 167343d05de..7bf367bfed7 100644 --- a/addons/profile_manufacturing/__terp__.py +++ b/addons/profile_manufacturing/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '27737506213', + 'certificate': '0027737506213', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_service/__terp__.py b/addons/profile_service/__terp__.py index 828722a2389..a69f3228b9e 100644 --- a/addons/profile_service/__terp__.py +++ b/addons/profile_service/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '30405502077', + 'certificate': '0030405502077', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py index 01059dc193e..e865e966052 100644 --- a/addons/project/__terp__.py +++ b/addons/project/__terp__.py @@ -45,6 +45,6 @@ works done on tasks, eso. It is able to render planning, order tasks, eso. 'demo_xml': ['project_demo.xml'], 'installable': True, 'active': False, - 'certificate': '75116868317', + 'certificate': '0075116868317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_gtd/__terp__.py b/addons/project_gtd/__terp__.py index 272c7e69a12..f68555d35e5 100644 --- a/addons/project_gtd/__terp__.py +++ b/addons/project_gtd/__terp__.py @@ -49,6 +49,6 @@ performing those tasks. 'demo_xml': ['project_gtd_demo.xml'], 'installable': True, 'active': False, - 'certificate': '43525236301', + 'certificate': '0043525236301', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_mrp/__terp__.py b/addons/project_mrp/__terp__.py index f1da23862e1..784814414cf 100644 --- a/addons/project_mrp/__terp__.py +++ b/addons/project_mrp/__terp__.py @@ -40,6 +40,6 @@ created by sales orders. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '31976495453', + 'certificate': '0031976495453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_retro_planning/__terp__.py b/addons/project_retro_planning/__terp__.py index 14cb39754e8..d3a6bd1d9c1 100644 --- a/addons/project_retro_planning/__terp__.py +++ b/addons/project_retro_planning/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '57235475485', + 'certificate': '0057235475485', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/__terp__.py b/addons/project_timesheet/__terp__.py index d764fc80684..8b86f54382c 100644 --- a/addons/project_timesheet/__terp__.py +++ b/addons/project_timesheet/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '75123647453', + 'certificate': '0075123647453', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py index f66c1d75dbe..88b92b4f853 100644 --- a/addons/purchase/__terp__.py +++ b/addons/purchase/__terp__.py @@ -47,6 +47,6 @@ 'demo_xml': ['purchase_demo.xml'], 'installable': True, 'active': False, - 'certificate': '57234283549', + 'certificate': '0057234283549', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_analytic_plans/__terp__.py b/addons/purchase_analytic_plans/__terp__.py index c639aa1eb66..ddb2063e89e 100644 --- a/addons/purchase_analytic_plans/__terp__.py +++ b/addons/purchase_analytic_plans/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '62176518909', + 'certificate': '0062176518909', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_account/__terp__.py b/addons/report_account/__terp__.py index 2b568ce08b0..af3c7a0726c 100644 --- a/addons/report_account/__terp__.py +++ b/addons/report_account/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '61754222813', + 'certificate': '0061754222813', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic/__terp__.py b/addons/report_analytic/__terp__.py index 0d072fcf1ef..5827f019e3b 100644 --- a/addons/report_analytic/__terp__.py +++ b/addons/report_analytic/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '59950675429', + 'certificate': '0059950675429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_line/__terp__.py b/addons/report_analytic_line/__terp__.py index 905eca096eb..b9c97e2a7d3 100644 --- a/addons/report_analytic_line/__terp__.py +++ b/addons/report_analytic_line/__terp__.py @@ -34,6 +34,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '75179053853', + 'certificate': '0075179053853', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_analytic_planning/__terp__.py b/addons/report_analytic_planning/__terp__.py index 73a71fc0bca..53cc8548e16 100644 --- a/addons/report_analytic_planning/__terp__.py +++ b/addons/report_analytic_planning/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': ['report_account_analytic.planning.csv'], 'installable': True, 'active': False, - 'certificate': '34901836973', + 'certificate': '0034901836973', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_crm/__terp__.py b/addons/report_crm/__terp__.py index 35ea350abf8..4023b1c331e 100644 --- a/addons/report_crm/__terp__.py +++ b/addons/report_crm/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '30422968285', + 'certificate': '0030422968285', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_document/__terp__.py b/addons/report_document/__terp__.py index d6ae3bccef3..5b4e7e7d86f 100644 --- a/addons/report_document/__terp__.py +++ b/addons/report_document/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '68012774557', + 'certificate': '0068012774557', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/__terp__.py b/addons/report_intrastat/__terp__.py index f23feae9786..aa4f4f33c20 100644 --- a/addons/report_intrastat/__terp__.py +++ b/addons/report_intrastat/__terp__.py @@ -38,6 +38,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '56982189085', + 'certificate': '0056982189085', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_mrp/__terp__.py b/addons/report_mrp/__terp__.py index 4e75a21e41d..3b60a05e3cc 100644 --- a/addons/report_mrp/__terp__.py +++ b/addons/report_mrp/__terp__.py @@ -34,6 +34,6 @@ 'update_xml': ['security/ir.model.access.csv', 'report_mrp_view.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '71582896029', + 'certificate': '0071582896029', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_project/__terp__.py b/addons/report_project/__terp__.py index c88f64c45e2..b0ca49e7724 100644 --- a/addons/report_project/__terp__.py +++ b/addons/report_project/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '86804423149', + 'certificate': '0086804423149', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py index 5cc72c7de17..8a578ab6b2d 100644 --- a/addons/report_purchase/__terp__.py +++ b/addons/report_purchase/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '73370750365', + 'certificate': '0073370750365', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_sale/__terp__.py b/addons/report_sale/__terp__.py index 6f8f4408c49..dc9c29b71f8 100644 --- a/addons/report_sale/__terp__.py +++ b/addons/report_sale/__terp__.py @@ -48,6 +48,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '59949739573', + 'certificate': '0059949739573', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_task/__terp__.py b/addons/report_task/__terp__.py index 4784e0d6c87..2554f26ae85 100644 --- a/addons/report_task/__terp__.py +++ b/addons/report_task/__terp__.py @@ -32,6 +32,6 @@ 'update_xml': ['security/ir.model.access.csv', 'report_task_view.xml'], 'installable': True, 'active': False, - 'certificate': '27671328157', + 'certificate': '0027671328157', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py index bdf3189755f..fc993c31311 100644 --- a/addons/report_timesheet/__terp__.py +++ b/addons/report_timesheet/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '78701510301', + 'certificate': '0078701510301', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/__terp__.py b/addons/sale/__terp__.py index 3f1a147e541..e9fb423c7fc 100644 --- a/addons/sale/__terp__.py +++ b/addons/sale/__terp__.py @@ -62,6 +62,6 @@ 'demo_xml': ['sale_demo.xml'], 'installable': True, 'active': False, - 'certificate': '58103601429', + 'certificate': '0058103601429', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_analytic_plans/__terp__.py b/addons/sale_analytic_plans/__terp__.py index 09583f59f11..6e3dcc13120 100644 --- a/addons/sale_analytic_plans/__terp__.py +++ b/addons/sale_analytic_plans/__terp__.py @@ -36,6 +36,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '66055860861', + 'certificate': '0066055860861', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_crm/__terp__.py b/addons/sale_crm/__terp__.py index e950030db95..a3d44af6e4b 100644 --- a/addons/sale_crm/__terp__.py +++ b/addons/sale_crm/__terp__.py @@ -46,6 +46,6 @@ crm_configuration modules. 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '64360130141', + 'certificate': '0064360130141', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_delivery_report/__terp__.py b/addons/sale_delivery_report/__terp__.py index 32084e730eb..63feb917531 100644 --- a/addons/sale_delivery_report/__terp__.py +++ b/addons/sale_delivery_report/__terp__.py @@ -35,6 +35,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '803459507494914221', + 'certificate': '00803459507494914221', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_journal/__terp__.py b/addons/sale_journal/__terp__.py index b03479be8b8..9f65ca73bc2 100644 --- a/addons/sale_journal/__terp__.py +++ b/addons/sale_journal/__terp__.py @@ -61,6 +61,6 @@ 'demo_xml': ['sale_journal_demo.xml'], 'installable': True, 'active': False, - 'certificate': '77661619085', + 'certificate': '0077661619085', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/scrum/__terp__.py b/addons/scrum/__terp__.py index 3915aa5e57a..c66d5da2315 100644 --- a/addons/scrum/__terp__.py +++ b/addons/scrum/__terp__.py @@ -60,6 +60,6 @@ 'demo_xml': ['scrum_demo.xml'], 'installable': True, 'active': False, - 'certificate': '84121063261', + 'certificate': '0084121063261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index fff0e892b82..8fadaa1f360 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -59,6 +59,6 @@ Thanks to the double entry management, the inventory controlling is powerful and 'demo_xml': ['stock_demo.xml'], 'installable': True, 'active': False, - 'certificate': '55421559965', + 'certificate': '0055421559965', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_invoice_directly/__terp__.py b/addons/stock_invoice_directly/__terp__.py index e89b1b2d56d..1f76f651c01 100644 --- a/addons/stock_invoice_directly/__terp__.py +++ b/addons/stock_invoice_directly/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '81385081261', + 'certificate': '0081385081261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_location/__terp__.py b/addons/stock_location/__terp__.py index 42b9f52eeb0..f6a7803ea71 100644 --- a/addons/stock_location/__terp__.py +++ b/addons/stock_location/__terp__.py @@ -44,6 +44,6 @@ This module may be useful for different purposes: 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '46505115101', + 'certificate': '0046505115101', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock_no_autopicking/__terp__.py b/addons/stock_no_autopicking/__terp__.py index 31a01a2ae93..c6661258f1b 100644 --- a/addons/stock_no_autopicking/__terp__.py +++ b/addons/stock_no_autopicking/__terp__.py @@ -40,6 +40,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '75124168925', + 'certificate': '0075124168925', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/subscription/__terp__.py b/addons/subscription/__terp__.py index 97e2f7cef54..4e2ec06fe45 100644 --- a/addons/subscription/__terp__.py +++ b/addons/subscription/__terp__.py @@ -33,6 +33,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '29454782573', + 'certificate': '0029454782573', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/warning/__terp__.py b/addons/warning/__terp__.py index 09c6cdc854e..342ddfd21c2 100644 --- a/addons/warning/__terp__.py +++ b/addons/warning/__terp__.py @@ -32,6 +32,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '80334018749', + 'certificate': '0080334018749', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/wiki/__terp__.py b/addons/wiki/__terp__.py index 6ed97909ded..1a1844c861f 100644 --- a/addons/wiki/__terp__.py +++ b/addons/wiki/__terp__.py @@ -23,6 +23,6 @@ 'demo_xml': ['data/wiki_faq.xml'], 'installable': True, 'active': False, - 'certificate': '86363630317', + 'certificate': '0086363630317', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From a8169a2e7550c93af175ade74f5bad07d98e1c64 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 18:09:16 +0100 Subject: [PATCH 38/92] [IMP] Prefix the certificate ID with 00 bzr revid: stephane@tinyerp.com-20090203170916-i525kljy804ge9qs --- bin/addons/base/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/addons/base/__terp__.py b/bin/addons/base/__terp__.py index 967b2a266b4..a9ecee24a20 100644 --- a/bin/addons/base/__terp__.py +++ b/bin/addons/base/__terp__.py @@ -63,6 +63,6 @@ 'demo_xml': ['base_demo.xml', 'res/partner/partner_demo.xml', 'res/partner/crm_demo.xml'], 'installable': True, 'active': True, - 'certificate': '76807797149', + 'certificate': '0076807797149', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 66c977ae9a20804ba2998f7f7d7d0e2e9bf3a60b Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 19:42:35 +0100 Subject: [PATCH 39/92] [FIX] Fix the addons directory with RPM bzr revid: stephane@tinyerp.com-20090203184235-15uh39ji3r2u7wit --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a7c6ecb5f0e..439d6dfdade 100755 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ def check_modules(): def find_addons(): for (dp, dn, names) in os.walk(opj('bin', 'addons')): - if '__init__.py' in names: + if '__terp__.py' in names: modname = dp.replace(os.path.sep, '.').replace('bin', 'openerp-server', 1) yield modname @@ -108,14 +108,17 @@ def data_files(): opj('bin', 'server.cert')])) for addon in find_addons(): + addonname = addon.split('.')[-1] add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [] for root, dirs, innerfiles in os.walk(add_path): innerfiles = filter(lambda file: os.path.splitext(file)[1] not in ('.pyc', '.py', '.pyd', '.pyo'), innerfiles) if innerfiles: - pathfiles.extend(((opj(addon_path, root.replace('bin/addons/', '')), map(lambda file: opj(root, file), innerfiles)),)) + res = os.path.normpath(opj(addon_path, root.replace(opj('bin','addons', addonname), '.'))) + pathfiles.extend(((res, map(lambda file: opj(root, file), innerfiles)),)) files.extend(pathfiles) + return files check_modules() From 7554c12266edc4875cb4bd02d9999bff646045a7 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Tue, 3 Feb 2009 22:58:14 +0100 Subject: [PATCH 40/92] [FIX] Convert to long the binary size, because there was a bug about the size in the binary field in the clients bzr revid: stephane@tinyerp.com-20090203215814-4rlth9lv88ekfmf3 --- bin/osv/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index e1f98532527..4baa2463280 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -217,7 +217,7 @@ class binary(_column): val = v[name] break if context.get('bin_size', False): - res[i] = tools.human_size(val) + res[i] = tools.human_size(long(val)) else: res[i] = val return res From a66af8093660e2a4f13554dfb96b30e90000dbf9 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Wed, 4 Feb 2009 00:17:13 +0100 Subject: [PATCH 41/92] [FIX] Set a domain on the parent_id to avoir a recurvise section lp bug: https://launchpad.net/bugs/324727 fixed bzr revid: stephane@tinyerp.com-20090203231713-xv3liybkzi0e00k9 --- addons/crm/crm_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 103682624b9..feb9fd79d23 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -34,7 +34,7 @@ <field name="sequence"/> <field name="active" select="2"/> <field name="user_id" select="2"/> - <field name="parent_id" select="2"/> + <field name="parent_id" select="2" domain="[('id', '!=', active_id)]"/> <field name="reply_to" select="2"/> <label colspan="2" string="Complete this if you use the mail gateway."/> </page> From cab7dd7603d40890e8b31872a9987a26bb087aa7 Mon Sep 17 00:00:00 2001 From: husen daudi <hda@hda> Date: Wed, 4 Feb 2009 12:21:26 +0530 Subject: [PATCH 42/92] Bugfix bzr revid: hda@hda-20090204065126-4wv8qtkplpvi1vp9 --- bin/osv/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 4baa2463280..ecc4c1d4c73 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -216,7 +216,7 @@ class binary(_column): if v['id'] == i: val = v[name] break - if context.get('bin_size', False): + if context.get('bin_size', False) and val: res[i] = tools.human_size(long(val)) else: res[i] = val From cf6253282e67b233d0402940810a19e3e831d056 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" <jvo@tinyerp.com> Date: Wed, 4 Feb 2009 14:31:59 +0530 Subject: [PATCH 43/92] Corrections on report_sxw bzr revid: jvo@tinyerp.com-20090204090159-ttbugu4xvow1887t --- bin/report/report_sxw.py | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index d34e0c1e2d0..7e2aef7fd77 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -166,11 +166,16 @@ class _format(object): class _float_format(float, _format): + + def __init__(self,value): + super(_float_format, self).__init__() + self.val = value and str(value) or str(0.00) def __str__(self): digits = 2 - if self._field and hasattr(self._field, 'digits') and self._field.digits: + if hasattr(self,'_field') and hasattr(self._field, 'digits') and self._field.digits: digits = self._field.digits[1] - return self.lang_obj.format('%.' + str(digits) + 'f', self.name, True) + return self.lang_obj.format('%.' + str(digits) + 'f', self.name, True) + return self.val # if not self.object._context: # return locale.format('%f', self.name, True) @@ -181,17 +186,27 @@ class _float_format(float, _format): class _int_format(int, _format): + def __init__(self,value): + super(_int_format, self).__init__() + self.val = value and str(value) or str(0) + def __str__(self): - return self.lang_obj.format('%.d', self.name, True) + if hasattr(self,'lang_obj'): + return self.lang_obj.format('%.d', self.name, True) + return self.val # return locale.format('%d', self.name, True) class _date_format(str, _format): + def __init__(self,value): + super(_date_format, self).__init__() + self.val = str(value) + def __str__(self): - if self.name: + if hasattr(self,'name') and self.name: date = mx.DateTime.strptime(self.name,DT_FORMAT) return date.strftime(self.lang_obj.date_format) - return '' + return self.val # if not self.object._context: # return self.name # @@ -205,11 +220,15 @@ class _date_format(str, _format): # return '' class _dttime_format(str, _format): + def __init__(self,value): + super(_dttime_format, self).__init__() + self.val = str(value) + def __str__(self): - if self.name: + if hasattr(self,'name') and self.name: datetime = mx.DateTime.strptime(self.name,DHM_FORMAT) return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) - return '' + return self.val _fields_process = { From a32e8eeff50406cf5fe4d8c16a1067fdb5f44aeb Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Wed, 4 Feb 2009 10:37:12 +0100 Subject: [PATCH 44/92] [FIX] Prefix with 00 for the certificate ID lp bug: https://launchpad.net/bugs/325196 fixed bzr revid: stephane@tinyerp.com-20090204093712-u51covdz5gzi1c3u --- addons/l10n_fr/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_fr/__terp__.py b/addons/l10n_fr/__terp__.py index 6d9bccc590d..b3a1f507ce1 100644 --- a/addons/l10n_fr/__terp__.py +++ b/addons/l10n_fr/__terp__.py @@ -51,7 +51,7 @@ Credits: Sistheo Zeekom CrysaLEAD "security/ir.model.access.csv", ], "demo_xml" : [], - "certificate" : "435321693876313629", + "certificate" : "00435321693876313629", "active": False, "installable": True } From 0ddb1626333d8eb647652099e3ef999b4dbd4343 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" <jvo@tinyerp.com> Date: Wed, 4 Feb 2009 15:08:58 +0530 Subject: [PATCH 45/92] Bug 325208 lp bug: https://launchpad.net/bugs/325208 fixed bzr revid: jvo@tinyerp.com-20090204093858-r7tjowszteg4dnwf --- addons/crm/crm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index b0ca8c8aef3..c288dfe794b 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -655,7 +655,7 @@ class crm_case(osv.osv): }) emails = [case.email_from] + (case.email_cc or '').split(',') emails = filter(None, emails) - body = case.description + body = case.description or '' if case.user_id.signature: body += '\n\n%s' % (case.user_id.signature) tools.email_send( From 718f80985b57b9f07dad4efc7a9daa2f7bd1f119 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" <mra@tinyerp.com> Date: Wed, 4 Feb 2009 15:16:57 +0530 Subject: [PATCH 46/92] bug fix :crm.case problem empty body on mail, now it gives warning to the user bzr revid: mra@tinyerp.com-20090204094657-dm12oc470o3681hy --- addons/crm/crm.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index c288dfe794b..4364965cce6 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution +# OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # @@ -181,7 +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 [] @@ -295,7 +295,7 @@ class crm_case_rule(osv.osv): except (ValueError, KeyError, TypeError): return False return True - + _constraints = [ (_check_mail, 'Error: The mail is not well formated', ['act_mail_body']), ] @@ -505,7 +505,7 @@ class crm_case(osv.osv): action_ids = newactions level -= 1 return True - + def format_body(self, body): return tools.ustr(body.encode('ascii', 'replace')) @@ -614,11 +614,11 @@ class crm_case(osv.osv): # Send an email tools.email_send( - src, - dest, + src, + dest, "Reminder: [%s] %s" % (str(case.id), case.name, ), self.format_body(body), - reply_to=case.section_id.reply_to, + reply_to=case.section_id.reply_to, tinycrm=str(case.id), attach=attach_to_send ) @@ -646,6 +646,9 @@ class crm_case(osv.osv): if not case.email_from: raise osv.except_osv(_('Error!'), _('You must put a Partner eMail to use this action!')) + if not case.description: + raise osv.except_osv(_('Error!'), + _('Can not send mail with empty body,you should have description in the body')) self.__history(cr, uid, cases, _('Send'), history=True, email=False) for case in cases: self.write(cr, uid, [case.id], { @@ -659,11 +662,11 @@ class crm_case(osv.osv): if case.user_id.signature: body += '\n\n%s' % (case.user_id.signature) tools.email_send( - case.user_id.address_id.email, + case.user_id.address_id.email, emails, - '['+str(case.id)+'] '+case.name, + '['+str(case.id)+'] '+case.name, self.format_body(body), - reply_to=case.section_id.reply_to, + reply_to=case.section_id.reply_to, tinycrm=str(case.id) ) return True From 4ffb97056b36108ba232282e242dfd203d345ba2 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Wed, 4 Feb 2009 11:46:11 +0100 Subject: [PATCH 47/92] [FIX] Remove the unused file from the demo_xml section bzr revid: stephane@tinyerp.com-20090204104611-iioao72rr31g97f4 --- addons/hr_expense/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index a326191b0b1..fd7ad9d2530 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -51,7 +51,7 @@ 'hr_expense_report.xml', 'process/hr_expense_process.xml' ], - 'demo_xml': ['hr_expense_demo.xml', 'hr.expense.expense.csv'], + 'demo_xml': ['hr.expense.expense.csv'], 'installable': True, 'active': False, 'certificate': '0062479841789', From 5fbe1a87b856034c92789cde481b7360fc4895be Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Wed, 4 Feb 2009 11:47:15 +0100 Subject: [PATCH 48/92] [FIX] Invert the order of the files in the update_xml section bzr revid: stephane@tinyerp.com-20090204104715-eafuyjlazx3hfbs3 --- addons/account_followup/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py index 6a297ec668f..aa50900d137 100644 --- a/addons/account_followup/__terp__.py +++ b/addons/account_followup/__terp__.py @@ -45,8 +45,8 @@ 'update_xml': [ 'security/ir.model.access.csv', 'wizard/wizard_view.xml', - 'followup_view.xml', 'followup_report_view.xml' + 'followup_view.xml', ], 'demo_xml': ['followup_demo.xml'], 'installable': True, From f92424a1a061a547a52be533d6419e57b269f1e0 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Wed, 4 Feb 2009 11:51:47 +0100 Subject: [PATCH 49/92] [FIX] Error in the terp file bzr revid: stephane@tinyerp.com-20090204105147-r2uc0hx2jg43chnc --- addons/account_followup/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py index aa50900d137..d626ccdd459 100644 --- a/addons/account_followup/__terp__.py +++ b/addons/account_followup/__terp__.py @@ -45,7 +45,7 @@ 'update_xml': [ 'security/ir.model.access.csv', 'wizard/wizard_view.xml', - 'followup_report_view.xml' + 'followup_report_view.xml', 'followup_view.xml', ], 'demo_xml': ['followup_demo.xml'], From ac4d72e659582d0e5bc0b2573243eb2d2df09d3b Mon Sep 17 00:00:00 2001 From: "Apa (Open ERP)" <apa@tinyerp.com> Date: Wed, 4 Feb 2009 16:28:56 +0530 Subject: [PATCH 50/92] small changes in invoice report bzr revid: apa@tinyerp.com-20090204105856-nk882kwt3ymdp667 --- addons/account/report/invoice.rml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index c38a1b39623..3542841e7b4 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -326,7 +326,7 @@ <para style="terp_default_9">[[ l.name ]]</para> </td> <td> - <para style="terp_default_9">[[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) ]]</para> + <para style="terp_default_9">[[ ', '.join([ lt.description or '' for lt in l.invoice_line_tax_id ]) ]]</para> </td> <td> <para style="terp_default_Right_9">[[ formatLang(l.quantity)]]</para> @@ -489,7 +489,7 @@ <blockTable colWidths="53.0,60.0,65.0" style="Table_Tax_Content"> <tr> <td> - <para style="terp_default_Centre_8">[[ t.name ]]</para> + <para style="terp_default_Centre_8">[[ lt.description and lt.description + ' - ' + t.name or t.name ]] </para> </td> <td> <para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para> From a55983a9369111bad5d643ea2973a5ef463b0914 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Wed, 4 Feb 2009 12:01:44 +0100 Subject: [PATCH 51/92] [IMP] bad queries are logged in debug mode (log also the exception) bzr revid: christophe@tinyerp.com-20090204110144-jjbt9a4itmt2vwi5 --- bin/sql_db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/sql_db.py b/bin/sql_db.py index ff9a6b0c2c6..1e88f1b66c7 100644 --- a/bin/sql_db.py +++ b/bin/sql_db.py @@ -116,8 +116,9 @@ class Cursor(object): try: res = self._obj.execute(query, params) - except: - log("bad query: %s" % self._obj.query, netsvc.LOG_ERROR) + except Exception, e: + log("bad query: %s" % self._obj.query) + log(e) raise if self.sql_log: From 1252263159c128ba3ccaeff86fdd68056d5db764 Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Wed, 4 Feb 2009 12:50:42 +0100 Subject: [PATCH 52/92] [FIX] corrected the l10n_be taxes bzr revid: qdp@tinyerp.com-20090204115042-ewo4ex633sotk23q --- addons/l10n_be/account_pcmn_belgium.xml | 112 ++++++++++++------------ addons/l10n_be/fiscal_templates.xml | 5 -- 2 files changed, 55 insertions(+), 62 deletions(-) diff --git a/addons/l10n_be/account_pcmn_belgium.xml b/addons/l10n_be/account_pcmn_belgium.xml index ccae720c08b..b5d183565c9 100644 --- a/addons/l10n_be/account_pcmn_belgium.xml +++ b/addons/l10n_be/account_pcmn_belgium.xml @@ -6628,6 +6628,16 @@ <!-- VAT Template --> <!-- Régime National --> <!-- Sales VAT --> + <record id="vat_0_co" model="account.tax.template"> + <field name="chart_template_id" ref="l10nbe_chart_template"/> + <field name="name">Cocontractants 0%</field> + <field name="description">NSCS 0</field> + <field eval="0.00" name="amount"/> + <field name="type">percent</field> + <field name="base_code_id" ref="vat_code_a45"/> + <field name="ref_base_code_id" ref="vat_code_a49"/> + <field name="type_tax_use">sale</field> + </record> <record id="vat_0" model="account.tax.template"> <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="name">TVA 0%</field> @@ -6638,16 +6648,6 @@ <field name="ref_base_code_id" ref="vat_code_a49"/> <field name="type_tax_use">sale</field> </record> - <record id="vat_0_co" model="account.tax.template"> - <field name="chart_template_id" ref="l10nbe_chart_template"/> - <field name="name">Cocontractants 0%</field> - <field name="description">NSS 0</field> - <field eval="0.00" name="amount"/> - <field name="type">percent</field> - <field name="base_code_id" ref="vat_code_a45"/> - <field name="ref_base_code_id" ref="vat_code_a49"/> - <field name="type_tax_use">sale</field> - </record> <record id="vat_6" model="account.tax.template"> <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="name">TVA 6%</field> @@ -6655,7 +6655,7 @@ <field eval="0.06" name="amount"/> <field name="type">percent</field> <field name="account_collected_id" ref="vat_payable06"/> - <field name="account_paid_id" ref="vat_refund06"/> + <field name="account_paid_id" ref="vat_payable06"/> <field name="base_code_id" ref="vat_code_a01"/> <field name="tax_code_id" ref="vat_code_a54"/> <field name="ref_base_code_id" ref="vat_code_a49"/> @@ -6669,7 +6669,7 @@ <field eval="0.12" name="amount"/> <field name="type">percent</field> <field name="account_collected_id" ref="vat_payable12"/> - <field name="account_paid_id" ref="vat_refund12"/> + <field name="account_paid_id" ref="vat_payable12"/> <field name="base_code_id" ref="vat_code_a02"/> <field name="tax_code_id" ref="vat_code_a54"/> <field name="ref_base_code_id" ref="vat_code_a49"/> @@ -6683,7 +6683,7 @@ <field eval="0.21" name="amount"/> <field name="type">percent</field> <field name="account_collected_id" ref="vat_payable21"/> - <field name="account_paid_id" ref="vat_refund21"/> + <field name="account_paid_id" ref="vat_payable21"/> <field name="base_code_id" ref="vat_code_a03"/> <field name="tax_code_id" ref="vat_code_a54"/> <field name="ref_base_code_id" ref="vat_code_a49"/> @@ -6705,7 +6705,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_0_buy_bsd"/> <field name="name">Biens et Services Divers Déductibles 0% (1)</field> - <field eval="0.06" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="base_code_id" ref="vat_code_a82"/> <field name="ref_base_code_id" ref="vat_code_a85"/> @@ -6715,7 +6715,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_0_buy_bsd"/> <field name="name">Biens et Services Divers Déductibles 0% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> @@ -6724,7 +6724,7 @@ <record id="vat_0_buy_mar" model="account.tax.template"> <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="name">Marchandises Déductibles 0%</field> - <field name="description">NSGSD 0</field> + <field name="description">NSTF 0</field> <field eval="1.00" name="amount"/> <field name="type">percent</field> <field eval="1" name="child_depend"/> @@ -6744,23 +6744,12 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_0_buy_mar"/> <field name="name">Marchandises Déductibles 0% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a81"/> <field eval="-1" name="ref_base_sign"/> <field name="type_tax_use">purchase</field> </record> - - <record id="vat_0_co_buy" model="account.tax.template"> - <field name="chart_template_id" ref="l10nbe_chart_template"/> - <field name="name">Cocontractants 0%</field> - <field name="description">NSS 0</field> - <field eval="0.00" name="amount"/> - <field name="type">percent</field> - <field name="base_code_id" ref="vat_code_a45"/> - <field name="ref_base_code_id" ref="vat_code_a49"/> - <field name="type_tax_use">sale</field> - </record> <record id="vat_6_buy_bsd" model="account.tax.template"> <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="name">Biens et Services Divers Déductibles 6%</field> @@ -6776,7 +6765,7 @@ <field name="name">Biens et Services Divers Déductibles 6% (1)</field> <field eval="0.06" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable06"/> + <field name="account_paid_id" ref="vat_refund06"/> <field name="account_collected_id" ref="vat_refund06"/> <field name="base_code_id" ref="vat_code_a82"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6788,7 +6777,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_6_buy_bsd"/> <field name="name">Biens et Services Divers Déductibles 6% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> @@ -6809,7 +6798,7 @@ <field name="name">Biens et Services Divers Déductibles 12% (1)</field> <field eval="0.12" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable12"/> + <field name="account_paid_id" ref="vat_refund12"/> <field name="account_collected_id" ref="vat_refund12"/> <field name="base_code_id" ref="vat_code_a82"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6821,7 +6810,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_12_buy_bsd"/> <field name="name">Biens et Services Divers Déductibles 12% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> @@ -6842,7 +6831,7 @@ <field name="name">Biens Déductibles 21% (1)</field> <field eval="0.21" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_paid_id" ref="vat_refund21"/> <field name="account_collected_id" ref="vat_refund21"/> <field name="base_code_id" ref="vat_code_a82"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6854,7 +6843,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_21_buy_bsd"/> <field name="name">Biens Déductibles 21% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> @@ -6875,7 +6864,7 @@ <field name="name">Services Divers Déductibles 21% (1)</field> <field eval="0.21" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_paid_id" ref="vat_refund21"/> <field name="account_collected_id" ref="vat_refund21"/> <field name="base_code_id" ref="vat_code_a82"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6887,7 +6876,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_21_buy_ser"/> <field name="name">Services Divers Déductibles 21% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> @@ -6910,7 +6899,7 @@ <field name="name">Marchandises Déductibles 6% (1)</field> <field eval="0.06" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable06"/> + <field name="account_paid_id" ref="vat_refund06"/> <field name="account_collected_id" ref="vat_refund06"/> <field name="base_code_id" ref="vat_code_a81"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6922,7 +6911,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_6_buy_mar"/> <field name="name">Marchandises Déductibles 6% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a81"/> <field eval="-1" name="ref_base_sign"/> @@ -6943,7 +6932,7 @@ <field name="name">Marchandises Déductibles 12% (1)</field> <field eval="0.12" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable12"/> + <field name="account_paid_id" ref="vat_refund12"/> <field name="account_collected_id" ref="vat_refund12"/> <field name="base_code_id" ref="vat_code_a81"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6955,7 +6944,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_12_buy_mar"/> <field name="name">Marchandises Déductibles 12% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a81"/> <field eval="-1" name="ref_base_sign"/> @@ -6976,7 +6965,7 @@ <field name="name">Marchandises Déductibles 21% (1)</field> <field eval="0.21" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_paid_id" ref="vat_refund21"/> <field name="account_collected_id" ref="vat_refund21"/> <field name="base_code_id" ref="vat_code_a81"/> <field name="tax_code_id" ref="vat_code_a59"/> @@ -6988,7 +6977,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_21_buy_mar"/> <field name="name">Marchandises Déductibles 21% (2)</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a81"/> <field eval="-1" name="ref_base_sign"/> @@ -6999,9 +6988,9 @@ <!-- Sales VAT --> <record id="vat_XO" model="account.tax.template"> <field name="chart_template_id" ref="l10nbe_chart_template"/> - <field name="name">VAT 0% Exportations</field> + <field name="name">TVA 0% Exportations</field> <field name="description">ISEXP 0</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="base_code_id" ref="vat_code_a47"/> <field name="ref_base_code_id" ref="vat_code_a49"/> @@ -7028,9 +7017,9 @@ <!-- Sales VAT --> <record id="vat_IO" model="account.tax.template"> <field name="chart_template_id" ref="l10nbe_chart_template"/> - <field name="name">VAT 0% Intracommunautaire</field> + <field name="name">TVA 0% Intracommunautaire</field> <field name="description">VI 0</field> - <field eval="1.00" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="base_code_id" ref="vat_code_a47"/> <field name="ref_base_code_id" ref="vat_code_a49"/> @@ -7052,7 +7041,7 @@ <field name="name">Biens Déductibles 21% (1)</field> <field eval="0.21" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_paid_id" ref="vat_refund21"/> <field name="account_collected_id" ref="vat_refund21"/> <field name="base_code_id" ref="vat_code_a82"/> <field name="tax_code_id" ref="vat_code_a55"/> @@ -7063,10 +7052,13 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_IO_buy_21b"/> <field name="name">Biens Déductibles 21% (2)</field> - <field eval="0.21" name="amount"/> + <field eval="-0.21" name="amount"/> <field name="type">percent</field> + <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_collected_id" ref="vat_payable21"/> <field name="base_code_id" ref="vat_code_a86"/> <field name="tax_code_id" ref="vat_code_a59"/> + <field eval="-1" name="tax_sign"/> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> <field name="type_tax_use">purchase</field> @@ -7075,7 +7067,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_IO_buy_21b"/> <field name="name">Biens Déductibles 21% (3)</field> - <field eval="0.21" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a86"/> <field eval="-1" name="ref_base_sign"/> @@ -7096,7 +7088,7 @@ <field name="name">Marchandises Déductibles 21% (1)</field> <field eval="0.21" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_paid_id" ref="vat_refund21"/> <field name="account_collected_id" ref="vat_refund21"/> <field name="base_code_id" ref="vat_code_a81"/> <field name="tax_code_id" ref="vat_code_a55"/> @@ -7107,10 +7099,13 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_IO_buy_21m"/> <field name="name">Marchandises Déductibles 21% (2)</field> - <field eval="0.21" name="amount"/> + <field eval="-0.21" name="amount"/> <field name="type">percent</field> + <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_collected_id" ref="vat_payable21"/> <field name="base_code_id" ref="vat_code_a86"/> <field name="tax_code_id" ref="vat_code_a59"/> + <field eval="-1" name="tax_sign"/> <field name="ref_base_code_id" ref="vat_code_a81"/> <field eval="-1" name="ref_base_sign"/> <field name="type_tax_use">purchase</field> @@ -7119,7 +7114,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_IO_buy_21m"/> <field name="name">Marchandises Déductibles 21% (3)</field> - <field eval="0.21" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a86"/> <field eval="-1" name="ref_base_sign"/> @@ -7140,10 +7135,10 @@ <field name="name">Services Divers Déductibles 21% (1)</field> <field eval="0.21" name="amount"/> <field name="type">percent</field> - <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_paid_id" ref="vat_refund21"/> <field name="account_collected_id" ref="vat_refund21"/> <field name="base_code_id" ref="vat_code_a82"/> - <field name="tax_code_id" ref="vat_code_a56"/> + <field name="tax_code_id" ref="vat_code_a59"/> <field name="ref_base_code_id" ref="vat_code_a85"/> <field name="type_tax_use">purchase</field> </record> @@ -7151,10 +7146,13 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_IO_buy_21s"/> <field name="name">Services Divers Déductibles 21% (2)</field> - <field eval="0.21" name="amount"/> + <field eval="-0.21" name="amount"/> <field name="type">percent</field> + <field name="account_paid_id" ref="vat_payable21"/> + <field name="account_collected_id" ref="vat_payable21"/> <field name="base_code_id" ref="vat_code_a87"/> - <field name="tax_code_id" ref="vat_code_a59"/> + <field name="tax_code_id" ref="vat_code_a56"/> + <field eval="-1" name="tax_sign"/> <field name="ref_base_code_id" ref="vat_code_a82"/> <field eval="-1" name="ref_base_sign"/> <field name="type_tax_use">purchase</field> @@ -7163,7 +7161,7 @@ <field name="chart_template_id" ref="l10nbe_chart_template"/> <field name="parent_id" ref="vat_IO_buy_21s"/> <field name="name">Services Divers Déductibles 21% (3)</field> - <field eval="0.21" name="amount"/> + <field eval="0.00" name="amount"/> <field name="type">percent</field> <field name="ref_base_code_id" ref="vat_code_a87"/> <field eval="-1" name="ref_base_sign"/> diff --git a/addons/l10n_be/fiscal_templates.xml b/addons/l10n_be/fiscal_templates.xml index 99a564b1a37..ff7b0e82f49 100644 --- a/addons/l10n_be/fiscal_templates.xml +++ b/addons/l10n_be/fiscal_templates.xml @@ -91,11 +91,6 @@ <field name="tax_src_id" ref="l10n_be.vat_0_buy_mar" /> <field name="tax_dest_id" ref="l10n_be.vat_XO_buy" /> </record> - <record id="fiscal_position_tax_template_14" model="account.fiscal.position.tax.template"> - <field name="position_id" ref="fiscal_position_template_2" /> - <field name="tax_src_id" ref="l10n_be.vat_0_co_buy" /> - <field name="tax_dest_id" ref="l10n_be.vat_XO_buy" /> - </record> <record id="fiscal_position_tax_template_15" model="account.fiscal.position.tax.template"> <field name="position_id" ref="fiscal_position_template_3" /> <field name="tax_src_id" ref="l10n_be.vat_21" /> From 6709e6e295f459c47f76b6bdfe23620eb1de0516 Mon Sep 17 00:00:00 2001 From: "mga (Tiny/Axelor)" <mga@tinyerp.com> Date: Wed, 4 Feb 2009 18:11:23 +0530 Subject: [PATCH 53/92] fixing the gug for reading fields bzr revid: mga@tinyerp.com-20090204124123-wz507w0h4tr4o2yu --- bin/osv/orm.py | 93 ++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index ff48da700a0..79d33cbc673 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -724,50 +724,55 @@ class orm_template(object): model_access_obj = self.pool.get('ir.model.access') for parent in self._inherits: res.update(self.pool.get(parent).fields_get(cr, user, fields, context)) - for f in self._columns.keys(): - if fields and f not in fields: - continue - res[f] = {'type': self._columns[f]._type} - for arg in ('string', 'readonly', 'states', 'size', 'required', - 'change_default', 'translate', 'help', 'select'): - if getattr(self._columns[f], arg): - res[f][arg] = getattr(self._columns[f], arg) - if not read_access: - res[f]['readonly'] = True - res[f]['states'] = {} - for arg in ('digits', 'invisible','filters'): - if hasattr(self._columns[f], arg) \ - and getattr(self._columns[f], arg): - res[f][arg] = getattr(self._columns[f], arg) - - res_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'field', context.get('lang', False) or 'en_US') - if res_trans: - res[f]['string'] = res_trans - help_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'help', context.get('lang', False) or 'en_US') - if help_trans: - res[f]['help'] = help_trans - - if hasattr(self._columns[f], 'selection'): - if isinstance(self._columns[f].selection, (tuple, list)): - sel = self._columns[f].selection - # translate each selection option - sel2 = [] - for (key, val) in sel: - val2 = None - if val: - val2 = translation_obj._get_source(cr, user, self._name + ',' + f, 'selection', context.get('lang', False) or 'en_US', val) - sel2.append((key, val2 or val)) - sel = sel2 - res[f]['selection'] = sel - else: - # call the 'dynamic selection' function - res[f]['selection'] = self._columns[f].selection(self, cr, - user, context) - if res[f]['type'] in ('one2many', 'many2many', 'many2one', 'one2one'): - res[f]['relation'] = self._columns[f]._obj - res[f]['domain'] = self._columns[f]._domain - res[f]['context'] = self._columns[f]._context - + + if self._columns.keys(): + for f in self._columns.keys(): + if fields and f not in fields: + continue + res[f] = {'type': self._columns[f]._type} + for arg in ('string', 'readonly', 'states', 'size', 'required', + 'change_default', 'translate', 'help', 'select'): + if getattr(self._columns[f], arg): + res[f][arg] = getattr(self._columns[f], arg) + if not read_access: + res[f]['readonly'] = True + res[f]['states'] = {} + for arg in ('digits', 'invisible','filters'): + if hasattr(self._columns[f], arg) \ + and getattr(self._columns[f], arg): + res[f][arg] = getattr(self._columns[f], arg) + + res_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'field', context.get('lang', False) or 'en_US') + if res_trans: + res[f]['string'] = res_trans + help_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'help', context.get('lang', False) or 'en_US') + if help_trans: + res[f]['help'] = help_trans + + if hasattr(self._columns[f], 'selection'): + if isinstance(self._columns[f].selection, (tuple, list)): + sel = self._columns[f].selection + # translate each selection option + sel2 = [] + for (key, val) in sel: + val2 = None + if val: + val2 = translation_obj._get_source(cr, user, self._name + ',' + f, 'selection', context.get('lang', False) or 'en_US', val) + sel2.append((key, val2 or val)) + sel = sel2 + res[f]['selection'] = sel + else: + # call the 'dynamic selection' function + res[f]['selection'] = self._columns[f].selection(self, cr, + user, context) + if res[f]['type'] in ('one2many', 'many2many', 'many2one', 'one2one'): + res[f]['relation'] = self._columns[f]._obj + res[f]['domain'] = self._columns[f]._domain + res[f]['context'] = self._columns[f]._context + else: + #TODO : read the fields from the database + pass + if fields: # filter out fields which aren't in the fields list for r in res.keys(): From b01b8d206eb63ad20938d3b28e19250b3078dd01 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" <jvo@tinyerp.com> Date: Wed, 4 Feb 2009 18:18:56 +0530 Subject: [PATCH 54/92] Corrections bzr revid: jvo@tinyerp.com-20090204124856-abrl8dg4h4inqmaz --- addons/account/account_move_line.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index eafc2c3f605..7f86f86420d 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -113,7 +113,7 @@ class account_move_line(osv.osv): account = journal_obj.default_debit_account_id - if account and ((not fields) or ('debit' in fields) or ('credit' in fields)) and 'partner_id' in data: + if account and ((not fields) or ('debit' in fields) or ('credit' in fields)) and 'partner_id' in data and (data['partner_id']): part = self.pool.get('res.partner').browse(cr, uid, data['partner_id']) account = self.pool.get('account.fiscal.position').map_account(cr, uid, part and part.property_account_position or False, account.id) account = self.pool.get('account.account').browse(cr, uid, account) @@ -707,6 +707,7 @@ class account_move_line(osv.osv): return result def unlink(self, cr, uid, ids, context={}, check=True): + print "CC" self._update_check(cr, uid, ids, context) result = False for line in self.browse(cr, uid, ids, context): From 3ae831ceaf4c22a44dfb76c289ceabb72b666ea4 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 14:05:37 +0100 Subject: [PATCH 55/92] bugfix bzr revid: fp@tinyerp.com-20090204130537-z9frulclih2scdn0 --- bin/addons/base/ir/ir.xml | 37 +- bin/osv/orm.py | 13 +- bin/tools/decimal.py | 3083 ------------------------------------- 3 files changed, 29 insertions(+), 3104 deletions(-) delete mode 100644 bin/tools/decimal.py diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index 3f4d1635250..7b9b6f4ba13 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -1025,22 +1025,27 @@ <field name="type">form</field> <field name="arch" type="xml"> <form string="Scheduled Actions"> - <field name="name" select="1"/> - <field name="active" select="1"/> - <field name="user_id" select="1"/> - <field name="priority" select="1"/> - <newline/> - <field name="interval_number"/> - <field name="interval_type"/> - <newline/> - <field name="nextcall"/> - <field name="numbercall"/> - <field name="doall"/> - <separator colspan="4" string="Action to trigger"/> - <newline/> - <field name="model" readonly="1"/> - <field name="function" readonly="1"/> - <field colspan="4" name="args" readonly="1"/> + <notebook colspan="4"> + <page string="Information"> + <field name="name" select="1"/> + <field name="active" select="1"/> + <field name="user_id" select="1"/> + <field name="priority" select="1"/> + <newline/> + <field name="interval_number"/> + <field name="interval_type"/> + <newline/> + <field name="nextcall"/> + <field name="numbercall"/> + <field name="doall"/> + </page> + <page string="Technical Data" groups="base.group_extended"> + <separator string="Action to Trigger" colspan="4"/> + <field name="model" groups="base.group_extended"/> + <field name="function" readonly="base.group_extended"/> + <field colspan="4" name="args" readonly="base.group_extended"/> + </page> + </notebook> </form> </field> </record> diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 79d33cbc673..b93a715ceb0 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2630,7 +2630,7 @@ class orm(orm_template): res = self.name_get(cr, user, ids, context) return res - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if not context: context = {} if not default: @@ -2640,6 +2640,7 @@ class orm(orm_template): default['state'] = self._defaults['state'](self, cr, uid, context) data = self.read(cr, uid, [id], context=context)[0] fields = self.fields_get(cr, uid) + trans_data=[] for f in fields: ftype = fields[f]['type'] @@ -2662,14 +2663,15 @@ class orm(orm_template): # the lines are first duplicated using the wrong (old) # parent but then are reassigned to the correct one thanks # to the (4, ...) - res.append((4, rel.copy(cr, uid, rel_id, context=context))) + d,t = rel.copy_data(cr, uid, rel_id, context=context) + res.append((0, 0, d)) + trans_data += t data[f] = res elif ftype == 'many2many': data[f] = [(6, 0, data[f])] trans_obj = self.pool.get('ir.translation') trans_name='' - trans_data=[] for f in fields: trans_flag=True if f in self._columns and self._columns[f].translate: @@ -2691,14 +2693,15 @@ class orm(orm_template): for v in self._inherits: del data[self._inherits[v]] + return data, trans_data + def copy(self, cr, uid, id, default=None, context=None): + data, trans_data = self.copy_data(cr, uid, id, default, context) new_id=self.create(cr, uid, data) - for record in trans_data: del record['id'] record['res_id']=new_id trans_obj.create(cr,uid,record) - return new_id def check_recursion(self, cr, uid, ids, parent=None): diff --git a/bin/tools/decimal.py b/bin/tools/decimal.py deleted file mode 100644 index ba2a6578455..00000000000 --- a/bin/tools/decimal.py +++ /dev/null @@ -1,3083 +0,0 @@ -# -*- encoding: utf-8 -*- -# Copyright (c) 2004 Python Software Foundation. -# All rights reserved. - -# Written by Eric Price <eprice at tjhsst.edu> -# and Facundo Batista <facundo at taniquetil.com.ar> -# and Raymond Hettinger <python at rcn.com> -# and Aahz <aahz at pobox.com> -# and Tim Peters - -# This module is currently Py2.3 compatible and should be kept that way -# unless a major compelling advantage arises. IOW, 2.3 compatibility is -# strongly preferred, but not guaranteed. - -# Also, this module should be kept in sync with the latest updates of -# the IBM specification as it evolves. Those updates will be treated -# as bug fixes (deviation from the spec is a compatibility, usability -# bug) and will be backported. At this point the spec is stabilizing -# and the updates are becoming fewer, smaller, and less significant. - -""" -This is a Py2.3 implementation of decimal floating point arithmetic based on -the General Decimal Arithmetic Specification: - - www2.hursley.ibm.com/decimal/decarith.html - -and IEEE standard 854-1987: - - www.cs.berkeley.edu/~ejr/projects/754/private/drafts/854-1987/dir.html - -Decimal floating point has finite precision with arbitrarily large bounds. - -The purpose of the module is to support arithmetic using familiar -"schoolhouse" rules and to avoid the some of tricky representation -issues associated with binary floating point. The package is especially -useful for financial applications or for contexts where users have -expectations that are at odds with binary floating point (for instance, -in binary floating point, 1.00 % 0.1 gives 0.09999999999999995 instead -of the expected Decimal("0.00") returned by decimal floating point). - -Here are some examples of using the decimal module: - ->>> from decimal import * ->>> setcontext(ExtendedContext) ->>> Decimal(0) -Decimal("0") ->>> Decimal("1") -Decimal("1") ->>> Decimal("-.0123") -Decimal("-0.0123") ->>> Decimal(123456) -Decimal("123456") ->>> Decimal("123.45e12345678901234567890") -Decimal("1.2345E+12345678901234567892") ->>> Decimal("1.33") + Decimal("1.27") -Decimal("2.60") ->>> Decimal("12.34") + Decimal("3.87") - Decimal("18.41") -Decimal("-2.20") ->>> dig = Decimal(1) ->>> print dig / Decimal(3) -0.333333333 ->>> getcontext().prec = 18 ->>> print dig / Decimal(3) -0.333333333333333333 ->>> print dig.sqrt() -1 ->>> print Decimal(3).sqrt() -1.73205080756887729 ->>> print Decimal(3) ** 123 -4.85192780976896427E+58 ->>> inf = Decimal(1) / Decimal(0) ->>> print inf -Infinity ->>> neginf = Decimal(-1) / Decimal(0) ->>> print neginf --Infinity ->>> print neginf + inf -NaN ->>> print neginf * inf --Infinity ->>> print dig / 0 -Infinity ->>> getcontext().traps[DivisionByZero] = 1 ->>> print dig / 0 -Traceback (most recent call last): - ... - ... - ... -DivisionByZero: x / 0 ->>> c = Context() ->>> c.traps[InvalidOperation] = 0 ->>> print c.flags[InvalidOperation] -0 ->>> c.divide(Decimal(0), Decimal(0)) -Decimal("NaN") ->>> c.traps[InvalidOperation] = 1 ->>> print c.flags[InvalidOperation] -1 ->>> c.flags[InvalidOperation] = 0 ->>> print c.flags[InvalidOperation] -0 ->>> print c.divide(Decimal(0), Decimal(0)) -Traceback (most recent call last): - ... - ... - ... -InvalidOperation: 0 / 0 ->>> print c.flags[InvalidOperation] -1 ->>> c.flags[InvalidOperation] = 0 ->>> c.traps[InvalidOperation] = 0 ->>> print c.divide(Decimal(0), Decimal(0)) -NaN ->>> print c.flags[InvalidOperation] -1 ->>> -""" - -__all__ = [ - # Two major classes - 'Decimal', 'Context', - - # Contexts - 'DefaultContext', 'BasicContext', 'ExtendedContext', - - # Exceptions - 'DecimalException', 'Clamped', 'InvalidOperation', 'DivisionByZero', - 'Inexact', 'Rounded', 'Subnormal', 'Overflow', 'Underflow', - - # Constants for use in setting up contexts - 'ROUND_DOWN', 'ROUND_HALF_UP', 'ROUND_HALF_EVEN', 'ROUND_CEILING', - 'ROUND_FLOOR', 'ROUND_UP', 'ROUND_HALF_DOWN', - - # Functions for manipulating contexts - 'setcontext', 'getcontext' -] - -import copy as _copy - -#Rounding -ROUND_DOWN = 'ROUND_DOWN' -ROUND_HALF_UP = 'ROUND_HALF_UP' -ROUND_HALF_EVEN = 'ROUND_HALF_EVEN' -ROUND_CEILING = 'ROUND_CEILING' -ROUND_FLOOR = 'ROUND_FLOOR' -ROUND_UP = 'ROUND_UP' -ROUND_HALF_DOWN = 'ROUND_HALF_DOWN' - -#Rounding decision (not part of the public API) -NEVER_ROUND = 'NEVER_ROUND' # Round in division (non-divmod), sqrt ONLY -ALWAYS_ROUND = 'ALWAYS_ROUND' # Every operation rounds at end. - -#Errors - -class DecimalException(ArithmeticError): - """Base exception class. - - Used exceptions derive from this. - If an exception derives from another exception besides this (such as - Underflow (Inexact, Rounded, Subnormal) that indicates that it is only - called if the others are present. This isn't actually used for - anything, though. - - handle -- Called when context._raise_error is called and the - trap_enabler is set. First argument is self, second is the - context. More arguments can be given, those being after - the explanation in _raise_error (For example, - context._raise_error(NewError, '(-x)!', self._sign) would - call NewError().handle(context, self._sign).) - - To define a new exception, it should be sufficient to have it derive - from DecimalException. - """ - def handle(self, context, *args): - pass - - -class Clamped(DecimalException): - """Exponent of a 0 changed to fit bounds. - - This occurs and signals clamped if the exponent of a result has been - altered in order to fit the constraints of a specific concrete - representation. This may occur when the exponent of a zero result would - be outside the bounds of a representation, or when a large normal - number would have an encoded exponent that cannot be represented. In - this latter case, the exponent is reduced to fit and the corresponding - number of zero digits are appended to the coefficient ("fold-down"). - """ - - -class InvalidOperation(DecimalException): - """An invalid operation was performed. - - Various bad things cause this: - - Something creates a signaling NaN - -INF + INF - 0 * (+-)INF - (+-)INF / (+-)INF - x % 0 - (+-)INF % x - x._rescale( non-integer ) - sqrt(-x) , x > 0 - 0 ** 0 - x ** (non-integer) - x ** (+-)INF - An operand is invalid - """ - def handle(self, context, *args): - if args: - if args[0] == 1: #sNaN, must drop 's' but keep diagnostics - return Decimal( (args[1]._sign, args[1]._int, 'n') ) - return NaN - -class ConversionSyntax(InvalidOperation): - """Trying to convert badly formed string. - - This occurs and signals invalid-operation if an string is being - converted to a number and it does not conform to the numeric string - syntax. The result is [0,qNaN]. - """ - - def handle(self, context, *args): - return (0, (0,), 'n') #Passed to something which uses a tuple. - -class DivisionByZero(DecimalException, ZeroDivisionError): - """Division by 0. - - This occurs and signals division-by-zero if division of a finite number - by zero was attempted (during a divide-integer or divide operation, or a - power operation with negative right-hand operand), and the dividend was - not zero. - - The result of the operation is [sign,inf], where sign is the exclusive - or of the signs of the operands for divide, or is 1 for an odd power of - -0, for power. - """ - - def handle(self, context, sign, double = None, *args): - if double is not None: - return (Infsign[sign],)*2 - return Infsign[sign] - -class DivisionImpossible(InvalidOperation): - """Cannot perform the division adequately. - - This occurs and signals invalid-operation if the integer result of a - divide-integer or remainder operation had too many digits (would be - longer than precision). The result is [0,qNaN]. - """ - - def handle(self, context, *args): - return (NaN, NaN) - -class DivisionUndefined(InvalidOperation, ZeroDivisionError): - """Undefined result of division. - - This occurs and signals invalid-operation if division by zero was - attempted (during a divide-integer, divide, or remainder operation), and - the dividend is also zero. The result is [0,qNaN]. - """ - - def handle(self, context, tup=None, *args): - if tup is not None: - return (NaN, NaN) #for 0 %0, 0 // 0 - return NaN - -class Inexact(DecimalException): - """Had to round, losing information. - - This occurs and signals inexact whenever the result of an operation is - not exact (that is, it needed to be rounded and any discarded digits - were non-zero), or if an overflow or underflow condition occurs. The - result in all cases is unchanged. - - The inexact signal may be tested (or trapped) to determine if a given - operation (or sequence of operations) was inexact. - """ - pass - -class InvalidContext(InvalidOperation): - """Invalid context. Unknown rounding, for example. - - This occurs and signals invalid-operation if an invalid context was - detected during an operation. This can occur if contexts are not checked - on creation and either the precision exceeds the capability of the - underlying concrete representation or an unknown or unsupported rounding - was specified. These aspects of the context need only be checked when - the values are required to be used. The result is [0,qNaN]. - """ - - def handle(self, context, *args): - return NaN - -class Rounded(DecimalException): - """Number got rounded (not necessarily changed during rounding). - - This occurs and signals rounded whenever the result of an operation is - rounded (that is, some zero or non-zero digits were discarded from the - coefficient), or if an overflow or underflow condition occurs. The - result in all cases is unchanged. - - The rounded signal may be tested (or trapped) to determine if a given - operation (or sequence of operations) caused a loss of precision. - """ - pass - -class Subnormal(DecimalException): - """Exponent < Emin before rounding. - - This occurs and signals subnormal whenever the result of a conversion or - operation is subnormal (that is, its adjusted exponent is less than - Emin, before any rounding). The result in all cases is unchanged. - - The subnormal signal may be tested (or trapped) to determine if a given - or operation (or sequence of operations) yielded a subnormal result. - """ - pass - -class Overflow(Inexact, Rounded): - """Numerical overflow. - - This occurs and signals overflow if the adjusted exponent of a result - (from a conversion or from an operation that is not an attempt to divide - by zero), after rounding, would be greater than the largest value that - can be handled by the implementation (the value Emax). - - The result depends on the rounding mode: - - For round-half-up and round-half-even (and for round-half-down and - round-up, if implemented), the result of the operation is [sign,inf], - where sign is the sign of the intermediate result. For round-down, the - result is the largest finite number that can be represented in the - current precision, with the sign of the intermediate result. For - round-ceiling, the result is the same as for round-down if the sign of - the intermediate result is 1, or is [0,inf] otherwise. For round-floor, - the result is the same as for round-down if the sign of the intermediate - result is 0, or is [1,inf] otherwise. In all cases, Inexact and Rounded - will also be raised. - """ - - def handle(self, context, sign, *args): - if context.rounding in (ROUND_HALF_UP, ROUND_HALF_EVEN, - ROUND_HALF_DOWN, ROUND_UP): - return Infsign[sign] - if sign == 0: - if context.rounding == ROUND_CEILING: - return Infsign[sign] - return Decimal((sign, (9,)*context.prec, - context.Emax-context.prec+1)) - if sign == 1: - if context.rounding == ROUND_FLOOR: - return Infsign[sign] - return Decimal( (sign, (9,)*context.prec, - context.Emax-context.prec+1)) - - -class Underflow(Inexact, Rounded, Subnormal): - """Numerical underflow with result rounded to 0. - - This occurs and signals underflow if a result is inexact and the - adjusted exponent of the result would be smaller (more negative) than - the smallest value that can be handled by the implementation (the value - Emin). That is, the result is both inexact and subnormal. - - The result after an underflow will be a subnormal number rounded, if - necessary, so that its exponent is not less than Etiny. This may result - in 0 with the sign of the intermediate result and an exponent of Etiny. - - In all cases, Inexact, Rounded, and Subnormal will also be raised. - """ - -# List of public traps and flags -_signals = [Clamped, DivisionByZero, Inexact, Overflow, Rounded, - Underflow, InvalidOperation, Subnormal] - -# Map conditions (per the spec) to signals -_condition_map = {ConversionSyntax:InvalidOperation, - DivisionImpossible:InvalidOperation, - DivisionUndefined:InvalidOperation, - InvalidContext:InvalidOperation} - -##### Context Functions ####################################### - -# The getcontext() and setcontext() function manage access to a thread-local -# current context. Py2.4 offers direct support for thread locals. If that -# is not available, use threading.currentThread() which is slower but will -# work for older Pythons. If threads are not part of the build, create a -# mock threading object with threading.local() returning the module namespace. - -try: - import threading -except ImportError: - # Python was compiled without threads; create a mock object instead - import sys - class MockThreading: - def local(self, sys=sys): - return sys.modules[__name__] - threading = MockThreading() - del sys, MockThreading - -try: - threading.local - -except AttributeError: - - #To fix reloading, force it to create a new context - #Old contexts have different exceptions in their dicts, making problems. - if hasattr(threading.currentThread(), '__decimal_context__'): - del threading.currentThread().__decimal_context__ - - def setcontext(context): - """Set this thread's context to context.""" - if context in (DefaultContext, BasicContext, ExtendedContext): - context = context.copy() - context.clear_flags() - threading.currentThread().__decimal_context__ = context - - def getcontext(): - """Returns this thread's context. - - If this thread does not yet have a context, returns - a new context and sets this thread's context. - New contexts are copies of DefaultContext. - """ - try: - return threading.currentThread().__decimal_context__ - except AttributeError: - context = Context() - threading.currentThread().__decimal_context__ = context - return context - -else: - - local = threading.local() - if hasattr(local, '__decimal_context__'): - del local.__decimal_context__ - - def getcontext(_local=local): - """Returns this thread's context. - - If this thread does not yet have a context, returns - a new context and sets this thread's context. - New contexts are copies of DefaultContext. - """ - try: - return _local.__decimal_context__ - except AttributeError: - context = Context() - _local.__decimal_context__ = context - return context - - def setcontext(context, _local=local): - """Set this thread's context to context.""" - if context in (DefaultContext, BasicContext, ExtendedContext): - context = context.copy() - context.clear_flags() - _local.__decimal_context__ = context - - del threading, local # Don't contaminate the namespace - - -##### Decimal class ########################################### - -class Decimal(object): - """Floating point class for decimal arithmetic.""" - - __slots__ = ('_exp','_int','_sign', '_is_special') - # Generally, the value of the Decimal instance is given by - # (-1)**_sign * _int * 10**_exp - # Special values are signified by _is_special == True - - # We're immutable, so use __new__ not __init__ - def __new__(cls, value="0", context=None): - """Create a decimal point instance. - - >>> Decimal('3.14') # string input - Decimal("3.14") - >>> Decimal((0, (3, 1, 4), -2)) # tuple input (sign, digit_tuple, exponent) - Decimal("3.14") - >>> Decimal(314) # int or long - Decimal("314") - >>> Decimal(Decimal(314)) # another decimal instance - Decimal("314") - """ - - self = object.__new__(cls) - self._is_special = False - - # From an internal working value - if isinstance(value, _WorkRep): - self._sign = value.sign - self._int = tuple(map(int, str(value.int))) - self._exp = int(value.exp) - return self - - # From another decimal - if isinstance(value, Decimal): - self._exp = value._exp - self._sign = value._sign - self._int = value._int - self._is_special = value._is_special - return self - - # From an integer - if isinstance(value, (int,long)): - if value >= 0: - self._sign = 0 - else: - self._sign = 1 - self._exp = 0 - self._int = tuple(map(int, str(abs(value)))) - return self - - # tuple/list conversion (possibly from as_tuple()) - if isinstance(value, (list,tuple)): - if len(value) != 3: - raise ValueError, 'Invalid arguments' - if value[0] not in (0,1): - raise ValueError, 'Invalid sign' - for digit in value[1]: - if not isinstance(digit, (int,long)) or digit < 0: - raise ValueError, "The second value in the tuple must be composed of non negative integer elements." - - self._sign = value[0] - self._int = tuple(value[1]) - if value[2] in ('F','n','N'): - self._exp = value[2] - self._is_special = True - else: - self._exp = int(value[2]) - return self - - if isinstance(value, float): - raise TypeError("Cannot convert float to Decimal. " + - "First convert the float to a string") - - # Other argument types may require the context during interpretation - if context is None: - context = getcontext() - - # From a string - # REs insist on real strings, so we can too. - if isinstance(value, basestring): - if _isinfinity(value): - self._exp = 'F' - self._int = (0,) - self._is_special = True - if _isinfinity(value) == 1: - self._sign = 0 - else: - self._sign = 1 - return self - if _isnan(value): - sig, sign, diag = _isnan(value) - self._is_special = True - if len(diag) > context.prec: #Diagnostic info too long - self._sign, self._int, self._exp = \ - context._raise_error(ConversionSyntax) - return self - if sig == 1: - self._exp = 'n' #qNaN - else: #sig == 2 - self._exp = 'N' #sNaN - self._sign = sign - self._int = tuple(map(int, diag)) #Diagnostic info - return self - try: - self._sign, self._int, self._exp = _string2exact(value) - except ValueError: - self._is_special = True - self._sign, self._int, self._exp = context._raise_error(ConversionSyntax) - return self - - raise TypeError("Cannot convert %r to Decimal" % value) - - def _isnan(self): - """Returns whether the number is not actually one. - - 0 if a number - 1 if NaN - 2 if sNaN - """ - if self._is_special: - exp = self._exp - if exp == 'n': - return 1 - elif exp == 'N': - return 2 - return 0 - - def _isinfinity(self): - """Returns whether the number is infinite - - 0 if finite or not a number - 1 if +INF - -1 if -INF - """ - if self._exp == 'F': - if self._sign: - return -1 - return 1 - return 0 - - def _check_nans(self, other = None, context=None): - """Returns whether the number is not actually one. - - if self, other are sNaN, signal - if self, other are NaN return nan - return 0 - - Done before operations. - """ - - self_is_nan = self._isnan() - if other is None: - other_is_nan = False - else: - other_is_nan = other._isnan() - - if self_is_nan or other_is_nan: - if context is None: - context = getcontext() - - if self_is_nan == 2: - return context._raise_error(InvalidOperation, 'sNaN', - 1, self) - if other_is_nan == 2: - return context._raise_error(InvalidOperation, 'sNaN', - 1, other) - if self_is_nan: - return self - - return other - return 0 - - def __nonzero__(self): - """Is the number non-zero? - - 0 if self == 0 - 1 if self != 0 - """ - if self._is_special: - return 1 - return sum(self._int) != 0 - - def __cmp__(self, other, context=None): - other = _convert_other(other) - if other is NotImplemented: - return other - - if self._is_special or other._is_special: - ans = self._check_nans(other, context) - if ans: - return 1 # Comparison involving NaN's always reports self > other - - # INF = INF - return cmp(self._isinfinity(), other._isinfinity()) - - if not self and not other: - return 0 #If both 0, sign comparison isn't certain. - - #If different signs, neg one is less - if other._sign < self._sign: - return -1 - if self._sign < other._sign: - return 1 - - self_adjusted = self.adjusted() - other_adjusted = other.adjusted() - if self_adjusted == other_adjusted and \ - self._int + (0,)*(self._exp - other._exp) == \ - other._int + (0,)*(other._exp - self._exp): - return 0 #equal, except in precision. ([0]*(-x) = []) - elif self_adjusted > other_adjusted and self._int[0] != 0: - return (-1)**self._sign - elif self_adjusted < other_adjusted and other._int[0] != 0: - return -((-1)**self._sign) - - # Need to round, so make sure we have a valid context - if context is None: - context = getcontext() - - context = context._shallow_copy() - rounding = context._set_rounding(ROUND_UP) #round away from 0 - - flags = context._ignore_all_flags() - res = self.__sub__(other, context=context) - - context._regard_flags(*flags) - - context.rounding = rounding - - if not res: - return 0 - elif res._sign: - return -1 - return 1 - - def __eq__(self, other): - if not isinstance(other, (Decimal, int, long)): - return NotImplemented - return self.__cmp__(other) == 0 - - def __ne__(self, other): - if not isinstance(other, (Decimal, int, long)): - return NotImplemented - return self.__cmp__(other) != 0 - - def compare(self, other, context=None): - """Compares one to another. - - -1 => a < b - 0 => a = b - 1 => a > b - NaN => one is NaN - Like __cmp__, but returns Decimal instances. - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - #compare(NaN, NaN) = NaN - if (self._is_special or other and other._is_special): - ans = self._check_nans(other, context) - if ans: - return ans - - return Decimal(self.__cmp__(other, context)) - - def __hash__(self): - """x.__hash__() <==> hash(x)""" - # Decimal integers must hash the same as the ints - # Non-integer decimals are normalized and hashed as strings - # Normalization assures that hast(100E-1) == hash(10) - if self._is_special: - if self._isnan(): - raise TypeError('Cannot hash a NaN value.') - return hash(str(self)) - i = int(self) - if self == Decimal(i): - return hash(i) - assert self.__nonzero__() # '-0' handled by integer case - return hash(str(self.normalize())) - - def as_tuple(self): - """Represents the number as a triple tuple. - - To show the internals exactly as they are. - """ - return (self._sign, self._int, self._exp) - - def __repr__(self): - """Represents the number as an instance of Decimal.""" - # Invariant: eval(repr(d)) == d - return 'Decimal("%s")' % str(self) - - def __str__(self, eng = 0, context=None): - """Return string representation of the number in scientific notation. - - Captures all of the information in the underlying representation. - """ - - if self._is_special: - if self._isnan(): - minus = '-'*self._sign - if self._int == (0,): - info = '' - else: - info = ''.join(map(str, self._int)) - if self._isnan() == 2: - return minus + 'sNaN' + info - return minus + 'NaN' + info - if self._isinfinity(): - minus = '-'*self._sign - return minus + 'Infinity' - - if context is None: - context = getcontext() - - tmp = map(str, self._int) - numdigits = len(self._int) - leftdigits = self._exp + numdigits - if eng and not self: #self = 0eX wants 0[.0[0]]eY, not [[0]0]0eY - if self._exp < 0 and self._exp >= -6: #short, no need for e/E - s = '-'*self._sign + '0.' + '0'*(abs(self._exp)) - return s - #exp is closest mult. of 3 >= self._exp - exp = ((self._exp - 1)// 3 + 1) * 3 - if exp != self._exp: - s = '0.'+'0'*(exp - self._exp) - else: - s = '0' - if exp != 0: - if context.capitals: - s += 'E' - else: - s += 'e' - if exp > 0: - s += '+' #0.0e+3, not 0.0e3 - s += str(exp) - s = '-'*self._sign + s - return s - if eng: - dotplace = (leftdigits-1)%3+1 - adjexp = leftdigits -1 - (leftdigits-1)%3 - else: - adjexp = leftdigits-1 - dotplace = 1 - if self._exp == 0: - pass - elif self._exp < 0 and adjexp >= 0: - tmp.insert(leftdigits, '.') - elif self._exp < 0 and adjexp >= -6: - tmp[0:0] = ['0'] * int(-leftdigits) - tmp.insert(0, '0.') - else: - if numdigits > dotplace: - tmp.insert(dotplace, '.') - elif numdigits < dotplace: - tmp.extend(['0']*(dotplace-numdigits)) - if adjexp: - if not context.capitals: - tmp.append('e') - else: - tmp.append('E') - if adjexp > 0: - tmp.append('+') - tmp.append(str(adjexp)) - if eng: - while tmp[0:1] == ['0']: - tmp[0:1] = [] - if len(tmp) == 0 or tmp[0] == '.' or tmp[0].lower() == 'e': - tmp[0:0] = ['0'] - if self._sign: - tmp.insert(0, '-') - - return ''.join(tmp) - - def to_eng_string(self, context=None): - """Convert to engineering-type string. - - Engineering notation has an exponent which is a multiple of 3, so there - are up to 3 digits left of the decimal place. - - Same rules for when in exponential and when as a value as in __str__. - """ - return self.__str__(eng=1, context=context) - - def __neg__(self, context=None): - """Returns a copy with the sign switched. - - Rounds, if it has reason. - """ - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - if not self: - # -Decimal('0') is Decimal('0'), not Decimal('-0') - sign = 0 - elif self._sign: - sign = 0 - else: - sign = 1 - - if context is None: - context = getcontext() - if context._rounding_decision == ALWAYS_ROUND: - return Decimal((sign, self._int, self._exp))._fix(context) - return Decimal( (sign, self._int, self._exp)) - - def __pos__(self, context=None): - """Returns a copy, unless it is a sNaN. - - Rounds the number (if more then precision digits) - """ - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - sign = self._sign - if not self: - # + (-0) = 0 - sign = 0 - - if context is None: - context = getcontext() - - if context._rounding_decision == ALWAYS_ROUND: - ans = self._fix(context) - else: - ans = Decimal(self) - ans._sign = sign - return ans - - def __abs__(self, round=1, context=None): - """Returns the absolute value of self. - - If the second argument is 0, do not round. - """ - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - if not round: - if context is None: - context = getcontext() - context = context._shallow_copy() - context._set_rounding_decision(NEVER_ROUND) - - if self._sign: - ans = self.__neg__(context=context) - else: - ans = self.__pos__(context=context) - - return ans - - def __add__(self, other, context=None): - """Returns self + other. - - -INF + INF (or the reverse) cause InvalidOperation errors. - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - if context is None: - context = getcontext() - - if self._is_special or other._is_special: - ans = self._check_nans(other, context) - if ans: - return ans - - if self._isinfinity(): - #If both INF, same sign => same as both, opposite => error. - if self._sign != other._sign and other._isinfinity(): - return context._raise_error(InvalidOperation, '-INF + INF') - return Decimal(self) - if other._isinfinity(): - return Decimal(other) #Can't both be infinity here - - shouldround = context._rounding_decision == ALWAYS_ROUND - - exp = min(self._exp, other._exp) - negativezero = 0 - if context.rounding == ROUND_FLOOR and self._sign != other._sign: - #If the answer is 0, the sign should be negative, in this case. - negativezero = 1 - - if not self and not other: - sign = min(self._sign, other._sign) - if negativezero: - sign = 1 - return Decimal( (sign, (0,), exp)) - if not self: - exp = max(exp, other._exp - context.prec-1) - ans = other._rescale(exp, watchexp=0, context=context) - if shouldround: - ans = ans._fix(context) - return ans - if not other: - exp = max(exp, self._exp - context.prec-1) - ans = self._rescale(exp, watchexp=0, context=context) - if shouldround: - ans = ans._fix(context) - return ans - - op1 = _WorkRep(self) - op2 = _WorkRep(other) - op1, op2 = _normalize(op1, op2, shouldround, context.prec) - - result = _WorkRep() - if op1.sign != op2.sign: - # Equal and opposite - if op1.int == op2.int: - if exp < context.Etiny(): - exp = context.Etiny() - context._raise_error(Clamped) - return Decimal((negativezero, (0,), exp)) - if op1.int < op2.int: - op1, op2 = op2, op1 - #OK, now abs(op1) > abs(op2) - if op1.sign == 1: - result.sign = 1 - op1.sign, op2.sign = op2.sign, op1.sign - else: - result.sign = 0 - #So we know the sign, and op1 > 0. - elif op1.sign == 1: - result.sign = 1 - op1.sign, op2.sign = (0, 0) - else: - result.sign = 0 - #Now, op1 > abs(op2) > 0 - - if op2.sign == 0: - result.int = op1.int + op2.int - else: - result.int = op1.int - op2.int - - result.exp = op1.exp - ans = Decimal(result) - if shouldround: - ans = ans._fix(context) - return ans - - __radd__ = __add__ - - def __sub__(self, other, context=None): - """Return self + (-other)""" - other = _convert_other(other) - if other is NotImplemented: - return other - - if self._is_special or other._is_special: - ans = self._check_nans(other, context=context) - if ans: - return ans - - # -Decimal(0) = Decimal(0), which we don't want since - # (-0 - 0 = -0 + (-0) = -0, but -0 + 0 = 0.) - # so we change the sign directly to a copy - tmp = Decimal(other) - tmp._sign = 1-tmp._sign - - return self.__add__(tmp, context=context) - - def __rsub__(self, other, context=None): - """Return other + (-self)""" - other = _convert_other(other) - if other is NotImplemented: - return other - - tmp = Decimal(self) - tmp._sign = 1 - tmp._sign - return other.__add__(tmp, context=context) - - def _increment(self, round=1, context=None): - """Special case of add, adding 1eExponent - - Since it is common, (rounding, for example) this adds - (sign)*one E self._exp to the number more efficiently than add. - - For example: - Decimal('5.624e10')._increment() == Decimal('5.625e10') - """ - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - return Decimal(self) # Must be infinite, and incrementing makes no difference - - L = list(self._int) - L[-1] += 1 - spot = len(L)-1 - while L[spot] == 10: - L[spot] = 0 - if spot == 0: - L[0:0] = [1] - break - L[spot-1] += 1 - spot -= 1 - ans = Decimal((self._sign, L, self._exp)) - - if context is None: - context = getcontext() - if round and context._rounding_decision == ALWAYS_ROUND: - ans = ans._fix(context) - return ans - - def __mul__(self, other, context=None): - """Return self * other. - - (+-) INF * 0 (or its reverse) raise InvalidOperation. - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - if context is None: - context = getcontext() - - resultsign = self._sign ^ other._sign - - if self._is_special or other._is_special: - ans = self._check_nans(other, context) - if ans: - return ans - - if self._isinfinity(): - if not other: - return context._raise_error(InvalidOperation, '(+-)INF * 0') - return Infsign[resultsign] - - if other._isinfinity(): - if not self: - return context._raise_error(InvalidOperation, '0 * (+-)INF') - return Infsign[resultsign] - - resultexp = self._exp + other._exp - shouldround = context._rounding_decision == ALWAYS_ROUND - - # Special case for multiplying by zero - if not self or not other: - ans = Decimal((resultsign, (0,), resultexp)) - if shouldround: - #Fixing in case the exponent is out of bounds - ans = ans._fix(context) - return ans - - # Special case for multiplying by power of 10 - if self._int == (1,): - ans = Decimal((resultsign, other._int, resultexp)) - if shouldround: - ans = ans._fix(context) - return ans - if other._int == (1,): - ans = Decimal((resultsign, self._int, resultexp)) - if shouldround: - ans = ans._fix(context) - return ans - - op1 = _WorkRep(self) - op2 = _WorkRep(other) - - ans = Decimal( (resultsign, map(int, str(op1.int * op2.int)), resultexp)) - if shouldround: - ans = ans._fix(context) - - return ans - __rmul__ = __mul__ - - def __div__(self, other, context=None): - """Return self / other.""" - return self._divide(other, context=context) - __truediv__ = __div__ - - def _divide(self, other, divmod = 0, context=None): - """Return a / b, to context.prec precision. - - divmod: - 0 => true division - 1 => (a //b, a%b) - 2 => a //b - 3 => a%b - - Actually, if divmod is 2 or 3 a tuple is returned, but errors for - computing the other value are not raised. - """ - other = _convert_other(other) - if other is NotImplemented: - if divmod in (0, 1): - return NotImplemented - return (NotImplemented, NotImplemented) - - if context is None: - context = getcontext() - - sign = self._sign ^ other._sign - - if self._is_special or other._is_special: - ans = self._check_nans(other, context) - if ans: - if divmod: - return (ans, ans) - return ans - - if self._isinfinity() and other._isinfinity(): - if divmod: - return (context._raise_error(InvalidOperation, - '(+-)INF // (+-)INF'), - context._raise_error(InvalidOperation, - '(+-)INF % (+-)INF')) - return context._raise_error(InvalidOperation, '(+-)INF/(+-)INF') - - if self._isinfinity(): - if divmod == 1: - return (Infsign[sign], - context._raise_error(InvalidOperation, 'INF % x')) - elif divmod == 2: - return (Infsign[sign], NaN) - elif divmod == 3: - return (Infsign[sign], - context._raise_error(InvalidOperation, 'INF % x')) - return Infsign[sign] - - if other._isinfinity(): - if divmod: - return (Decimal((sign, (0,), 0)), Decimal(self)) - context._raise_error(Clamped, 'Division by infinity') - return Decimal((sign, (0,), context.Etiny())) - - # Special cases for zeroes - if not self and not other: - if divmod: - return context._raise_error(DivisionUndefined, '0 / 0', 1) - return context._raise_error(DivisionUndefined, '0 / 0') - - if not self: - if divmod: - otherside = Decimal(self) - otherside._exp = min(self._exp, other._exp) - return (Decimal((sign, (0,), 0)), otherside) - exp = self._exp - other._exp - if exp < context.Etiny(): - exp = context.Etiny() - context._raise_error(Clamped, '0e-x / y') - if exp > context.Emax: - exp = context.Emax - context._raise_error(Clamped, '0e+x / y') - return Decimal( (sign, (0,), exp) ) - - if not other: - if divmod: - return context._raise_error(DivisionByZero, 'divmod(x,0)', - sign, 1) - return context._raise_error(DivisionByZero, 'x / 0', sign) - - #OK, so neither = 0, INF or NaN - - shouldround = context._rounding_decision == ALWAYS_ROUND - - #If we're dividing into ints, and self < other, stop. - #self.__abs__(0) does not round. - if divmod and (self.__abs__(0, context) < other.__abs__(0, context)): - - if divmod == 1 or divmod == 3: - exp = min(self._exp, other._exp) - ans2 = self._rescale(exp, context=context, watchexp=0) - if shouldround: - ans2 = ans2._fix(context) - return (Decimal( (sign, (0,), 0) ), - ans2) - - elif divmod == 2: - #Don't round the mod part, if we don't need it. - return (Decimal( (sign, (0,), 0) ), Decimal(self)) - - op1 = _WorkRep(self) - op2 = _WorkRep(other) - op1, op2, adjust = _adjust_coefficients(op1, op2) - res = _WorkRep( (sign, 0, (op1.exp - op2.exp)) ) - if divmod and res.exp > context.prec + 1: - return context._raise_error(DivisionImpossible) - - prec_limit = 10 ** context.prec - while 1: - while op2.int <= op1.int: - res.int += 1 - op1.int -= op2.int - if res.exp == 0 and divmod: - if res.int >= prec_limit and shouldround: - return context._raise_error(DivisionImpossible) - otherside = Decimal(op1) - frozen = context._ignore_all_flags() - - exp = min(self._exp, other._exp) - otherside = otherside._rescale(exp, context=context, watchexp=0) - context._regard_flags(*frozen) - if shouldround: - otherside = otherside._fix(context) - return (Decimal(res), otherside) - - if op1.int == 0 and adjust >= 0 and not divmod: - break - if res.int >= prec_limit and shouldround: - if divmod: - return context._raise_error(DivisionImpossible) - shouldround=1 - # Really, the answer is a bit higher, so adding a one to - # the end will make sure the rounding is right. - if op1.int != 0: - res.int *= 10 - res.int += 1 - res.exp -= 1 - - break - res.int *= 10 - res.exp -= 1 - adjust += 1 - op1.int *= 10 - op1.exp -= 1 - - if res.exp == 0 and divmod and op2.int > op1.int: - #Solves an error in precision. Same as a previous block. - - if res.int >= prec_limit and shouldround: - return context._raise_error(DivisionImpossible) - otherside = Decimal(op1) - frozen = context._ignore_all_flags() - - exp = min(self._exp, other._exp) - otherside = otherside._rescale(exp, context=context) - - context._regard_flags(*frozen) - - return (Decimal(res), otherside) - - ans = Decimal(res) - if shouldround: - ans = ans._fix(context) - return ans - - def __rdiv__(self, other, context=None): - """Swaps self/other and returns __div__.""" - other = _convert_other(other) - if other is NotImplemented: - return other - return other.__div__(self, context=context) - __rtruediv__ = __rdiv__ - - def __divmod__(self, other, context=None): - """ - (self // other, self % other) - """ - return self._divide(other, 1, context) - - def __rdivmod__(self, other, context=None): - """Swaps self/other and returns __divmod__.""" - other = _convert_other(other) - if other is NotImplemented: - return other - return other.__divmod__(self, context=context) - - def __mod__(self, other, context=None): - """ - self % other - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - if self._is_special or other._is_special: - ans = self._check_nans(other, context) - if ans: - return ans - - if self and not other: - return context._raise_error(InvalidOperation, 'x % 0') - - return self._divide(other, 3, context)[1] - - def __rmod__(self, other, context=None): - """Swaps self/other and returns __mod__.""" - other = _convert_other(other) - if other is NotImplemented: - return other - return other.__mod__(self, context=context) - - def remainder_near(self, other, context=None): - """ - Remainder nearest to 0- abs(remainder-near) <= other/2 - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - if self._is_special or other._is_special: - ans = self._check_nans(other, context) - if ans: - return ans - if self and not other: - return context._raise_error(InvalidOperation, 'x % 0') - - if context is None: - context = getcontext() - # If DivisionImpossible causes an error, do not leave Rounded/Inexact - # ignored in the calling function. - context = context._shallow_copy() - flags = context._ignore_flags(Rounded, Inexact) - #keep DivisionImpossible flags - (side, r) = self.__divmod__(other, context=context) - - if r._isnan(): - context._regard_flags(*flags) - return r - - context = context._shallow_copy() - rounding = context._set_rounding_decision(NEVER_ROUND) - - if other._sign: - comparison = other.__div__(Decimal(-2), context=context) - else: - comparison = other.__div__(Decimal(2), context=context) - - context._set_rounding_decision(rounding) - context._regard_flags(*flags) - - s1, s2 = r._sign, comparison._sign - r._sign, comparison._sign = 0, 0 - - if r < comparison: - r._sign, comparison._sign = s1, s2 - #Get flags now - self.__divmod__(other, context=context) - return r._fix(context) - r._sign, comparison._sign = s1, s2 - - rounding = context._set_rounding_decision(NEVER_ROUND) - - (side, r) = self.__divmod__(other, context=context) - context._set_rounding_decision(rounding) - if r._isnan(): - return r - - decrease = not side._iseven() - rounding = context._set_rounding_decision(NEVER_ROUND) - side = side.__abs__(context=context) - context._set_rounding_decision(rounding) - - s1, s2 = r._sign, comparison._sign - r._sign, comparison._sign = 0, 0 - if r > comparison or decrease and r == comparison: - r._sign, comparison._sign = s1, s2 - context.prec += 1 - if len(side.__add__(Decimal(1), context=context)._int) >= context.prec: - context.prec -= 1 - return context._raise_error(DivisionImpossible)[1] - context.prec -= 1 - if self._sign == other._sign: - r = r.__sub__(other, context=context) - else: - r = r.__add__(other, context=context) - else: - r._sign, comparison._sign = s1, s2 - - return r._fix(context) - - def __floordiv__(self, other, context=None): - """self // other""" - return self._divide(other, 2, context)[0] - - def __rfloordiv__(self, other, context=None): - """Swaps self/other and returns __floordiv__.""" - other = _convert_other(other) - if other is NotImplemented: - return other - return other.__floordiv__(self, context=context) - - def __float__(self): - """Float representation.""" - return float(str(self)) - - def __int__(self): - """Converts self to an int, truncating if necessary.""" - if self._is_special: - if self._isnan(): - context = getcontext() - return context._raise_error(InvalidContext) - elif self._isinfinity(): - raise OverflowError, "Cannot convert infinity to long" - if self._exp >= 0: - s = ''.join(map(str, self._int)) + '0'*self._exp - else: - s = ''.join(map(str, self._int))[:self._exp] - if s == '': - s = '0' - sign = '-'*self._sign - return int(sign + s) - - def __long__(self): - """Converts to a long. - - Equivalent to long(int(self)) - """ - return long(self.__int__()) - - def _fix(self, context): - """Round if it is necessary to keep self within prec precision. - - Rounds and fixes the exponent. Does not raise on a sNaN. - - Arguments: - self - Decimal instance - context - context used. - """ - if self._is_special: - return self - if context is None: - context = getcontext() - prec = context.prec - ans = self._fixexponents(context) - if len(ans._int) > prec: - ans = ans._round(prec, context=context) - ans = ans._fixexponents(context) - return ans - - def _fixexponents(self, context): - """Fix the exponents and return a copy with the exponent in bounds. - Only call if known to not be a special value. - """ - folddown = context._clamp - Emin = context.Emin - ans = self - ans_adjusted = ans.adjusted() - if ans_adjusted < Emin: - Etiny = context.Etiny() - if ans._exp < Etiny: - if not ans: - ans = Decimal(self) - ans._exp = Etiny - context._raise_error(Clamped) - return ans - ans = ans._rescale(Etiny, context=context) - #It isn't zero, and exp < Emin => subnormal - context._raise_error(Subnormal) - if context.flags[Inexact]: - context._raise_error(Underflow) - else: - if ans: - #Only raise subnormal if non-zero. - context._raise_error(Subnormal) - else: - Etop = context.Etop() - if folddown and ans._exp > Etop: - context._raise_error(Clamped) - ans = ans._rescale(Etop, context=context) - else: - Emax = context.Emax - if ans_adjusted > Emax: - if not ans: - ans = Decimal(self) - ans._exp = Emax - context._raise_error(Clamped) - return ans - context._raise_error(Inexact) - context._raise_error(Rounded) - return context._raise_error(Overflow, 'above Emax', ans._sign) - return ans - - def _round(self, prec=None, rounding=None, context=None): - """Returns a rounded version of self. - - You can specify the precision or rounding method. Otherwise, the - context determines it. - """ - - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - if self._isinfinity(): - return Decimal(self) - - if context is None: - context = getcontext() - - if rounding is None: - rounding = context.rounding - if prec is None: - prec = context.prec - - if not self: - if prec <= 0: - dig = (0,) - exp = len(self._int) - prec + self._exp - else: - dig = (0,) * prec - exp = len(self._int) + self._exp - prec - ans = Decimal((self._sign, dig, exp)) - context._raise_error(Rounded) - return ans - - if prec == 0: - temp = Decimal(self) - temp._int = (0,)+temp._int - prec = 1 - elif prec < 0: - exp = self._exp + len(self._int) - prec - 1 - temp = Decimal( (self._sign, (0, 1), exp)) - prec = 1 - else: - temp = Decimal(self) - - numdigits = len(temp._int) - if prec == numdigits: - return temp - - # See if we need to extend precision - expdiff = prec - numdigits - if expdiff > 0: - tmp = list(temp._int) - tmp.extend([0] * expdiff) - ans = Decimal( (temp._sign, tmp, temp._exp - expdiff)) - return ans - - #OK, but maybe all the lost digits are 0. - lostdigits = self._int[expdiff:] - if lostdigits == (0,) * len(lostdigits): - ans = Decimal( (temp._sign, temp._int[:prec], temp._exp - expdiff)) - #Rounded, but not Inexact - context._raise_error(Rounded) - return ans - - # Okay, let's round and lose data - - this_function = getattr(temp, self._pick_rounding_function[rounding]) - #Now we've got the rounding function - - if prec != context.prec: - context = context._shallow_copy() - context.prec = prec - ans = this_function(prec, expdiff, context) - context._raise_error(Rounded) - context._raise_error(Inexact, 'Changed in rounding') - - return ans - - _pick_rounding_function = {} - - def _round_down(self, prec, expdiff, context): - """Also known as round-towards-0, truncate.""" - return Decimal( (self._sign, self._int[:prec], self._exp - expdiff) ) - - def _round_half_up(self, prec, expdiff, context, tmp = None): - """Rounds 5 up (away from 0)""" - - if tmp is None: - tmp = Decimal( (self._sign,self._int[:prec], self._exp - expdiff)) - if self._int[prec] >= 5: - tmp = tmp._increment(round=0, context=context) - if len(tmp._int) > prec: - return Decimal( (tmp._sign, tmp._int[:-1], tmp._exp + 1)) - return tmp - - def _round_half_even(self, prec, expdiff, context): - """Round 5 to even, rest to nearest.""" - - tmp = Decimal( (self._sign, self._int[:prec], self._exp - expdiff)) - half = (self._int[prec] == 5) - if half: - for digit in self._int[prec+1:]: - if digit != 0: - half = 0 - break - if half: - if self._int[prec-1] & 1 == 0: - return tmp - return self._round_half_up(prec, expdiff, context, tmp) - - def _round_half_down(self, prec, expdiff, context): - """Round 5 down""" - - tmp = Decimal( (self._sign, self._int[:prec], self._exp - expdiff)) - half = (self._int[prec] == 5) - if half: - for digit in self._int[prec+1:]: - if digit != 0: - half = 0 - break - if half: - return tmp - return self._round_half_up(prec, expdiff, context, tmp) - - def _round_up(self, prec, expdiff, context): - """Rounds away from 0.""" - tmp = Decimal( (self._sign, self._int[:prec], self._exp - expdiff) ) - for digit in self._int[prec:]: - if digit != 0: - tmp = tmp._increment(round=1, context=context) - if len(tmp._int) > prec: - return Decimal( (tmp._sign, tmp._int[:-1], tmp._exp + 1)) - else: - return tmp - return tmp - - def _round_ceiling(self, prec, expdiff, context): - """Rounds up (not away from 0 if negative.)""" - if self._sign: - return self._round_down(prec, expdiff, context) - else: - return self._round_up(prec, expdiff, context) - - def _round_floor(self, prec, expdiff, context): - """Rounds down (not towards 0 if negative)""" - if not self._sign: - return self._round_down(prec, expdiff, context) - else: - return self._round_up(prec, expdiff, context) - - def __pow__(self, n, modulo = None, context=None): - """Return self ** n (mod modulo) - - If modulo is None (default), don't take it mod modulo. - """ - n = _convert_other(n) - if n is NotImplemented: - return n - - if context is None: - context = getcontext() - - if self._is_special or n._is_special or n.adjusted() > 8: - #Because the spot << doesn't work with really big exponents - if n._isinfinity() or n.adjusted() > 8: - return context._raise_error(InvalidOperation, 'x ** INF') - - ans = self._check_nans(n, context) - if ans: - return ans - - if not n._isinteger(): - return context._raise_error(InvalidOperation, 'x ** (non-integer)') - - if not self and not n: - return context._raise_error(InvalidOperation, '0 ** 0') - - if not n: - return Decimal(1) - - if self == Decimal(1): - return Decimal(1) - - sign = self._sign and not n._iseven() - n = int(n) - - if self._isinfinity(): - if modulo: - return context._raise_error(InvalidOperation, 'INF % x') - if n > 0: - return Infsign[sign] - return Decimal( (sign, (0,), 0) ) - - #with ludicrously large exponent, just raise an overflow and return inf. - if not modulo and n > 0 and (self._exp + len(self._int) - 1) * n > context.Emax \ - and self: - - tmp = Decimal('inf') - tmp._sign = sign - context._raise_error(Rounded) - context._raise_error(Inexact) - context._raise_error(Overflow, 'Big power', sign) - return tmp - - elength = len(str(abs(n))) - firstprec = context.prec - - if not modulo and firstprec + elength + 1 > DefaultContext.Emax: - return context._raise_error(Overflow, 'Too much precision.', sign) - - mul = Decimal(self) - val = Decimal(1) - context = context._shallow_copy() - context.prec = firstprec + elength + 1 - if n < 0: - #n is a long now, not Decimal instance - n = -n - mul = Decimal(1).__div__(mul, context=context) - - spot = 1 - while spot <= n: - spot <<= 1 - - spot >>= 1 - #Spot is the highest power of 2 less than n - while spot: - val = val.__mul__(val, context=context) - if val._isinfinity(): - val = Infsign[sign] - break - if spot & n: - val = val.__mul__(mul, context=context) - if modulo is not None: - val = val.__mod__(modulo, context=context) - spot >>= 1 - context.prec = firstprec - - if context._rounding_decision == ALWAYS_ROUND: - return val._fix(context) - return val - - def __rpow__(self, other, context=None): - """Swaps self/other and returns __pow__.""" - other = _convert_other(other) - if other is NotImplemented: - return other - return other.__pow__(self, context=context) - - def normalize(self, context=None): - """Normalize- strip trailing 0s, change anything equal to 0 to 0e0""" - - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - dup = self._fix(context) - if dup._isinfinity(): - return dup - - if not dup: - return Decimal( (dup._sign, (0,), 0) ) - end = len(dup._int) - exp = dup._exp - while dup._int[end-1] == 0: - exp += 1 - end -= 1 - return Decimal( (dup._sign, dup._int[:end], exp) ) - - - def quantize(self, exp, rounding=None, context=None, watchexp=1): - """Quantize self so its exponent is the same as that of exp. - - Similar to self._rescale(exp._exp) but with error checking. - """ - if self._is_special or exp._is_special: - ans = self._check_nans(exp, context) - if ans: - return ans - - if exp._isinfinity() or self._isinfinity(): - if exp._isinfinity() and self._isinfinity(): - return self #if both are inf, it is OK - if context is None: - context = getcontext() - return context._raise_error(InvalidOperation, - 'quantize with one INF') - return self._rescale(exp._exp, rounding, context, watchexp) - - def same_quantum(self, other): - """Test whether self and other have the same exponent. - - same as self._exp == other._exp, except NaN == sNaN - """ - if self._is_special or other._is_special: - if self._isnan() or other._isnan(): - return self._isnan() and other._isnan() and True - if self._isinfinity() or other._isinfinity(): - return self._isinfinity() and other._isinfinity() and True - return self._exp == other._exp - - def _rescale(self, exp, rounding=None, context=None, watchexp=1): - """Rescales so that the exponent is exp. - - exp = exp to scale to (an integer) - rounding = rounding version - watchexp: if set (default) an error is returned if exp is greater - than Emax or less than Etiny. - """ - if context is None: - context = getcontext() - - if self._is_special: - if self._isinfinity(): - return context._raise_error(InvalidOperation, 'rescale with an INF') - - ans = self._check_nans(context=context) - if ans: - return ans - - if watchexp and (context.Emax < exp or context.Etiny() > exp): - return context._raise_error(InvalidOperation, 'rescale(a, INF)') - - if not self: - ans = Decimal(self) - ans._int = (0,) - ans._exp = exp - return ans - - diff = self._exp - exp - digits = len(self._int) + diff - - if watchexp and digits > context.prec: - return context._raise_error(InvalidOperation, 'Rescale > prec') - - tmp = Decimal(self) - tmp._int = (0,) + tmp._int - digits += 1 - - if digits < 0: - tmp._exp = -digits + tmp._exp - tmp._int = (0,1) - digits = 1 - tmp = tmp._round(digits, rounding, context=context) - - if tmp._int[0] == 0 and len(tmp._int) > 1: - tmp._int = tmp._int[1:] - tmp._exp = exp - - tmp_adjusted = tmp.adjusted() - if tmp and tmp_adjusted < context.Emin: - context._raise_error(Subnormal) - elif tmp and tmp_adjusted > context.Emax: - return context._raise_error(InvalidOperation, 'rescale(a, INF)') - return tmp - - def to_integral(self, rounding=None, context=None): - """Rounds to the nearest integer, without raising inexact, rounded.""" - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - if self._exp >= 0: - return self - if context is None: - context = getcontext() - flags = context._ignore_flags(Rounded, Inexact) - ans = self._rescale(0, rounding, context=context) - context._regard_flags(flags) - return ans - - def sqrt(self, context=None): - """Return the square root of self. - - Uses a converging algorithm (Xn+1 = 0.5*(Xn + self / Xn)) - Should quadratically approach the right answer. - """ - if self._is_special: - ans = self._check_nans(context=context) - if ans: - return ans - - if self._isinfinity() and self._sign == 0: - return Decimal(self) - - if not self: - #exponent = self._exp / 2, using round_down. - #if self._exp < 0: - # exp = (self._exp+1) // 2 - #else: - exp = (self._exp) // 2 - if self._sign == 1: - #sqrt(-0) = -0 - return Decimal( (1, (0,), exp)) - else: - return Decimal( (0, (0,), exp)) - - if context is None: - context = getcontext() - - if self._sign == 1: - return context._raise_error(InvalidOperation, 'sqrt(-x), x > 0') - - tmp = Decimal(self) - - expadd = tmp._exp // 2 - if tmp._exp & 1: - tmp._int += (0,) - tmp._exp = 0 - else: - tmp._exp = 0 - - context = context._shallow_copy() - flags = context._ignore_all_flags() - firstprec = context.prec - context.prec = 3 - if tmp.adjusted() & 1 == 0: - ans = Decimal( (0, (8,1,9), tmp.adjusted() - 2) ) - ans = ans.__add__(tmp.__mul__(Decimal((0, (2,5,9), -2)), - context=context), context=context) - ans._exp -= 1 + tmp.adjusted() // 2 - else: - ans = Decimal( (0, (2,5,9), tmp._exp + len(tmp._int)- 3) ) - ans = ans.__add__(tmp.__mul__(Decimal((0, (8,1,9), -3)), - context=context), context=context) - ans._exp -= 1 + tmp.adjusted() // 2 - - #ans is now a linear approximation. - - Emax, Emin = context.Emax, context.Emin - context.Emax, context.Emin = DefaultContext.Emax, DefaultContext.Emin - - half = Decimal('0.5') - - maxp = firstprec + 2 - rounding = context._set_rounding(ROUND_HALF_EVEN) - while 1: - context.prec = min(2*context.prec - 2, maxp) - ans = half.__mul__(ans.__add__(tmp.__div__(ans, context=context), - context=context), context=context) - if context.prec == maxp: - break - - #round to the answer's precision-- the only error can be 1 ulp. - context.prec = firstprec - prevexp = ans.adjusted() - ans = ans._round(context=context) - - #Now, check if the other last digits are better. - context.prec = firstprec + 1 - # In case we rounded up another digit and we should actually go lower. - if prevexp != ans.adjusted(): - ans._int += (0,) - ans._exp -= 1 - - - lower = ans.__sub__(Decimal((0, (5,), ans._exp-1)), context=context) - context._set_rounding(ROUND_UP) - if lower.__mul__(lower, context=context) > (tmp): - ans = ans.__sub__(Decimal((0, (1,), ans._exp)), context=context) - - else: - upper = ans.__add__(Decimal((0, (5,), ans._exp-1)),context=context) - context._set_rounding(ROUND_DOWN) - if upper.__mul__(upper, context=context) < tmp: - ans = ans.__add__(Decimal((0, (1,), ans._exp)),context=context) - - ans._exp += expadd - - context.prec = firstprec - context.rounding = rounding - ans = ans._fix(context) - - rounding = context._set_rounding_decision(NEVER_ROUND) - if not ans.__mul__(ans, context=context) == self: - # Only rounded/inexact if here. - context._regard_flags(flags) - context._raise_error(Rounded) - context._raise_error(Inexact) - else: - #Exact answer, so let's set the exponent right. - #if self._exp < 0: - # exp = (self._exp +1)// 2 - #else: - exp = self._exp // 2 - context.prec += ans._exp - exp - ans = ans._rescale(exp, context=context) - context.prec = firstprec - context._regard_flags(flags) - context.Emax, context.Emin = Emax, Emin - - return ans._fix(context) - - def max(self, other, context=None): - """Returns the larger value. - - like max(self, other) except if one is not a number, returns - NaN (and signals if one is sNaN). Also rounds. - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - if self._is_special or other._is_special: - # if one operand is a quiet NaN and the other is number, then the - # number is always returned - sn = self._isnan() - on = other._isnan() - if sn or on: - if on == 1 and sn != 2: - return self - if sn == 1 and on != 2: - return other - return self._check_nans(other, context) - - ans = self - c = self.__cmp__(other) - if c == 0: - # if both operands are finite and equal in numerical value - # then an ordering is applied: - # - # if the signs differ then max returns the operand with the - # positive sign and min returns the operand with the negative sign - # - # if the signs are the same then the exponent is used to select - # the result. - if self._sign != other._sign: - if self._sign: - ans = other - elif self._exp < other._exp and not self._sign: - ans = other - elif self._exp > other._exp and self._sign: - ans = other - elif c == -1: - ans = other - - if context is None: - context = getcontext() - if context._rounding_decision == ALWAYS_ROUND: - return ans._fix(context) - return ans - - def min(self, other, context=None): - """Returns the smaller value. - - like min(self, other) except if one is not a number, returns - NaN (and signals if one is sNaN). Also rounds. - """ - other = _convert_other(other) - if other is NotImplemented: - return other - - if self._is_special or other._is_special: - # if one operand is a quiet NaN and the other is number, then the - # number is always returned - sn = self._isnan() - on = other._isnan() - if sn or on: - if on == 1 and sn != 2: - return self - if sn == 1 and on != 2: - return other - return self._check_nans(other, context) - - ans = self - c = self.__cmp__(other) - if c == 0: - # if both operands are finite and equal in numerical value - # then an ordering is applied: - # - # if the signs differ then max returns the operand with the - # positive sign and min returns the operand with the negative sign - # - # if the signs are the same then the exponent is used to select - # the result. - if self._sign != other._sign: - if other._sign: - ans = other - elif self._exp > other._exp and not self._sign: - ans = other - elif self._exp < other._exp and self._sign: - ans = other - elif c == 1: - ans = other - - if context is None: - context = getcontext() - if context._rounding_decision == ALWAYS_ROUND: - return ans._fix(context) - return ans - - def _isinteger(self): - """Returns whether self is an integer""" - if self._exp >= 0: - return True - rest = self._int[self._exp:] - return rest == (0,)*len(rest) - - def _iseven(self): - """Returns 1 if self is even. Assumes self is an integer.""" - if self._exp > 0: - return 1 - return self._int[-1+self._exp] & 1 == 0 - - def adjusted(self): - """Return the adjusted exponent of self""" - try: - return self._exp + len(self._int) - 1 - #If NaN or Infinity, self._exp is string - except TypeError: - return 0 - - # support for pickling, copy, and deepcopy - def __reduce__(self): - return (self.__class__, (str(self),)) - - def __copy__(self): - if type(self) == Decimal: - return self # I'm immutable; therefore I am my own clone - return self.__class__(str(self)) - - def __deepcopy__(self, memo): - if type(self) == Decimal: - return self # My components are also immutable - return self.__class__(str(self)) - -##### Context class ########################################### - - -# get rounding method function: -rounding_functions = [name for name in Decimal.__dict__.keys() if name.startswith('_round_')] -for name in rounding_functions: - #name is like _round_half_even, goes to the global ROUND_HALF_EVEN value. - globalname = name[1:].upper() - val = globals()[globalname] - Decimal._pick_rounding_function[val] = name - -del name, val, globalname, rounding_functions - -class Context(object): - """Contains the context for a Decimal instance. - - Contains: - prec - precision (for use in rounding, division, square roots..) - rounding - rounding type. (how you round) - _rounding_decision - ALWAYS_ROUND, NEVER_ROUND -- do you round? - traps - If traps[exception] = 1, then the exception is - raised when it is caused. Otherwise, a value is - substituted in. - flags - When an exception is caused, flags[exception] is incremented. - (Whether or not the trap_enabler is set) - Should be reset by user of Decimal instance. - Emin - Minimum exponent - Emax - Maximum exponent - capitals - If 1, 1*10^1 is printed as 1E+1. - If 0, printed as 1e1 - _clamp - If 1, change exponents if too high (Default 0) - """ - - def __init__(self, prec=None, rounding=None, - traps=None, flags=None, - _rounding_decision=None, - Emin=None, Emax=None, - capitals=None, _clamp=0, - _ignored_flags=None): - if flags is None: - flags = [] - if _ignored_flags is None: - _ignored_flags = [] - if not isinstance(flags, dict): - flags = dict([(s,s in flags) for s in _signals]) - del s - if traps is not None and not isinstance(traps, dict): - traps = dict([(s,s in traps) for s in _signals]) - del s - for name, val in locals().items(): - if val is None: - setattr(self, name, _copy.copy(getattr(DefaultContext, name))) - else: - setattr(self, name, val) - del self.self - - def __repr__(self): - """Show the current context.""" - s = [] - s.append('Context(prec=%(prec)d, rounding=%(rounding)s, Emin=%(Emin)d, Emax=%(Emax)d, capitals=%(capitals)d' % vars(self)) - s.append('flags=[' + ', '.join([f.__name__ for f, v in self.flags.items() if v]) + ']') - s.append('traps=[' + ', '.join([t.__name__ for t, v in self.traps.items() if v]) + ']') - return ', '.join(s) + ')' - - def clear_flags(self): - """Reset all flags to zero""" - for flag in self.flags: - self.flags[flag] = 0 - - def _shallow_copy(self): - """Returns a shallow copy from self.""" - nc = Context(self.prec, self.rounding, self.traps, self.flags, - self._rounding_decision, self.Emin, self.Emax, - self.capitals, self._clamp, self._ignored_flags) - return nc - - def copy(self): - """Returns a deep copy from self.""" - nc = Context(self.prec, self.rounding, self.traps.copy(), self.flags.copy(), - self._rounding_decision, self.Emin, self.Emax, - self.capitals, self._clamp, self._ignored_flags) - return nc - __copy__ = copy - - def _raise_error(self, condition, explanation = None, *args): - """Handles an error - - If the flag is in _ignored_flags, returns the default response. - Otherwise, it increments the flag, then, if the corresponding - trap_enabler is set, it reaises the exception. Otherwise, it returns - the default value after incrementing the flag. - """ - error = _condition_map.get(condition, condition) - if error in self._ignored_flags: - #Don't touch the flag - return error().handle(self, *args) - - self.flags[error] += 1 - if not self.traps[error]: - #The errors define how to handle themselves. - return condition().handle(self, *args) - - # Errors should only be risked on copies of the context - #self._ignored_flags = [] - raise error, explanation - - def _ignore_all_flags(self): - """Ignore all flags, if they are raised""" - return self._ignore_flags(*_signals) - - def _ignore_flags(self, *flags): - """Ignore the flags, if they are raised""" - # Do not mutate-- This way, copies of a context leave the original - # alone. - self._ignored_flags = (self._ignored_flags + list(flags)) - return list(flags) - - def _regard_flags(self, *flags): - """Stop ignoring the flags, if they are raised""" - if flags and isinstance(flags[0], (tuple,list)): - flags = flags[0] - for flag in flags: - self._ignored_flags.remove(flag) - - def __hash__(self): - """A Context cannot be hashed.""" - # We inherit object.__hash__, so we must deny this explicitly - raise TypeError, "Cannot hash a Context." - - def Etiny(self): - """Returns Etiny (= Emin - prec + 1)""" - return int(self.Emin - self.prec + 1) - - def Etop(self): - """Returns maximum exponent (= Emax - prec + 1)""" - return int(self.Emax - self.prec + 1) - - def _set_rounding_decision(self, type): - """Sets the rounding decision. - - Sets the rounding decision, and returns the current (previous) - rounding decision. Often used like: - - context = context._shallow_copy() - # That so you don't change the calling context - # if an error occurs in the middle (say DivisionImpossible is raised). - - rounding = context._set_rounding_decision(NEVER_ROUND) - instance = instance / Decimal(2) - context._set_rounding_decision(rounding) - - This will make it not round for that operation. - """ - - rounding = self._rounding_decision - self._rounding_decision = type - return rounding - - def _set_rounding(self, type): - """Sets the rounding type. - - Sets the rounding type, and returns the current (previous) - rounding type. Often used like: - - context = context.copy() - # so you don't change the calling context - # if an error occurs in the middle. - rounding = context._set_rounding(ROUND_UP) - val = self.__sub__(other, context=context) - context._set_rounding(rounding) - - This will make it round up for that operation. - """ - rounding = self.rounding - self.rounding= type - return rounding - - def create_decimal(self, num='0'): - """Creates a new Decimal instance but using self as context.""" - d = Decimal(num, context=self) - return d._fix(self) - - #Methods - def abs(self, a): - """Returns the absolute value of the operand. - - If the operand is negative, the result is the same as using the minus - operation on the operand. Otherwise, the result is the same as using - the plus operation on the operand. - - >>> ExtendedContext.abs(Decimal('2.1')) - Decimal("2.1") - >>> ExtendedContext.abs(Decimal('-100')) - Decimal("100") - >>> ExtendedContext.abs(Decimal('101.5')) - Decimal("101.5") - >>> ExtendedContext.abs(Decimal('-101.5')) - Decimal("101.5") - """ - return a.__abs__(context=self) - - def add(self, a, b): - """Return the sum of the two operands. - - >>> ExtendedContext.add(Decimal('12'), Decimal('7.00')) - Decimal("19.00") - >>> ExtendedContext.add(Decimal('1E+2'), Decimal('1.01E+4')) - Decimal("1.02E+4") - """ - return a.__add__(b, context=self) - - def _apply(self, a): - return str(a._fix(self)) - - def compare(self, a, b): - """Compares values numerically. - - If the signs of the operands differ, a value representing each operand - ('-1' if the operand is less than zero, '0' if the operand is zero or - negative zero, or '1' if the operand is greater than zero) is used in - place of that operand for the comparison instead of the actual - operand. - - The comparison is then effected by subtracting the second operand from - the first and then returning a value according to the result of the - subtraction: '-1' if the result is less than zero, '0' if the result is - zero or negative zero, or '1' if the result is greater than zero. - - >>> ExtendedContext.compare(Decimal('2.1'), Decimal('3')) - Decimal("-1") - >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.1')) - Decimal("0") - >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.10')) - Decimal("0") - >>> ExtendedContext.compare(Decimal('3'), Decimal('2.1')) - Decimal("1") - >>> ExtendedContext.compare(Decimal('2.1'), Decimal('-3')) - Decimal("1") - >>> ExtendedContext.compare(Decimal('-3'), Decimal('2.1')) - Decimal("-1") - """ - return a.compare(b, context=self) - - def divide(self, a, b): - """Decimal division in a specified context. - - >>> ExtendedContext.divide(Decimal('1'), Decimal('3')) - Decimal("0.333333333") - >>> ExtendedContext.divide(Decimal('2'), Decimal('3')) - Decimal("0.666666667") - >>> ExtendedContext.divide(Decimal('5'), Decimal('2')) - Decimal("2.5") - >>> ExtendedContext.divide(Decimal('1'), Decimal('10')) - Decimal("0.1") - >>> ExtendedContext.divide(Decimal('12'), Decimal('12')) - Decimal("1") - >>> ExtendedContext.divide(Decimal('8.00'), Decimal('2')) - Decimal("4.00") - >>> ExtendedContext.divide(Decimal('2.400'), Decimal('2.0')) - Decimal("1.20") - >>> ExtendedContext.divide(Decimal('1000'), Decimal('100')) - Decimal("10") - >>> ExtendedContext.divide(Decimal('1000'), Decimal('1')) - Decimal("1000") - >>> ExtendedContext.divide(Decimal('2.40E+6'), Decimal('2')) - Decimal("1.20E+6") - """ - return a.__div__(b, context=self) - - def divide_int(self, a, b): - """Divides two numbers and returns the integer part of the result. - - >>> ExtendedContext.divide_int(Decimal('2'), Decimal('3')) - Decimal("0") - >>> ExtendedContext.divide_int(Decimal('10'), Decimal('3')) - Decimal("3") - >>> ExtendedContext.divide_int(Decimal('1'), Decimal('0.3')) - Decimal("3") - """ - return a.__floordiv__(b, context=self) - - def divmod(self, a, b): - return a.__divmod__(b, context=self) - - def max(self, a,b): - """max compares two values numerically and returns the maximum. - - If either operand is a NaN then the general rules apply. - Otherwise, the operands are compared as as though by the compare - operation. If they are numerically equal then the left-hand operand - is chosen as the result. Otherwise the maximum (closer to positive - infinity) of the two operands is chosen as the result. - - >>> ExtendedContext.max(Decimal('3'), Decimal('2')) - Decimal("3") - >>> ExtendedContext.max(Decimal('-10'), Decimal('3')) - Decimal("3") - >>> ExtendedContext.max(Decimal('1.0'), Decimal('1')) - Decimal("1") - >>> ExtendedContext.max(Decimal('7'), Decimal('NaN')) - Decimal("7") - """ - return a.max(b, context=self) - - def min(self, a,b): - """min compares two values numerically and returns the minimum. - - If either operand is a NaN then the general rules apply. - Otherwise, the operands are compared as as though by the compare - operation. If they are numerically equal then the left-hand operand - is chosen as the result. Otherwise the minimum (closer to negative - infinity) of the two operands is chosen as the result. - - >>> ExtendedContext.min(Decimal('3'), Decimal('2')) - Decimal("2") - >>> ExtendedContext.min(Decimal('-10'), Decimal('3')) - Decimal("-10") - >>> ExtendedContext.min(Decimal('1.0'), Decimal('1')) - Decimal("1.0") - >>> ExtendedContext.min(Decimal('7'), Decimal('NaN')) - Decimal("7") - """ - return a.min(b, context=self) - - def minus(self, a): - """Minus corresponds to unary prefix minus in Python. - - The operation is evaluated using the same rules as subtract; the - operation minus(a) is calculated as subtract('0', a) where the '0' - has the same exponent as the operand. - - >>> ExtendedContext.minus(Decimal('1.3')) - Decimal("-1.3") - >>> ExtendedContext.minus(Decimal('-1.3')) - Decimal("1.3") - """ - return a.__neg__(context=self) - - def multiply(self, a, b): - """multiply multiplies two operands. - - If either operand is a special value then the general rules apply. - Otherwise, the operands are multiplied together ('long multiplication'), - resulting in a number which may be as long as the sum of the lengths - of the two operands. - - >>> ExtendedContext.multiply(Decimal('1.20'), Decimal('3')) - Decimal("3.60") - >>> ExtendedContext.multiply(Decimal('7'), Decimal('3')) - Decimal("21") - >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('0.8')) - Decimal("0.72") - >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('-0')) - Decimal("-0.0") - >>> ExtendedContext.multiply(Decimal('654321'), Decimal('654321')) - Decimal("4.28135971E+11") - """ - return a.__mul__(b, context=self) - - def normalize(self, a): - """normalize reduces an operand to its simplest form. - - Essentially a plus operation with all trailing zeros removed from the - result. - - >>> ExtendedContext.normalize(Decimal('2.1')) - Decimal("2.1") - >>> ExtendedContext.normalize(Decimal('-2.0')) - Decimal("-2") - >>> ExtendedContext.normalize(Decimal('1.200')) - Decimal("1.2") - >>> ExtendedContext.normalize(Decimal('-120')) - Decimal("-1.2E+2") - >>> ExtendedContext.normalize(Decimal('120.00')) - Decimal("1.2E+2") - >>> ExtendedContext.normalize(Decimal('0.00')) - Decimal("0") - """ - return a.normalize(context=self) - - def plus(self, a): - """Plus corresponds to unary prefix plus in Python. - - The operation is evaluated using the same rules as add; the - operation plus(a) is calculated as add('0', a) where the '0' - has the same exponent as the operand. - - >>> ExtendedContext.plus(Decimal('1.3')) - Decimal("1.3") - >>> ExtendedContext.plus(Decimal('-1.3')) - Decimal("-1.3") - """ - return a.__pos__(context=self) - - def power(self, a, b, modulo=None): - """Raises a to the power of b, to modulo if given. - - The right-hand operand must be a whole number whose integer part (after - any exponent has been applied) has no more than 9 digits and whose - fractional part (if any) is all zeros before any rounding. The operand - may be positive, negative, or zero; if negative, the absolute value of - the power is used, and the left-hand operand is inverted (divided into - 1) before use. - - If the increased precision needed for the intermediate calculations - exceeds the capabilities of the implementation then an Invalid operation - condition is raised. - - If, when raising to a negative power, an underflow occurs during the - division into 1, the operation is not halted at that point but - continues. - - >>> ExtendedContext.power(Decimal('2'), Decimal('3')) - Decimal("8") - >>> ExtendedContext.power(Decimal('2'), Decimal('-3')) - Decimal("0.125") - >>> ExtendedContext.power(Decimal('1.7'), Decimal('8')) - Decimal("69.7575744") - >>> ExtendedContext.power(Decimal('Infinity'), Decimal('-2')) - Decimal("0") - >>> ExtendedContext.power(Decimal('Infinity'), Decimal('-1')) - Decimal("0") - >>> ExtendedContext.power(Decimal('Infinity'), Decimal('0')) - Decimal("1") - >>> ExtendedContext.power(Decimal('Infinity'), Decimal('1')) - Decimal("Infinity") - >>> ExtendedContext.power(Decimal('Infinity'), Decimal('2')) - Decimal("Infinity") - >>> ExtendedContext.power(Decimal('-Infinity'), Decimal('-2')) - Decimal("0") - >>> ExtendedContext.power(Decimal('-Infinity'), Decimal('-1')) - Decimal("-0") - >>> ExtendedContext.power(Decimal('-Infinity'), Decimal('0')) - Decimal("1") - >>> ExtendedContext.power(Decimal('-Infinity'), Decimal('1')) - Decimal("-Infinity") - >>> ExtendedContext.power(Decimal('-Infinity'), Decimal('2')) - Decimal("Infinity") - >>> ExtendedContext.power(Decimal('0'), Decimal('0')) - Decimal("NaN") - """ - return a.__pow__(b, modulo, context=self) - - def quantize(self, a, b): - """Returns a value equal to 'a' (rounded) and having the exponent of 'b'. - - The coefficient of the result is derived from that of the left-hand - operand. It may be rounded using the current rounding setting (if the - exponent is being increased), multiplied by a positive power of ten (if - the exponent is being decreased), or is unchanged (if the exponent is - already equal to that of the right-hand operand). - - Unlike other operations, if the length of the coefficient after the - quantize operation would be greater than precision then an Invalid - operation condition is raised. This guarantees that, unless there is an - error condition, the exponent of the result of a quantize is always - equal to that of the right-hand operand. - - Also unlike other operations, quantize will never raise Underflow, even - if the result is subnormal and inexact. - - >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001')) - Decimal("2.170") - >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01')) - Decimal("2.17") - >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1')) - Decimal("2.2") - >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0')) - Decimal("2") - >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1')) - Decimal("0E+1") - >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity')) - Decimal("-Infinity") - >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity')) - Decimal("NaN") - >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1')) - Decimal("-0") - >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5')) - Decimal("-0E+5") - >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2')) - Decimal("NaN") - >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2')) - Decimal("NaN") - >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1')) - Decimal("217.0") - >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0')) - Decimal("217") - >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1')) - Decimal("2.2E+2") - >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2')) - Decimal("2E+2") - """ - return a.quantize(b, context=self) - - def remainder(self, a, b): - """Returns the remainder from integer division. - - The result is the residue of the dividend after the operation of - calculating integer division as described for divide-integer, rounded to - precision digits if necessary. The sign of the result, if non-zero, is - the same as that of the original dividend. - - This operation will fail under the same conditions as integer division - (that is, if integer division on the same two operands would fail, the - remainder cannot be calculated). - - >>> ExtendedContext.remainder(Decimal('2.1'), Decimal('3')) - Decimal("2.1") - >>> ExtendedContext.remainder(Decimal('10'), Decimal('3')) - Decimal("1") - >>> ExtendedContext.remainder(Decimal('-10'), Decimal('3')) - Decimal("-1") - >>> ExtendedContext.remainder(Decimal('10.2'), Decimal('1')) - Decimal("0.2") - >>> ExtendedContext.remainder(Decimal('10'), Decimal('0.3')) - Decimal("0.1") - >>> ExtendedContext.remainder(Decimal('3.6'), Decimal('1.3')) - Decimal("1.0") - """ - return a.__mod__(b, context=self) - - def remainder_near(self, a, b): - """Returns to be "a - b * n", where n is the integer nearest the exact - value of "x / b" (if two integers are equally near then the even one - is chosen). If the result is equal to 0 then its sign will be the - sign of a. - - This operation will fail under the same conditions as integer division - (that is, if integer division on the same two operands would fail, the - remainder cannot be calculated). - - >>> ExtendedContext.remainder_near(Decimal('2.1'), Decimal('3')) - Decimal("-0.9") - >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('6')) - Decimal("-2") - >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('3')) - Decimal("1") - >>> ExtendedContext.remainder_near(Decimal('-10'), Decimal('3')) - Decimal("-1") - >>> ExtendedContext.remainder_near(Decimal('10.2'), Decimal('1')) - Decimal("0.2") - >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('0.3')) - Decimal("0.1") - >>> ExtendedContext.remainder_near(Decimal('3.6'), Decimal('1.3')) - Decimal("-0.3") - """ - return a.remainder_near(b, context=self) - - def same_quantum(self, a, b): - """Returns True if the two operands have the same exponent. - - The result is never affected by either the sign or the coefficient of - either operand. - - >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001')) - False - >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.01')) - True - >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('1')) - False - >>> ExtendedContext.same_quantum(Decimal('Inf'), Decimal('-Inf')) - True - """ - return a.same_quantum(b) - - def sqrt(self, a): - """Returns the square root of a non-negative number to context precision. - - If the result must be inexact, it is rounded using the round-half-even - algorithm. - - >>> ExtendedContext.sqrt(Decimal('0')) - Decimal("0") - >>> ExtendedContext.sqrt(Decimal('-0')) - Decimal("-0") - >>> ExtendedContext.sqrt(Decimal('0.39')) - Decimal("0.624499800") - >>> ExtendedContext.sqrt(Decimal('100')) - Decimal("10") - >>> ExtendedContext.sqrt(Decimal('1')) - Decimal("1") - >>> ExtendedContext.sqrt(Decimal('1.0')) - Decimal("1.0") - >>> ExtendedContext.sqrt(Decimal('1.00')) - Decimal("1.0") - >>> ExtendedContext.sqrt(Decimal('7')) - Decimal("2.64575131") - >>> ExtendedContext.sqrt(Decimal('10')) - Decimal("3.16227766") - >>> ExtendedContext.prec - 9 - """ - return a.sqrt(context=self) - - def subtract(self, a, b): - """Return the difference between the two operands. - - >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.07')) - Decimal("0.23") - >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.30')) - Decimal("0.00") - >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('2.07')) - Decimal("-0.77") - """ - return a.__sub__(b, context=self) - - def to_eng_string(self, a): - """Converts a number to a string, using scientific notation. - - The operation is not affected by the context. - """ - return a.to_eng_string(context=self) - - def to_sci_string(self, a): - """Converts a number to a string, using scientific notation. - - The operation is not affected by the context. - """ - return a.__str__(context=self) - - def to_integral(self, a): - """Rounds to an integer. - - When the operand has a negative exponent, the result is the same - as using the quantize() operation using the given operand as the - left-hand-operand, 1E+0 as the right-hand-operand, and the precision - of the operand as the precision setting, except that no flags will - be set. The rounding mode is taken from the context. - - >>> ExtendedContext.to_integral(Decimal('2.1')) - Decimal("2") - >>> ExtendedContext.to_integral(Decimal('100')) - Decimal("100") - >>> ExtendedContext.to_integral(Decimal('100.0')) - Decimal("100") - >>> ExtendedContext.to_integral(Decimal('101.5')) - Decimal("102") - >>> ExtendedContext.to_integral(Decimal('-101.5')) - Decimal("-102") - >>> ExtendedContext.to_integral(Decimal('10E+5')) - Decimal("1.0E+6") - >>> ExtendedContext.to_integral(Decimal('7.89E+77')) - Decimal("7.89E+77") - >>> ExtendedContext.to_integral(Decimal('-Inf')) - Decimal("-Infinity") - """ - return a.to_integral(context=self) - -class _WorkRep(object): - __slots__ = ('sign','int','exp') - # sign: 0 or 1 - # int: int or long - # exp: None, int, or string - - def __init__(self, value=None): - if value is None: - self.sign = None - self.int = 0 - self.exp = None - elif isinstance(value, Decimal): - self.sign = value._sign - cum = 0 - for digit in value._int: - cum = cum * 10 + digit - self.int = cum - self.exp = value._exp - else: - # assert isinstance(value, tuple) - self.sign = value[0] - self.int = value[1] - self.exp = value[2] - - def __repr__(self): - return "(%r, %r, %r)" % (self.sign, self.int, self.exp) - - __str__ = __repr__ - - - -def _normalize(op1, op2, shouldround = 0, prec = 0): - """Normalizes op1, op2 to have the same exp and length of coefficient. - - Done during addition. - """ - # Yes, the exponent is a long, but the difference between exponents - # must be an int-- otherwise you'd get a big memory problem. - numdigits = int(op1.exp - op2.exp) - if numdigits < 0: - numdigits = -numdigits - tmp = op2 - other = op1 - else: - tmp = op1 - other = op2 - - - if shouldround and numdigits > prec + 1: - # Big difference in exponents - check the adjusted exponents - tmp_len = len(str(tmp.int)) - other_len = len(str(other.int)) - if numdigits > (other_len + prec + 1 - tmp_len): - # If the difference in adjusted exps is > prec+1, we know - # other is insignificant, so might as well put a 1 after the precision. - # (since this is only for addition.) Also stops use of massive longs. - - extend = prec + 2 - tmp_len - if extend <= 0: - extend = 1 - tmp.int *= 10 ** extend - tmp.exp -= extend - other.int = 1 - other.exp = tmp.exp - return op1, op2 - - tmp.int *= 10 ** numdigits - tmp.exp -= numdigits - return op1, op2 - -def _adjust_coefficients(op1, op2): - """Adjust op1, op2 so that op2.int * 10 > op1.int >= op2.int. - - Returns the adjusted op1, op2 as well as the change in op1.exp-op2.exp. - - Used on _WorkRep instances during division. - """ - adjust = 0 - #If op1 is smaller, make it larger - while op2.int > op1.int: - op1.int *= 10 - op1.exp -= 1 - adjust += 1 - - #If op2 is too small, make it larger - while op1.int >= (10 * op2.int): - op2.int *= 10 - op2.exp -= 1 - adjust -= 1 - - return op1, op2, adjust - -##### Helper Functions ######################################## - -def _convert_other(other): - """Convert other to Decimal. - - Verifies that it's ok to use in an implicit construction. - """ - if isinstance(other, Decimal): - return other - if isinstance(other, (int, long)): - return Decimal(other) - return NotImplemented - -_infinity_map = { - 'inf' : 1, - 'infinity' : 1, - '+inf' : 1, - '+infinity' : 1, - '-inf' : -1, - '-infinity' : -1 -} - -def _isinfinity(num): - """Determines whether a string or float is infinity. - - +1 for negative infinity; 0 for finite ; +1 for positive infinity - """ - num = str(num).lower() - return _infinity_map.get(num, 0) - -def _isnan(num): - """Determines whether a string or float is NaN - - (1, sign, diagnostic info as string) => NaN - (2, sign, diagnostic info as string) => sNaN - 0 => not a NaN - """ - num = str(num).lower() - if not num: - return 0 - - #get the sign, get rid of trailing [+-] - sign = 0 - if num[0] == '+': - num = num[1:] - elif num[0] == '-': #elif avoids '+-nan' - num = num[1:] - sign = 1 - - if num.startswith('nan'): - if len(num) > 3 and not num[3:].isdigit(): #diagnostic info - return 0 - return (1, sign, num[3:].lstrip('0')) - if num.startswith('snan'): - if len(num) > 4 and not num[4:].isdigit(): - return 0 - return (2, sign, num[4:].lstrip('0')) - return 0 - - -##### Setup Specific Contexts ################################ - -# The default context prototype used by Context() -# Is mutable, so that new contexts can have different default values - -DefaultContext = Context( - prec=28, rounding=ROUND_HALF_EVEN, - traps=[DivisionByZero, Overflow, InvalidOperation], - flags=[], - _rounding_decision=ALWAYS_ROUND, - Emax=999999999, - Emin=-999999999, - capitals=1 -) - -# Pre-made alternate contexts offered by the specification -# Don't change these; the user should be able to select these -# contexts and be able to reproduce results from other implementations -# of the spec. - -BasicContext = Context( - prec=9, rounding=ROUND_HALF_UP, - traps=[DivisionByZero, Overflow, InvalidOperation, Clamped, Underflow], - flags=[], -) - -ExtendedContext = Context( - prec=9, rounding=ROUND_HALF_EVEN, - traps=[], - flags=[], -) - - -##### Useful Constants (internal use only) #################### - -#Reusable defaults -Inf = Decimal('Inf') -negInf = Decimal('-Inf') - -#Infsign[sign] is infinity w/ that sign -Infsign = (Inf, negInf) - -NaN = Decimal('NaN') - - -##### crud for parsing strings ################################# -import re - -# There's an optional sign at the start, and an optional exponent -# at the end. The exponent has an optional sign and at least one -# digit. In between, must have either at least one digit followed -# by an optional fraction, or a decimal point followed by at least -# one digit. Yuck. - -_parser = re.compile(r""" -# \s* - (?P<sign>[-+])? - ( - (?P<int>\d+) (\. (?P<frac>\d*))? - | - \. (?P<onlyfrac>\d+) - ) - ([eE](?P<exp>[-+]? \d+))? -# \s* - $ -""", re.VERBOSE).match #Uncomment the \s* to allow leading or trailing spaces. - -del re - -# return sign, n, p s.t. float string value == -1**sign * n * 10**p exactly - -def _string2exact(s): - m = _parser(s) - if m is None: - raise ValueError("invalid literal for Decimal: %r" % s) - - if m.group('sign') == "-": - sign = 1 - else: - sign = 0 - - exp = m.group('exp') - if exp is None: - exp = 0 - else: - exp = int(exp) - - intpart = m.group('int') - if intpart is None: - intpart = "" - fracpart = m.group('onlyfrac') - else: - fracpart = m.group('frac') - if fracpart is None: - fracpart = "" - - exp -= len(fracpart) - - mantissa = intpart + fracpart - tmp = map(int, mantissa) - backup = tmp - while tmp and tmp[0] == 0: - del tmp[0] - - # It's a zero - if not tmp: - if backup: - return (sign, tuple(backup), exp) - return (sign, (0,), exp) - mantissa = tuple(tmp) - - return (sign, mantissa, exp) - - -if __name__ == '__main__': - import doctest, sys - doctest.testmod(sys.modules[__name__]) - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - From dd2d0a6c903b1f9b73b78c59512fccec8dc745d4 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 14:12:10 +0100 Subject: [PATCH 56/92] modifs bzr revid: fp@tinyerp.com-20090204131210-5pzw9yundt57gja9 --- addons/account_invoice_layout/account_invoice_layout.py | 4 ++-- addons/mrp_repair/mrp_repair.py | 8 ++++---- addons/process/process.py | 8 ++++---- addons/project/project.py | 4 ++-- addons/project_gtd/project_gtd.py | 4 ++-- addons/purchase/purchase.py | 4 ++-- addons/sale/sale.py | 9 ++------- addons/wiki/wiki.py | 4 ++-- 8 files changed, 20 insertions(+), 25 deletions(-) diff --git a/addons/account_invoice_layout/account_invoice_layout.py b/addons/account_invoice_layout/account_invoice_layout.py index 44f0f872a78..b0215cf9a50 100644 --- a/addons/account_invoice_layout/account_invoice_layout.py +++ b/addons/account_invoice_layout/account_invoice_layout.py @@ -125,11 +125,11 @@ class account_invoice_line(osv.osv): vals['name'] = ' ' return super(account_invoice_line, self).write(cr, user, ids, vals, context) - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if default is None: default = {} default['state'] = self.browse(cr, uid, id).state - return super(account_invoice_line, self).copy(cr, uid, id, default, context) + return super(account_invoice_line, self).copy_data(cr, uid, id, default, context) def _fnct(self, cr, uid, id, name, args, context): res = {} diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 3d1ab1fbfc0..eb9fe390bd9 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -471,10 +471,10 @@ class mrp_repair_line(osv.osv, ProductChangeMixin): _name = 'mrp.repair.line' _description = 'Repair Operations Lines' - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if not default: default = {} default.update( {'invoice_line_id':False,'move_id':False,'invoiced':False,'state':'draft'}) - return super(mrp_repair_line, self).copy(cr, uid, id, default, context) + return super(mrp_repair_line, self).copy_data(cr, uid, id, default, context) def _amount_line(self, cr, uid, ids, field_name, arg, context): res = {} @@ -539,10 +539,10 @@ mrp_repair_line() class mrp_repair_fee(osv.osv, ProductChangeMixin): _name = 'mrp.repair.fee' _description = 'Repair Fees line' - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if not default: default = {} default.update( {'invoice_line_id':False,'invoiced':False}) - return super(mrp_repair_fee, self).copy(cr, uid, id, default, context) + return super(mrp_repair_fee, self).copy_data(cr, uid, id, default, context) def _amount_line(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') diff --git a/addons/process/process.py b/addons/process/process.py index 5f02b67b879..ea350b0bf7e 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -318,14 +318,14 @@ class process_node(osv.osv): 'flow_start': lambda *args: False, } - def copy(self, cr, uid, id, default=None, context={}): + def copy_data(self, cr, uid, id, default=None, context={}): if not default: default = {} default.update({ 'transition_in': [], 'transition_out': [] }) - return super(process_node, self).copy(cr, uid, id, default, context) + return super(process_node, self).copy_data(cr, uid, id, default, context) process_node() @@ -375,7 +375,7 @@ class process_transition_action(osv.osv): 'state': lambda *args: 'dummy', } - def copy(self, cr, uid, id, default=None, context={}): + def copy_data(self, cr, uid, id, default=None, context={}): if not default: default = {} @@ -383,7 +383,7 @@ class process_transition_action(osv.osv): if state: default['state'] = state - return super(process_transition_action, self).copy(cr, uid, id, default, context) + return super(process_transition_action, self).copy_data(cr, uid, id, default, context) process_transition_action() diff --git a/addons/project/project.py b/addons/project/project.py index 2c5dcdb2630..fc0fca5d04d 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -248,10 +248,10 @@ class task(osv.osv): # ('remaining_hours', 'CHECK (remaining_hours>=0)', 'Please increase and review remaining hours ! It can not be smaller than 0.'), #] - def copy(self, cr, uid, id, default={},context={}): + def copy_data(self, cr, uid, id, default={},context={}): default = default or {} default['work_ids'] = [] - return super(task, self).copy(cr, uid, id, default, context) + return super(task, self).copy_data(cr, uid, id, default, context) _columns = { 'active': fields.boolean('Active'), diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index 91754e31b5c..8d855149e3f 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -159,12 +159,12 @@ class project_task(osv.osv): 'timebox_id': fields.many2one('project.gtd.timebox', "Timebox"), 'context_id': fields.many2one('project.gtd.context', "Context"), } - def copy(self, cr, uid, id, default=None, context=None): + def copy_data(self, cr, uid, id, default=None, context=None): if not default: default = {} default['timebox_id']=False default['context_id']=False - return super(project_task,self).copy(cr, uid, id, default, context) + return super(project_task,self).copy_data(cr, uid, id, default, context) def _get_context(self,cr, uid, ctx): ids = self.pool.get('project.gtd.context').search(cr, uid, [], context=ctx) return ids and ids[0] or False diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 84d8d086405..63051813ec0 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -442,11 +442,11 @@ class purchase_order_line(osv.osv): _table = 'purchase_order_line' _name = 'purchase.order.line' _description = 'Purchase Order lines' - def copy(self, cr, uid, id, default=None,context={}): + def copy_data(self, cr, uid, id, default=None,context={}): if not default: default = {} default.update({'state':'draft', 'move_id':False}) - return super(purchase_order_line, self).copy(cr, uid, id, default, context) + return super(purchase_order_line, self).copy_data(cr, uid, id, default, context) def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom, partner_id, date_order=False, fiscal_position=False): diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 6a89a14cda3..297dfffa630 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -672,11 +672,6 @@ sale_order() # - update it on change product and unit price # - use it in report if there is a uos class sale_order_line(osv.osv): - def copy(self, cr, uid, id, default=None, context={}): - if not default: default = {} - default.update( {'invoice_lines':[]}) - return super(sale_order_line, self).copy(cr, uid, id, default, context) - def _amount_line_net(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): @@ -842,11 +837,11 @@ class sale_order_line(osv.osv): pass return {'value' : value} - def copy(self, cr, uid, id, default=None,context={}): + def copy_data(self, cr, uid, id, default=None,context={}): if not default: default = {} default.update({'state':'draft', 'move_ids':[], 'invoiced':False, 'invoice_lines':[]}) - return super(sale_order_line, self).copy(cr, uid, id, default, context) + return super(sale_order_line, self).copy_data(cr, uid, id, default, context) def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, diff --git a/addons/wiki/wiki.py b/addons/wiki/wiki.py index 15677c56367..8bcf87aa63a 100644 --- a/addons/wiki/wiki.py +++ b/addons/wiki/wiki.py @@ -102,8 +102,8 @@ class Wiki(osv.osv): 'section': section } } - def copy(self, cr, uid, id, default=None, context=None): - return super(Wiki, self).copy(cr, uid, id, {'wiki_id':False}, context) + def copy_data(self, cr, uid, id, default=None, context=None): + return super(Wiki, self).copy_data(cr, uid, id, {'wiki_id':False}, context) def write(self, cr, uid, ids, vals, context=None): result = super(Wiki,self).write(cr, uid, ids, vals, context) From 6f60b165f86e64f802d0e7bdf3a8e9d7250f86b8 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Wed, 4 Feb 2009 15:36:29 +0100 Subject: [PATCH 57/92] [IMP] automatically add new groups to admin user bzr revid: christophe@tinyerp.com-20090204143629-3nb99mmzlf380fjp --- bin/addons/base/res/res_user.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py index 27810c8ac07..e2d438ea6a3 100644 --- a/bin/addons/base/res/res_user.py +++ b/bin/addons/base/res/res_user.py @@ -56,7 +56,15 @@ class groups(osv.osv): if vals['name'].startswith('-'): raise osv.except_osv(_('Error'), _('The name of the group can not start with "-"')) - return super(groups, self).create(cr, uid, vals, context=context) + gid = super(groups, self).create(cr, uid, vals, context=context) + + # assign this new group to user_root + user_obj = self.pool.get('res.users') + aid = user_obj.browse(cr, 1, user_obj._get_admin_id(cr)) + if aid: + aid.write({'groups_id': [(4, gid)]}) + + return gid groups() @@ -91,6 +99,7 @@ def _tz_get(self,cr,uid, context={}): return [(x, x) for x in pytz.all_timezones] class users(osv.osv): + __admin_ids = {} _name = "res.users" #_log_access = False _columns = { @@ -127,6 +136,14 @@ class users(osv.osv): _sql_constraints = [ ('login_key', 'UNIQUE (login)', 'You can not have two users with the same login !') ] + + def _get_admin_id(self, cr): + if self.__admin_ids.get(cr.dbname) is None: + ir_model_data_obj = self.pool.get('ir.model.data') + mdid = ir_model_data_obj._get_id(cr, 1, 'base', 'user_root') + self.__admin_ids[cr.dbname] = ir_model_data_obj.read(cr, 1, [mdid], ['res_id'])[0]['res_id'] + return self.__admin_ids[cr.dbname] + def _get_action(self,cr, uid, context={}): ids = self.pool.get('ir.ui.menu').search(cr, uid, [('usage','=','menu')]) return ids and ids[0] or False From 0213177ab8d4f69cebdfd13bc5708375d63c746d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 17:33:41 +0100 Subject: [PATCH 58/92] merge bzr revid: fp@tinyerp.com-20090204163341-zumjpzoqjfmeuzan --- addons/mrp/mrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 8bae8c4fed4..fd16f22497d 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -1044,7 +1044,7 @@ class mrp_procurement(osv.osv): price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist_id], procurement.product_id.id, qty, False, {'uom': uom_id})[pricelist_id] - newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - DateTime.RelativeDateTime(days=procurement.product_id.product_tmpl_id.seller_delay or 0.0) + newdate = DateTime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') newdate = newdate - DateTime.RelativeDateTime(days=company.po_lead) context.update({'lang':partner.lang}) product=self.pool.get('product.product').browse(cr,uid,procurement.product_id.id,context=context) From c0a85c932bdc5466823895ae6c481f2ecb74e57a Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Wed, 4 Feb 2009 18:27:00 +0100 Subject: [PATCH 59/92] [FIX] unicodify the logger lp bug: https://launchpad.net/bugs/325259 fixed bzr revid: christophe@tinyerp.com-20090204172700-3ivskfwcofpma74t --- bin/netsvc.py | 22 ++++++++++++++++++++-- bin/tools/translate.py | 10 +++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index b9e4a589fab..656fde1ef22 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -87,12 +87,30 @@ LOG_CRITICAL = 'critical' # add new log level below DEBUG logging.DEBUG_RPC = logging.DEBUG - 1 +class UnicodeFormatter(logging.Formatter): + def __init__(self, fmt=None, datefmt=None): + logging.Formatter.__init__(self, fmt, datefmt) + self._fmt = tools.ustr(self._fmt) + if self.datefmt is not None: + self.datefmt = tools.ustr(self.datefmt) + + def formatTime(self, *args, **kwargs): + return tools.ustr(logging.Formatter.formatTime(self, *args, **kwargs)) + + def formatException(self, *args, **kwargs): + return tools.ustr(logging.Formatter.formatException(self, *args, **kwargs)) + + def format(self, *args, **kwargs): + return tools.ustr(logging.Formatter.format(self, *args, **kwargs)) + def init_logger(): import os + from tools.translate import resetlocale + resetlocale() logger = logging.getLogger() # 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') + formatter = UnicodeFormatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') logging_to_stdout = False if tools.config['syslog']: @@ -103,7 +121,7 @@ def init_logger(): release.version)) else: handler = logging.handlers.SysLogHandler('/dev/log') - formatter = logging.Formatter("%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') + formatter = UnicodeFormatter("%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') elif tools.config['logfile']: # LogFile Handler diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 0f84bdc9b45..2505909e81f 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -564,9 +564,7 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= try: lang_obj.create(cr, uid, lang_info) finally: - # locale.resetlocale is bugged with some locales. - # we need to normalize the result of locale.getdefaultlocale() - locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale()))) + resetlocale() # now, the serious things: we read the language file @@ -660,5 +658,11 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) +def resetlocale(): + # locale.resetlocale is bugged with some locales. + # we need to normalize the result of locale.getdefaultlocale() + locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale()))) + + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 1d45af1d0b1c2c1a7fecc07e194834fb825c6184 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 21:54:34 +0100 Subject: [PATCH 60/92] modifs bzr revid: fp@tinyerp.com-20090204205434-3i7i8ne3lhquqnfa --- addons/product/product_view.xml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 572cd331007..e7296005122 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -34,19 +34,25 @@ <field eval="7" name="priority"/> <field name="arch" type="xml"> <form string="Product"> - <group colspan="2" col="4"> + <group colspan="4" col="6"> + <group colspan="4" col="2"> <separator string="Product Description" colspan="4"/> - <field name="name" select="1"/> + <field name="name" select="1" /> + <field groups="base.group_extended" name="variants" select="2" /> + </group> + <group colspan="1" col="2"> + <separator string="Codes" colspan="2"/> <field name="default_code" select="1"/> - <field groups="base.group_extended" name="variants" select="2"/> <field groups="base.group_extended" name="ean13" select="2"/> </group> - <group colspan="2" col="2"> + <group colspan="1" col="2"> <separator string="Product Type" colspan="2"/> <field name="sale_ok" select="2"/> <field name="purchase_ok" select="2"/> <field groups="base.group_extended" name="rental" select="2"/> </group> + </group> + <notebook colspan="4"> <page string="Information"> <group colspan="2" col="2"> From cfa26c6bbe1621d3af0744b752fd16cc040cf16c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 22:04:04 +0100 Subject: [PATCH 61/92] bugfox bzr revid: fp@tinyerp.com-20090204210404-dlrlur1l0wg6rm67 --- addons/stock/wizard/inventory_merge_zero.py | 39 ++++++++------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/addons/stock/wizard/inventory_merge_zero.py b/addons/stock/wizard/inventory_merge_zero.py index a9f80be2b17..1b0527ad142 100644 --- a/addons/stock/wizard/inventory_merge_zero.py +++ b/addons/stock/wizard/inventory_merge_zero.py @@ -38,6 +38,7 @@ _inventory_fields = { 'string':'Location', 'type':'many2one', 'relation':'stock.location', + 'required':True } } @@ -51,34 +52,22 @@ def do_merge(self, cr, uid, data, context): raise wizard.except_wizard("Warning", "Please select one and only one inventory !") - cr.execute('select distinct location_id from stock_inventory_line where inventory_id=%s', (data['ids'][0],)) - loc_ids = map(lambda x: x[0], cr.fetchall()) - if data['form']['location_id']: - loc_ids.append(data['form']['location_id']) - locs = ','.join(map(lambda x: str(x), loc_ids)) + loc = str(data['form']['location_id']) cr.execute('select distinct location_id,product_id from stock_inventory_line where inventory_id=%s', (data['ids'][0],)) inv = cr.fetchall() - if not locs: - raise wizard.except_wizard("Warning", - "Please select at least one inventory location !") -# if not inv: -# raise wizard.except_wizard("Warning", -# "Please select at least one inventory location !") - else: - cr.execute('select distinct product_id from stock_move where (location_dest_id in ('+locs+')) or (location_id in ('+locs+'))') - stock = cr.fetchall() - for s in stock: - for loc in loc_ids: - if (loc,s[0]) not in inv: - p = prod_obj.browse(cr, uid, s[0]) - invent_line_obj.create(cr, uid, { - 'inventory_id': data['ids'][0], - 'location_id': loc, - 'product_id': s[0], - 'product_uom': p.uom_id.id, - 'product_qty': 0.0, - }) + cr.execute('select distinct product_id from stock_move where (location_dest_id='+loc+') or (location_id='+loc+')') + stock = cr.fetchall() + for s in stock: + if (loc,s[0]) not in inv: + p = prod_obj.browse(cr, uid, s[0]) + invent_line_obj.create(cr, uid, { + 'inventory_id': data['ids'][0], + 'location_id': loc, + 'product_id': s[0], + 'product_uom': p.uom_id.id, + 'product_qty': 0.0, + }) return {} From 5b586abd3f9d12a6ef800b4f52854918fc71a7b5 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 22:14:44 +0100 Subject: [PATCH 62/92] modifs bzr revid: fp@tinyerp.com-20090204211444-iof4csevfli5bh2g --- addons/account_tax_include/invoice_tax_incl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_tax_include/invoice_tax_incl.py b/addons/account_tax_include/invoice_tax_incl.py index 7d66a87fc0f..568948e47f8 100644 --- a/addons/account_tax_include/invoice_tax_incl.py +++ b/addons/account_tax_include/invoice_tax_incl.py @@ -46,8 +46,8 @@ class account_invoice_line(osv.osv): """ res = {} tax_obj = self.pool.get('account.tax') - res_init = super(account_invoice_line, self)._amount_line(cr, uid, ids, name, args, context) for line in self.browse(cr, uid, ids): + res_init = super(account_invoice_line, self)._amount_line(cr, uid, [line.id], name, args, context) res[line.id] = { 'price_subtotal': 0.0, 'price_subtotal_incl': 0.0, From 8b5a4b400a1b2f7300ca43efdbbf5e905abc1e69 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 23:02:48 +0100 Subject: [PATCH 63/92] modifs bzr revid: fp@tinyerp.com-20090204220248-9l960tlmaw30qbrv --- addons/product/product.py | 2 +- addons/product/product_view.xml | 6 +++--- addons/project/report/_date_compute.py | 2 +- addons/project/report/gantt.py | 1 + addons/sale/stock.py | 2 +- addons/stock/report/picking.rml | 12 ++++++------ 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index cbdb99ccef2..ca23d86b0f1 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -84,7 +84,7 @@ class product_uom(osv.osv): 'factor': fields.float('Rate', digits=(12, 6), required=True, help='The coefficient for the formula:\n' \ '1 (base unit) = coeff (this unit). Rate = 1 / Factor.'), - 'factor_inv': fields.function(_factor, fnct_inv=_factor_inv, digits=(12, 6), + 'factor_inv': fields.function(_factor, digits=(12, 6), method=True, string='Factor', help='The coefficient for the formula:\n' \ 'coeff (base unit) = 1 (this unit). Factor = 1 / Rate.'), diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index e7296005122..ecc1ae7cc01 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -246,8 +246,8 @@ <tree string="Units of Measure"> <field name="name"/> <field name="category_id"/> - <field name="factor_inv" on_change="onchange_factor_inv(factor_inv)"/> - <field name="factor" on_change="onchange_factor(factor)"/> + <field name="factor"/> + <field name="factor_inv"/> <field name="rounding"/> </tree> </field> @@ -261,8 +261,8 @@ <form string="Units of Measure"> <field name="name" select="1"/> <field name="category_id" select="1"/> - <field name="factor_inv" select="1"/> <field name="factor" select="1"/> + <field name="factor_inv" select="1"/> <field name="rounding"/> <field name="active"/> </form> diff --git a/addons/project/report/_date_compute.py b/addons/project/report/_date_compute.py index beca7e5a621..85458ee0175 100644 --- a/addons/project/report/_date_compute.py +++ b/addons/project/report/_date_compute.py @@ -59,7 +59,7 @@ def _compute_tasks(cr, uid, task_list, date_begin): # Compute the closing date of the task tasks[task.id] = [] - res = pooler.get_pool(cr.dbname).get('hr.timesheet.group').interval_get(cr, uid, task.project_id.timesheet_id.id, date_start, task.planned_hours) + res = pooler.get_pool(cr.dbname).get('hr.timesheet.group').interval_get(cr, uid, task.project_id.timesheet_id.id, date_start, task.remaining_hours) for (d1,d2) in res: tasks[task.id].append((d1, d2, task.name, task.user_id.login)) date_close = tasks[task.id][-1][1] diff --git a/addons/project/report/gantt.py b/addons/project/report/gantt.py index 1caa71b423f..ab4d947caa0 100644 --- a/addons/project/report/gantt.py +++ b/addons/project/report/gantt.py @@ -51,6 +51,7 @@ class GanttCanvas(object): self._min = x[0] if x[1]>self._max or not self._max: self._max = x[1] + print name, self._conv[1](x[1]) self._datas[user].append( (name, x)) self._names.setdefault(name, x[0]) diff --git a/addons/sale/stock.py b/addons/sale/stock.py index bcf1a4592ee..aa2717e58aa 100644 --- a/addons/sale/stock.py +++ b/addons/sale/stock.py @@ -163,7 +163,7 @@ class stock_picking(osv.osv): account_analytic_id = self._get_account_analytic_invoice(cursor, user, picking, sale_line) - account_id = self.pool.get('account.fiscal.position').map_account(cursor, user, picking.sale_id.partner_id, account_id) + account_id = self.pool.get('account.fiscal.position').map_account(cursor, user, picking.sale_id.partner_id.property_account_position, account_id) invoice = invoices[result[picking.id]] invoice_line_id = invoice_line_obj.create(cursor, user, { 'name': name, diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index ab384a5ef08..d9e50d2b5ba 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -135,9 +135,9 @@ </td> <td> <para style="terp_default_9">[[ (picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.title) or '' ]] [[ picking.address_id and picking.address_id.partner_id and picking.address_id.partner_id.name ]]</para> - <para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para> - <para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para> - <para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] </para> + <para style="terp_default_9">[[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]] </para> + <para style="terp_default_9">[[ (picking.address_id and picking.address_id.street) or '' ]] </para> + <para style="terp_default_9">[[ (picking.address_id and picking.address_id.zip) or '' ]] [[ (picking.address_id and picking.address_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] </para> <para style="terp_default_9">[[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para> </td> </tr> @@ -176,7 +176,7 @@ <para style="terp_tblheader_General_Centre">Expected Shipping Date </para> </td> <td> - <para style="terp_tblheader_General_Centre">weight</para> + <para style="terp_tblheader_General_Centre"></para> </td> </tr> </blockTable> @@ -186,13 +186,13 @@ <para style="terp_default_Centre_8">[[ picking.origin ]]</para> </td> <td> - <para style="terp_default_Centre_8">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para> + <para style="terp_default_Centre_8">[[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]] </para> </td> <td> <para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para> </td> <td> - <para style="terp_default_Centre_8">[[ picking.weight or '']] </para> + <para style="terp_default_Centre_8"></para> </td> </tr> </blockTable> From 53bdfd5278e0f40fd0f5f8923886c2faad896b44 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 23:10:49 +0100 Subject: [PATCH 64/92] bugfixe bzr revid: fp@tinyerp.com-20090204221049-rw7q2jty42ecl6a5 --- addons/sale/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sale/stock.py b/addons/sale/stock.py index aa2717e58aa..d66db3fb9ef 100644 --- a/addons/sale/stock.py +++ b/addons/sale/stock.py @@ -72,7 +72,7 @@ class stock_picking(osv.osv): picking) def _get_price_unit_invoice(self, cursor, user, move_line, type): - if move_line.sale_line_id: + if move_line.sale_line_id and move_line.sale_line_id.product_id.id == move_line.product_id.id: return move_line.sale_line_id.price_unit return super(stock_picking, self)._get_price_unit_invoice(cursor, user, move_line, type) @@ -84,7 +84,7 @@ class stock_picking(osv.osv): move_line) def _get_taxes_invoice(self, cursor, user, move_line, type): - if move_line.sale_line_id: + if move_line.sale_line_id and move_line.sale_line_id.product_id.id == move_line.product_id.id: return [x.id for x in move_line.sale_line_id.tax_id] return super(stock_picking, self)._get_taxes_invoice(cursor, user, move_line, type) From bec21bb003a23f0b7b9f5c8ee7c0863ead4fc51d Mon Sep 17 00:00:00 2001 From: Stephane Wirtel <stephane@tinyerp.com> Date: Wed, 4 Feb 2009 23:16:01 +0100 Subject: [PATCH 65/92] [FIX] Remove the print statement bzr revid: stephane@tinyerp.com-20090204221601-kgcyfgjx27d277ov --- addons/project/report/gantt.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/project/report/gantt.py b/addons/project/report/gantt.py index ab4d947caa0..1caa71b423f 100644 --- a/addons/project/report/gantt.py +++ b/addons/project/report/gantt.py @@ -51,7 +51,6 @@ class GanttCanvas(object): self._min = x[0] if x[1]>self._max or not self._max: self._max = x[1] - print name, self._conv[1](x[1]) self._datas[user].append( (name, x)) self._names.setdefault(name, x[0]) From 07b8c2ca1106b636b3d768ec2eb4b454d01d0815 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 23:18:53 +0100 Subject: [PATCH 66/92] bugfix bzr revid: fp@tinyerp.com-20090204221853-9yuklpqe1v0wsjgn --- addons/sale/sale.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 297dfffa630..0b6b9a96675 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -911,7 +911,7 @@ class sale_order_line(osv.osv): result['name'] = product_obj.partner_ref domain = {} - if not uom and not uos: + if (not uom) and (not uos): result['product_uom'] = product_obj.uom_id.id if product_obj.uos_id: result['product_uos'] = product_obj.uos_id.id @@ -926,21 +926,21 @@ class sale_order_line(osv.osv): [('category_id', '=', product_obj.uom_id.category_id.id)], 'product_uos': [('category_id', '=', uos_category_id)]} + + elif uos: # only happens if uom is False + result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id + result['product_uom_qty'] = qty_uos / product_obj.uos_coeff + result['th_weight'] = result['product_uom_qty'] * product_obj.weight elif uom: # whether uos is set or not default_uom = product_obj.uom_id and product_obj.uom_id.id q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom) if product_obj.uos_id: result['product_uos'] = product_obj.uos_id.id - result['product_uos_qty'] = q * product_obj.uos_coeff + result['product_uos_qty'] = qty * product_obj.uos_coeff else: result['product_uos'] = False - result['product_uos_qty'] = q - result['th_weight'] = q * product_obj.weight - elif uos: # only happens if uom is False - result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id - result['product_uom_qty'] = qty_uos / product_obj.uos_coeff - result['th_weight'] = result['product_uom_qty'] * product_obj.weight - # Round the quantity up + result['product_uos_qty'] = qty + result['th_weight'] = q * product_obj.weight # Round the quantity up # get unit price From 22bee6134e66d0098099fb04d0fb1bbef21a7c97 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Wed, 4 Feb 2009 23:50:47 +0100 Subject: [PATCH 67/92] bugfix bzr revid: fp@tinyerp.com-20090204225047-yikdw5eq1v8o7hbm --- addons/membership/membership.py | 73 +++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/addons/membership/membership.py b/addons/membership/membership.py index 77bd2d9e981..c34ed55126e 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -469,24 +469,6 @@ class Invoice(osv.osv): _inherit = 'account.invoice' - def create(self, cr, uid, vals, context={}): - result = super(Invoice, self).create(cr, uid, vals, context) - invoice = self.browse(cr, uid, result) - member_line_obj = self.pool.get('membership.membership_line') - for line in invoice.invoice_line: - if line.product_id and line.product_id.membership: - date_from = line.product_id.membership_date_from - date_to = line.product_id.membership_date_to - if invoice.date_invoice > date_from and invoice.date_invoice < date_to: - date_from = invoice.date_invoice - line_id = member_line_obj.create(cr, uid, { - 'partner': invoice.partner_id.id, - 'date_from': date_from, - 'date_to': date_to, - 'account_invoice_line': line.id, - }) - return result - def action_cancel(self, cr, uid, ids, context=None): '''Create a 'date_cancel' on the membership_line object''' if context is None: @@ -730,3 +712,58 @@ class ReportPartnerMemberYearNew(osv.osv): ReportPartnerMemberYearNew() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + +class account_invoice_line(osv.osv): + _inherit='account.invoice.line' + def write(self, cr, uid, ids, vals, context=None): + if not context: + context={} + res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context) + member_line_obj = self.pool.get('membership.membership_line') + for line in self.browse(cr, uid, ids): + ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) + if line.product_id and line.product_id.membership and not ml_ids: + # Product line has changed to a membership product + date_from = line.product_id.membership_date_from + date_to = line.product_id.membership_date_to + if line.invoice_id.date_invoice > date_from and line.invoice_id.date_invoice < date_to: + date_from = line.invoice_id.date_invoice + line_id = member_line_obj.create(cr, uid, { + 'partner': line.invoice_id.partner_id.id, + 'date_from': date_from, + 'date_to': date_to, + 'account_invoice_line': line.id, + }) + if line.product_id and not line.product_id.membership and ml_ids: + # Product line has changed to a non membership product + member_line_obj.unlink(cr, uid, ml_ids, context=context) + return res + + def unlink(self, cr, uid, ids, context=None): + if not context: + context={} + member_line_obj = self.pool.get('membership.membership_line') + for id in ids: + ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',id)]) + member_line_obj.unlink(cr, uid, ml_ids, context=context) + return super(account_invoice_line, self).unlink(cr, uid, ids, context=context) + + def create(self, cr, uid, vals, context={}): + result = super(account_invoice_line, self).create(cr, uid, vals, context) + line = self.browse(cr, uid, result) + member_line_obj = self.pool.get('membership.membership_line') + ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) + if line.product_id and line.product_id.membership and not ml_ids: + # Product line is a membership product + date_from = line.product_id.membership_date_from + date_to = line.product_id.membership_date_to + if line.invoice_id.date_invoice > date_from and line.invoice_id.date_invoice < date_to: + date_from = line.invoice_id.date_invoice + line_id = member_line_obj.create(cr, uid, { + 'partner': line.invoice_id.partner_id.id, + 'date_from': date_from, + 'date_to': date_to, + 'account_invoice_line': line.id, + }) + return result +account_invoice_line() From e5997c99583b20ac6e4605c4c075bc2089ff680d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Thu, 5 Feb 2009 00:27:10 +0100 Subject: [PATCH 68/92] bugfix bzr revid: fp@tinyerp.com-20090204232710-kkf3r1gk9ebhli4q --- bin/osv/orm.py | 5 ++++- bin/tools/convert.py | 7 ++++++- bin/tools/translate.py | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index b93a715ceb0..ec61d9aa5fb 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2130,7 +2130,10 @@ class orm(orm_template): for order, object, ids, fields in result_store: if object<>self._name: - self.pool.get(object)._store_set_values(cr, uid, ids, fields, context) + cr.execute('select id from '+self._table+' where id in ('+','.join(map(str, ids))+')') + ids = map(lambda x: x[0], cr.fetchall()) + if ids: + self.pool.get(object)._store_set_values(cr, uid, ids, fields, context) return True # diff --git a/bin/tools/convert.py b/bin/tools/convert.py index dedc7abb858..71bbb800cf5 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -677,7 +677,12 @@ form: module.record_id""" % (xml_id,) if self.isnoupdate(data_node) and self.mode != 'init': # check if the xml record has an id string if rec_id: - id = self.pool.get('ir.model.data')._update_dummy(cr, self.uid, rec_model, self.module, rec_id) + if '.' in rec_id: + module,rec_id2 = rec_id.split('.') + else: + module = self.module + rec_id2 = rec_id + id = self.pool.get('ir.model.data')._update_dummy(cr, self.uid, rec_model, module, rec_id2) # check if the resource already existed at the last update if id: # if it existed, we don't update the data, but we need to diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 0f84bdc9b45..5b309cffc55 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -566,7 +566,10 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= finally: # locale.resetlocale is bugged with some locales. # we need to normalize the result of locale.getdefaultlocale() - locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale()))) + try: + locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale()))) + except: + locale.setlocale(locale.LC_ALL, lc) # now, the serious things: we read the language file From d9d22aaff9255dc8d2f596b9aade43e842f1885d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Thu, 5 Feb 2009 01:01:31 +0100 Subject: [PATCH 69/92] bugfix bzr revid: fp@tinyerp.com-20090205000131-4tjbyqij1x9v8gl7 --- bin/osv/orm.py | 109 +++++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 44 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index ec61d9aa5fb..47036787211 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2284,49 +2284,61 @@ class orm(orm_template): if self.pool._init: self.pool._init_parent[self._name]=True else: - 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 - else: - cr.execute('select max(parent_right),max(parent_right)+1 from '+self._table) - pleft,pright = cr.fetchone() - cr.execute('select parent_left,parent_right,id from '+self._table+' where id in ('+','.join(map(lambda x:'%s',ids))+')', ids) - dest = pleft + 1 - for cleft,cright,cid in cr.fetchall(): - if cleft > pleft: - treeshift = pleft - cleft + 1 - leftbound = pleft+1 - rightbound = cleft-1 - cwidth = cright-cleft+1 - leftrange = cright - rightrange = pleft + for id in ids: + if vals[self._parent_name]: + cr.execute('select parent_left,parent_right,id from '+self._table+' where parent_id=%s order by '+(self._parent_order or self._order), (vals[self._parent_name],)) + pleft_old = pright_old = None + result_p = cr.fetchall() + for (pleft,pright,pid) in result_p: + if pid == id: + break + pleft_old = pleft + pright_old = pright + if not pleft_old: + cr.execute('select parent_left,parent_right from '+self._table+' where id=%s', (vals[self._parent_name],)) + pleft_old,pright_old = cr.fetchone() + res = (pleft_old, pright_old) else: - treeshift = pleft - cright - leftbound = cright + 1 - rightbound = pleft - cwidth = cleft-cright-1 - leftrange = pleft+1 - rightrange = cleft - cr.execute('UPDATE '+self._table+''' - SET - parent_left = CASE - WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s - WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s - ELSE parent_left - END, - parent_right = CASE - WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s - WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s - ELSE parent_right - END - WHERE - parent_left<%s OR parent_right>%s; - ''', (leftbound,rightbound,cwidth,cleft,cright,treeshift,leftbound,rightbound, - cwidth,cleft,cright,treeshift,leftrange,rightrange)) + cr.execute('SELECT parent_left,parent_right FROM '+self._table+' WHERE id IS NULL') + res = cr.fetchone() + if res: + pleft,pright = res + else: + cr.execute('select max(parent_right),max(parent_right)+1 from '+self._table) + pleft,pright = cr.fetchone() + cr.execute('select parent_left,parent_right,id from '+self._table+' where id in ('+','.join(map(lambda x:'%s',ids))+')', ids) + dest = pleft + 1 + for cleft,cright,cid in cr.fetchall(): + if cleft > pleft: + treeshift = pleft - cleft + 1 + leftbound = pleft+1 + rightbound = cleft-1 + cwidth = cright-cleft+1 + leftrange = cright + rightrange = pleft + else: + treeshift = pleft - cright + leftbound = cright + 1 + rightbound = pleft + cwidth = cleft-cright-1 + leftrange = pleft+1 + rightrange = cleft + cr.execute('UPDATE '+self._table+''' + SET + parent_left = CASE + WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s + WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s + ELSE parent_left + END, + parent_right = CASE + WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s + WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s + ELSE parent_right + END + WHERE + parent_left<%s OR parent_right>%s; + ''', (leftbound,rightbound,cwidth,cleft,cright,treeshift,leftbound,rightbound, + cwidth,cleft,cright,treeshift,leftrange,rightrange)) result = self._store_get_values(cr, user, ids, vals.keys(), context) for order, object, ids, fields in result: @@ -2444,8 +2456,17 @@ class orm(orm_template): else: parent = vals.get(self._parent_name, False) if parent: - cr.execute('select parent_left from '+self._table+' where id=%s', (parent,)) - pleft = cr.fetchone()[0] + cr.execute('select parent_right from '+self._table+' where parent_id=%s order by '+(self._parent_order or self._order), (parent,)) + pleft_old = None + result_p = cr.fetchall() + for (pleft,) in result_p: + if not pleft: + break + pleft_old = pleft + if not pleft_old: + cr.execute('select parent_left from '+self._table+' where id=%s', (parent,)) + pleft_old = cr.fetchone()[0] + pleft = pleft_old else: cr.execute('select max(parent_right) from '+self._table) pleft = cr.fetchone()[0] or 0 From 5d1da24e12835164d43ba6d6369e39fff125a3de Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" <hmo@tinyerp.com> Date: Thu, 5 Feb 2009 11:13:13 +0530 Subject: [PATCH 70/92] fix bug * [DMS] file can not upload from ftp client * [l10n_be] in VAT declaration xml report , YEAR is wrong bzr revid: hmo@tinyerp.com-20090205054313-ukjf6nwh43fg8mp4 --- addons/document/document.py | 2 +- addons/l10n_be/company.py | 6 +++--- addons/l10n_be/wizard/account_vat_declaration.py | 11 ++++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/addons/document/document.py b/addons/document/document.py index 6cc2e7fd7e3..ada5c78dc55 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -609,7 +609,7 @@ class document_file(osv.osv): def create(self, cr, uid, vals, context={}): vals['title']=vals['name'] - vals['parent_id'] = context.get('parent_id',False) + vals['parent_id'] = context.get('parent_id',False) or vals.get('parent_id',False) if not vals.get('res_id', False) and context.get('default_res_id',False): vals['res_id']=context.get('default_res_id',False) if not vals.get('res_model', False) and context.get('default_res_model',False): diff --git a/addons/l10n_be/company.py b/addons/l10n_be/company.py index 3538f6e0dfd..0ef41919dcb 100644 --- a/addons/l10n_be/company.py +++ b/addons/l10n_be/company.py @@ -31,10 +31,10 @@ class res_company(osv.osv): city = post_code = address = "" for ads in addresses: if ads.type == 'default': - city = ads.city - post_code = ads.zip + city = ads.city or "" + post_code = ads.zip or "" if ads.street: - address = ads.street + address = ads.street or "" if ads.street2: address += " " + ads.street2 return city, post_code, address diff --git a/addons/l10n_be/wizard/account_vat_declaration.py b/addons/l10n_be/wizard/account_vat_declaration.py index a6123d7c5c7..942b3f74dad 100644 --- a/addons/l10n_be/wizard/account_vat_declaration.py +++ b/addons/l10n_be/wizard/account_vat_declaration.py @@ -76,9 +76,10 @@ class wizard_vat_declaration(wizard.interface): obj_fyear = pool_obj.get('account.fiscalyear') year_id = obj_fyear.find(cr, uid) - current_year = obj_fyear.browse(cr,uid,year_id).name - - period_code = pool_obj.get('account.period').browse(cr, uid, data['form']['period']).code + + account_period=pool_obj.get('account.period').browse(cr, uid, data['form']['period']) + current_year = account_period.fiscalyear_id.name + period_code = account_period.code send_ref = user_cmpny if period_code: @@ -89,8 +90,8 @@ class wizard_vat_declaration(wizard.interface): data_of_file +='\n\t\t<POSTCODE>'+post_code+'</POSTCODE>\n\t\t<CITY>'+city+'</CITY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>' data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t' - starting_month = pool_obj.get('account.period').browse(cr, uid, data['form']['period']).date_start[5:7] - ending_month = pool_obj.get('account.period').browse(cr, uid, data['form']['period']).date_stop[5:7] + starting_month = account_period.date_start[5:7] + ending_month = account_period.date_stop[5:7] if starting_month != ending_month: #starting month and ending month of selected period are not the same #it means that the accounting isn't based on periods of 1 month but on quarters From 0425c445ecf2ed9e0b9087ce2c30383c5ac4c0e8 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" <hmo@tinyerp.com> Date: Thu, 5 Feb 2009 11:40:11 +0530 Subject: [PATCH 71/92] [product] remove " char in name of product list view bzr revid: hmo@tinyerp.com-20090205061011-0e2a9d33yoz00gi4 --- addons/product/product_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index ecc1ae7cc01..843c71c93a7 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -219,7 +219,7 @@ <record id="product_normal_action_tree" model="ir.actions.act_window"> - <field name="name">Products"</field> + <field name="name">Products</field> <field name="type">ir.actions.act_window</field> <field name="res_model">product.product</field> <field name="view_type">form</field> From c99e0e9d5014b1a64a98a48eb18cc0826388ea6e Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" <jvo@tinyerp.com> Date: Thu, 5 Feb 2009 12:26:45 +0530 Subject: [PATCH 72/92] Correction:False values on reports are now accepted bzr revid: jvo@tinyerp.com-20090205065645-ion7drs4r54o0o51 --- bin/report/report_sxw.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 7e2aef7fd77..6c0b84fb69e 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -170,6 +170,7 @@ class _float_format(float, _format): def __init__(self,value): super(_float_format, self).__init__() self.val = value and str(value) or str(0.00) + def __str__(self): digits = 2 if hasattr(self,'_field') and hasattr(self._field, 'digits') and self._field.digits: @@ -200,12 +201,13 @@ class _int_format(int, _format): class _date_format(str, _format): def __init__(self,value): super(_date_format, self).__init__() - self.val = str(value) - + self.val = value and str(value) or '' + def __str__(self): - if hasattr(self,'name') and self.name: - date = mx.DateTime.strptime(self.name,DT_FORMAT) - return date.strftime(self.lang_obj.date_format) + if self.val: + if hasattr(self,'name') and (self.name): + date = mx.DateTime.strptime(self.name,DT_FORMAT) + return date.strftime(self.lang_obj.date_format) return self.val # if not self.object._context: # return self.name @@ -222,12 +224,13 @@ class _date_format(str, _format): class _dttime_format(str, _format): def __init__(self,value): super(_dttime_format, self).__init__() - self.val = str(value) + self.val = value and str(value) or '' def __str__(self): - if hasattr(self,'name') and self.name: - datetime = mx.DateTime.strptime(self.name,DHM_FORMAT) - return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) + if self.val: + if hasattr(self,'name') and self.name: + datetime = mx.DateTime.strptime(self.name,DHM_FORMAT) + return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) return self.val @@ -381,6 +384,8 @@ class rml_parse(object): lang = self.localcontext.get('lang', 'en_US') or 'en_US' lang_obj = pool_lang.browse(self.cr,self.uid,pool_lang.search(self.cr,self.uid,[('code','=',lang)])[0]) if date or date_time: + if not str(value): + return '' date_format = lang_obj.date_format if date_time: date_format = lang_obj.date_format + " " + lang_obj.time_format From 08758c950e4d90f95fee6007c9fffd3adc5323da Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" <jvo@tinyerp.com> Date: Thu, 5 Feb 2009 12:35:49 +0530 Subject: [PATCH 73/92] Corrections bzr revid: jvo@tinyerp.com-20090205070549-zxs98m4l0di1st70 --- addons/account/invoice.py | 2 +- addons/account/wizard/wizard_account_chart.py | 2 +- .../account_balance/wizard/wizard_account_balance_report.py | 2 +- addons/sale/sale.py | 4 ++-- addons/stock/stock_view.xml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index a79bf281723..edb44b623e8 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -632,7 +632,7 @@ class account_invoice(osv.osv): 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 centralised journal')) + _('Cannot create invoice move on centralised 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: diff --git a/addons/account/wizard/wizard_account_chart.py b/addons/account/wizard/wizard_account_chart.py index 46df6357473..f60dfdcf0a2 100644 --- a/addons/account/wizard/wizard_account_chart.py +++ b/addons/account/wizard/wizard_account_chart.py @@ -27,7 +27,7 @@ class wizard_account_chart(wizard.interface): _account_chart_arch = '''<?xml version="1.0"?> <form string="Account charts"> <field name="fiscalyear"/> - <label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal year)"/> + <label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/> <field name="target_move"/> </form>''' diff --git a/addons/account_balance/wizard/wizard_account_balance_report.py b/addons/account_balance/wizard/wizard_account_balance_report.py index 97c827c5bb2..0f3280cb553 100644 --- a/addons/account_balance/wizard/wizard_account_balance_report.py +++ b/addons/account_balance/wizard/wizard_account_balance_report.py @@ -37,7 +37,7 @@ dates_form = '''<?xml version="1.0"?> <notebook tabpos="up"> <page string="Report Options"> <separator string="Select Fiscal Year(s)(Maximum Three Years)" colspan="4"/> - <label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal year)"/> + <label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/> <field name="fiscalyear" colspan="5" nolabel="1"/> <field name="landscape" colspan="4"/> <field name="show_columns" colspan="4"/> diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 297dfffa630..a0a5be7c82c 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -803,7 +803,7 @@ class sale_order_line(osv.osv): def button_cancel(self, cr, uid, ids, context={}): for line in self.browse(cr, uid, ids, context=context): if line.invoiced: - raise osv.except_osv(_('Invalid action !'), _('You can not cancel a sale order line that has already been invoiced !')) + raise osv.except_osv(_('Invalid action !'), _('You cannot cancel a sale order line that has already been invoiced !')) return self.write(cr, uid, ids, {'state':'cancel'}) def button_confirm(self, cr, uid, ids, context={}): @@ -847,7 +847,7 @@ class sale_order_line(osv.osv): uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False): if not partner_id: - raise osv.except_osv(_('No Partner !'), _('You have to select a partner in the sale form !\nPlease set one partner before choosing a product.')) + raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.')) warning={} product_uom_obj = self.pool.get('product.uom') partner_obj = self.pool.get('res.partner') diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 52a3e091c5e..c7e5aa8d0a3 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -740,7 +740,7 @@ <menuitem action="action_picking_tree2_delivery" id="menu_picking_waiting_delivery" parent="menu_action_picking_tree_delivery"/> <record id="action_picking_tree3_delivery" model="ir.actions.act_window"> - <field name="name">Futur Delivery Orders</field> + <field name="name">Future Delivery Orders</field> <field name="res_model">stock.picking</field> <field name="type">ir.actions.act_window</field> <field name="view_type">form</field> From 4f5f63380469157ca1c0acfa71bf7fc64b915486 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Thu, 5 Feb 2009 08:09:45 +0100 Subject: [PATCH 74/92] bugfix bzr revid: fp@tinyerp.com-20090205070945-g6w21ofdoqu3z1yw --- addons/account/account.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 81da55dd7d5..2d48db6a7d3 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -131,7 +131,6 @@ class account_account(osv.osv): _name = "account.account" _description = "Account" _parent_store = True - _parent_order = 'length(code),code' def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): From 6a41299d79d2d368eb754cac6d887d67fe53d7ec Mon Sep 17 00:00:00 2001 From: Olivier Laurent <olt@tinyerp.com> Date: Thu, 5 Feb 2009 10:44:34 +0100 Subject: [PATCH 75/92] pep8 bzr revid: olt@tinyerp.com-20090205094434-rh36c54vs6fzfone --- addons/account/account.py | 143 +++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 81da55dd7d5..661d13b5cdf 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -52,17 +52,17 @@ class account_payment_term(osv.osv): amount = value result = [] for line in pt.line_ids: - if line.value=='fixed': + if line.value == 'fixed': amt = round(line.value_amount, 2) - elif line.value=='procent': + elif line.value == 'procent': amt = round(value * line.value_amount, 2) - elif line.value=='balance': + elif line.value == 'balance': amt = round(amount, 2) if amt: next_date = mx.DateTime.strptime(date_ref, '%Y-%m-%d') + RelativeDateTime(days=line.days) - if line.days2<0: + if line.days2 < 0: next_date += RelativeDateTime(day=line.days2) - if line.days2>0: + if line.days2 > 0: next_date += RelativeDateTime(day=line.days2, months=1) result.append( (next_date.strftime('%Y-%m-%d'), amt) ) amount -= amt @@ -74,14 +74,14 @@ class account_payment_term_line(osv.osv): _name = "account.payment.term.line" _description = "Payment Term Line" _columns = { - 'name': fields.char('Line Name', size=32,required=True), + 'name': fields.char('Line Name', size=32, required=True), 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the payment term lines from the lowest sequences to the higher ones"), - 'value': fields.selection([('procent','Percent'),('balance','Balance'),('fixed','Fixed Amount')], 'Value',required=True), + 'value': fields.selection([('procent', 'Percent'), ('balance', 'Balance'), ('fixed', 'Fixed Amount')], 'Value',required=True), 'value_amount': fields.float('Value Amount'), - 'days': fields.integer('Number of Days',required=True, help="Number of days to add before computation of the day of month." \ + 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \ "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."), - 'days2': fields.integer('Day of the Month',required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."), - 'payment_id': fields.many2one('account.payment.term','Payment Term', required=True, select=True), + 'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."), + 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True), } _defaults = { 'value': lambda *a: 'balance', @@ -100,7 +100,7 @@ class account_account_type(osv.osv): 'code': fields.char('Code', size=32, required=True), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of account types."), 'partner_account': fields.boolean('Partner account'), - 'close_method': fields.selection([('none','None'), ('balance','Balance'), ('detail','Detail'),('unreconciled','Unreconciled')], 'Deferral Method', required=True), + 'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True), 'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], 'Sign on Reports', required=True, help='Allows you to change the sign of the balance amount displayed in the reports, so that you can see positive figures instead of negative ones in expenses accounts.'), } _defaults = { @@ -139,11 +139,11 @@ class account_account(osv.osv): context = {} pos = 0 - while pos<len(args): + while pos < len(args): - if args[pos][0]=='code' and args[pos][1] in ('like','ilike') and args[pos][2]: - args[pos] = ('code', '=like', str(args[pos][2].replace('%',''))+'%') - if args[pos][0]=='journal_id': + if args[pos][0] == 'code' and args[pos][1] in ('like', 'ilike') and args[pos][2]: + args[pos] = ('code', '=like', str(args[pos][2].replace('%', ''))+'%') + if args[pos][0] == 'journal_id': if not args[pos][2]: del args[pos] continue @@ -152,19 +152,19 @@ class account_account(osv.osv): del args[pos] continue ids3 = map(lambda x: x.code, jour.type_control_ids) - ids1 = super(account_account,self).search(cr, uid, [('type','in',ids3)]) + ids1 = super(account_account, self).search(cr, uid, [('type', 'in', ids3)]) ids1 += map(lambda x: x.id, jour.account_control_ids) - args[pos] = ('id','in',ids1) - pos+=1 + args[pos] = ('id', 'in', ids1) + pos += 1 if context and context.has_key('consolidate_childs'): #add consolidated childs of accounts - ids = super(account_account,self).search(cr, uid, args, offset, limit, + ids = super(account_account, self).search(cr, uid, args, offset, limit, order, context=context, count=count) for consolidate_child in self.browse(cr, uid, context['account_id']).child_consol_ids: ids.append(consolidate_child.id) return ids - return super(account_account,self).search(cr, uid, args, offset, limit, + return super(account_account, self).search(cr, uid, args, offset, limit, order, context=context, count=count) def _get_children_and_consol(self, cr, uid, ids, context={}): @@ -176,7 +176,7 @@ class account_account(osv.osv): ids3.append(child.id) if ids3: ids3 = self._get_children_and_consol(cr, uid, ids3, context) - return ids2+ids3 + return ids2 + ids3 def __compute(self, cr, uid, ids, field_names, arg, context={}, query=''): #compute the balance/debit/credit accordingly to the value of field_name for the given account ids @@ -237,12 +237,12 @@ class account_account(osv.osv): return result def _get_child_ids(self, cr, uid, ids, field_name, arg, context={}): - result={} + result = {} for record in self.browse(cr, uid, ids, context): if record.child_parent_ids: - result[record.id]=[x.id for x in record.child_parent_ids] + result[record.id] = [x.id for x in record.child_parent_ids] else: - result[record.id]=[] + result[record.id] = [] if record.child_consol_ids: for acc in record.child_consol_ids: @@ -255,26 +255,26 @@ class account_account(osv.osv): 'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Force all moves for this account to have this secondary currency."), 'code': fields.char('Code', size=64, required=True), 'type': fields.selection([ - ('receivable','Receivable'), - ('payable','Payable'), - ('view','View'), - ('consolidation','Consolidation'), - ('other','Others'), - ('closed','Closed'), + ('receivable', 'Receivable'), + ('payable', 'Payable'), + ('view', 'View'), + ('consolidation', 'Consolidation'), + ('other', 'Others'), + ('closed', 'Closed'), ], 'Internal Type', required=True,), 'user_type': fields.many2one('account.account.type', 'Account Type', required=True), - 'parent_id': fields.many2one('account.account','Parent', ondelete='cascade'), - 'child_parent_ids':fields.one2many('account.account','parent_id','Children'), - 'child_consol_ids':fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'), - 'child_id': fields.function(_get_child_ids, method=True, type='many2many',relation="account.account",string="Child Accounts"), - 'balance': fields.function(__compute, digits=(16,2), method=True, string='Balance', multi='balance'), - 'credit': fields.function(__compute, digits=(16,2), method=True, string='Credit', multi='balance'), - 'debit': fields.function(__compute, digits=(16,2), method=True, string='Debit', multi='balance'), + 'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade'), + 'child_parent_ids': fields.one2many('account.account','parent_id','Children'), + 'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'), + 'child_id': fields.function(_get_child_ids, method=True, type='many2many', relation="account.account", string="Child Accounts"), + 'balance': fields.function(__compute, digits=(16, 2), method=True, string='Balance', multi='balance'), + 'credit': fields.function(__compute, digits=(16, 2), method=True, string='Credit', multi='balance'), + 'debit': fields.function(__compute, digits=(16, 2), method=True, string='Debit', multi='balance'), 'reconcile': fields.boolean('Reconcile', help="Check this if the user is allowed to reconcile entries in this account."), 'shortcut': fields.char('Shortcut', size=12), 'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel', - 'account_id','tax_id', 'Default Taxes'), + 'account_id', 'tax_id', 'Default Taxes'), 'note': fields.text('Note'), 'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Company Currency'), 'company_id': fields.many2one('res.company', 'Company', required=True), @@ -282,7 +282,7 @@ class account_account(osv.osv): 'parent_left': fields.integer('Parent Left', select=1), 'parent_right': fields.integer('Parent Right', select=1), - 'currency_mode': fields.selection([('current','At Date'),('average','Average Rate')], 'Outgoing Currencies Rate', + 'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate', help= 'This will select how the current currency rate for outgoing transactions is computed. '\ 'In most countries the legal method is "average" but only a few software systems are able to '\ @@ -301,7 +301,7 @@ class account_account(osv.osv): return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0] _defaults = { - 'type' : lambda *a :'view', + 'type': lambda *a : 'view', 'reconcile': lambda *a: False, 'company_id': _default_company, 'active': lambda *a: True, @@ -310,22 +310,22 @@ class account_account(osv.osv): } def _check_recursion(self, cr, uid, ids): - obj_self=self.browse(cr,uid,ids[0]) - p_id=obj_self.parent_id and obj_self.parent_id.id + obj_self = self.browse(cr, uid, ids[0]) + p_id = obj_self.parent_id and obj_self.parent_id.id if (obj_self in obj_self.child_consol_ids) or (p_id and (p_id is obj_self.id)): return False while(ids): - cr.execute('select distinct child_id from account_account_consol_rel where parent_id in ('+','.join(map(str,ids))+')') - child_ids = filter(None, map(lambda x:x[0], cr.fetchall())) - c_ids=child_ids + cr.execute('select distinct child_id from account_account_consol_rel where parent_id in ('+','.join(map(str, ids))+')') + child_ids = filter(None, map(lambda x: x[0], cr.fetchall())) + c_ids = child_ids if (p_id and (p_id in c_ids)) or (obj_self.id in c_ids): return False while len(c_ids): - s_ids=self.search(cr,uid,[('parent_id','in',c_ids)]) + s_ids = self.search(cr, uid, [('parent_id', 'in', c_ids)]) if p_id and (p_id in s_ids): return False - c_ids=s_ids - ids=child_ids + c_ids = s_ids + ids = child_ids return True _constraints = [ @@ -333,7 +333,7 @@ class account_account(osv.osv): ] def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): if not args: - args=[] + args = [] if not context: context = {} args = args[:] @@ -342,20 +342,20 @@ class account_account(osv.osv): if name and str(name).startswith('partner:'): part_id = int(name.split(':')[1]) part = self.pool.get('res.partner').browse(cr, user, part_id, context) - args += [('id','in', (part.property_account_payable.id, part.property_account_receivable.id))] + args += [('id', 'in', (part.property_account_payable.id, part.property_account_receivable.id))] name = False if name and str(name).startswith('type:'): type = name.split(':')[1] - args += [('type','=', type)] + args += [('type', '=', type)] name = False except: pass if name: - ids = self.search(cr, user, [('code','=like',name+"%")]+ args, limit=limit) + ids = self.search(cr, user, [('code', '=like', name+"%")]+args, limit=limit) if not ids: - ids = self.search(cr, user, [('shortcut','=',name)]+ args, limit=limit) + ids = self.search(cr, user, [('shortcut', '=', name)]+ args, limit=limit) if not ids: - ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit) + ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit) else: ids = self.search(cr, user, args, context=context, limit=limit) return self.name_get(cr, user, ids, context=context) @@ -363,28 +363,28 @@ class account_account(osv.osv): def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] - reads = self.read(cr, uid, ids, ['name','code'], context) + reads = self.read(cr, uid, ids, ['name', 'code'], context) res = [] for record in reads: name = record['name'] if record['code']: - name = record['code']+' '+name - res.append((record['id'],name )) + name = record['code'] + ' '+name + res.append((record['id'], name)) return res - def copy(self, cr, uid, id, default={}, context={},done_list=[]): + def copy(self, cr, uid, id, default={}, context={}, done_list=[]): account = self.browse(cr, uid, id, context=context) new_child_ids = [] if not default: - default={} - default=default.copy() + default = {} + default = default.copy() default['parent_id'] = False if account.id in done_list: return False done_list.append(account.id) if account: for child in account.child_id: - child_ids=self.copy(cr, uid, child.id, default, context=context,done_list=done_list) + child_ids = self.copy(cr, uid, child.id, default, context=context, done_list=done_list) if child_ids: new_child_ids.append(child_ids) default['child_parent_ids'] = [(6, 0, new_child_ids)] @@ -394,7 +394,7 @@ class account_account(osv.osv): def write(self, cr, uid, ids, vals, context=None): if not context: - context={} + context = {} if 'active' in vals and not vals['active']: line_obj = self.pool.get('account.move.line') account_ids = self.search(cr, uid, [('id', 'child_of', ids)]) @@ -441,7 +441,7 @@ class account_journal(osv.osv): _columns = { 'name': fields.char('Journal Name', size=64, required=True, translate=True), 'code': fields.char('Code', size=16), - 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True), + 'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('cash', 'Cash'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True), 'refund_journal': fields.boolean('Refund Journal'), 'type_control_ids': fields.many2many('account.account.type', 'account_journal_type_rel', 'journal_id','type_id', 'Type Controls', domain=[('code','<>','view'), ('code', '<>', 'closed')]), @@ -527,7 +527,6 @@ class account_fiscalyear(osv.osv): def create_period(self,cr, uid, ids, context={}, interval=1): for fy in self.browse(cr, uid, ids, context): - dt = fy.date_start ds = mx.DateTime.strptime(fy.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<fy.date_stop: de = ds + RelativeDateTime(months=interval, days=-1) @@ -585,7 +584,11 @@ class account_period(osv.osv): for obj_period in self.browse(cr,uid,ids): if obj_period.special: continue - if obj_period.fiscalyear_id.date_stop < obj_period.date_stop or obj_period.fiscalyear_id.date_stop < obj_period.date_start or obj_period.fiscalyear_id.date_start > obj_period.date_start or obj_period.fiscalyear_id.date_start > obj_period.date_stop: + + if obj_period.fiscalyear_id.date_stop < obj_period.date_stop or \ + obj_period.fiscalyear_id.date_stop < obj_period.date_start or \ + obj_period.fiscalyear_id.date_start > obj_period.date_start or \ + obj_period.fiscalyear_id.date_start > obj_period.date_stop: return False pids = self.search(cr, uid, [('date_stop','>=',obj_period.date_start),('date_start','<=',obj_period.date_stop),('special','=',False),('id','<>',obj_period.id)]) @@ -862,7 +865,7 @@ class account_move(osv.osv): def unlink(self, cr, uid, ids, context={}, check=True): toremove = [] for move in self.browse(cr, uid, ids, context): - if move['state'] <> 'draft': + if move['state'] != 'draft': raise osv.except_osv(_('UserError'), _('You can not delete posted movement: "%s"!') % \ move['name']) @@ -962,7 +965,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 from 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))) + raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from 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): @@ -1110,9 +1113,9 @@ class account_tax_code(osv.osv): fiscalyear_id = self.pool.get('account.fiscalyear').find(cr, uid, exception=False) where = '' if fiscalyear_id: - pids = map(lambda x: str(x.id), self.pool.get('account.fiscalyear').browse(cr, uid, fiscalyear_id).period_ids) - if pids: - where = ' and period_id in (' + (','.join(pids))+')' + pids = map(lambda x: str(x.id), self.pool.get('account.fiscalyear').browse(cr, uid, fiscalyear_id).period_ids) + if pids: + where = ' and period_id in (' + (','.join(pids))+')' return self._sum(cr, uid, ids, name, args, context, where=where) From 9c38a58c9c0ad8da9688ec98664e275cc53fb4fd Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 10:45:35 +0100 Subject: [PATCH 76/92] [IMP/FIX] improve locale usage lp bug: https://launchpad.net/bugs/322432 fixed bzr revid: christophe@tinyerp.com-20090205094535-ied1q3ozbtba2rpq --- bin/tools/translate.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 2505909e81f..a9356612da3 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -524,26 +524,14 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= if not ids: # lets create the language with locale information - lc, encoding = locale.getdefaultlocale() - if not encoding: - encoding = 'UTF-8' - if encoding == 'utf': - encoding = 'UTF-8' - if encoding == 'cp1252': - encoding= '1252' - if encoding == 'iso-8859-1': - encoding= 'iso-8859-15' - if encoding == 'latin1': - encoding= 'latin9' - try: if os.name == 'nt': from report.report_sxw import _LOCALE2WIN32 code = _LOCALE2WIN32.get(lang, lang) else: code = lang - locale.setlocale(locale.LC_ALL, locale.normalize(str(lang + '.' + encoding))) + locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename((code, encoding)))) except Exception: msg = 'Unable to get information for locale %s. Information from the default locale (%s) have been used.' logger.notifyChannel('i18n', netsvc.LOG_WARNING, msg % (lang, lc)) @@ -657,12 +645,15 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= filename = '[lang: %s][format: %s]' % (lang or 'new', fileformat) logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) - def resetlocale(): # locale.resetlocale is bugged with some locales. - # we need to normalize the result of locale.getdefaultlocale() - locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale()))) - + loc = locale.getdefaultlocale()[0] + enc = locale.getpreferredencoding() + ln = locale._build_localename((loc, enc)) + try: + locale.setlocale(locale.LC_ALL, ln) + except locale.Error: + locale.setlocale(locale.LC_ALL, loc) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From e07e477337c76033a9c642cab3d579f0abfece11 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 11:02:29 +0100 Subject: [PATCH 77/92] [FIX] try to set the locale to utf8 before using the preferred encoding lp bug: https://launchpad.net/bugs/322432 fixed bzr revid: christophe@tinyerp.com-20090205100229-igxb3dnne8e34evg --- bin/tools/translate.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/tools/translate.py b/bin/tools/translate.py index a9356612da3..8670c308517 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -648,12 +648,16 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= def resetlocale(): # locale.resetlocale is bugged with some locales. loc = locale.getdefaultlocale()[0] - enc = locale.getpreferredencoding() - ln = locale._build_localename((loc, enc)) try: + ln = locale._build_localename((loc, 'utf8')) locale.setlocale(locale.LC_ALL, ln) except locale.Error: - locale.setlocale(locale.LC_ALL, loc) + enc = locale.getpreferredencoding() + ln = locale._build_localename((loc, enc)) + try: + locale.setlocale(locale.LC_ALL, ln) + except locale.Error: + locale.setlocale(locale.LC_ALL, loc) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 4661156b43d6a4e3a2e30e0ca5033e1200b3b0c6 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 11:29:53 +0100 Subject: [PATCH 78/92] [IMP] parse_version: refactor tests bzr revid: christophe@tinyerp.com-20090205102953-j24pdke9hjtttr6p --- bin/tools/parse_version.py | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/bin/tools/parse_version.py b/bin/tools/parse_version.py index f79e2bad458..6fafff2a425 100644 --- a/bin/tools/parse_version.py +++ b/bin/tools/parse_version.py @@ -82,16 +82,21 @@ def parse_version(s): return tuple(parts) if __name__ == '__main__': - pvs = [] - for v in ('0', '4.2', '4.2.3.4', '5.0.0-alpha', '5.0.0-rc1', '5.0.0-rc1.1', '5.0.0_rc2', '5.0.0_rc3', '5.0.0'): - pv = parse_version(v) - print v, pv - pvs.append(pv) - - def cmp(a, b): - print a, b - assert(a < b) - return b - - reduce(cmp, pvs) + + def cmp(a, b): + msg = '%s < %s == %s' % (a, b, a < b) + assert a < b, msg + return b + + def chk(lst, verbose=False): + pvs = [] + for v in lst: + pv = parse_version(v) + pvs.append(pv) + if verbose: + print v, pv + reduce(cmp, pvs) + + chk(('0', '4.2', '4.2.3.4', '5.0.0-alpha', '5.0.0-rc1', '5.0.0-rc1.1', '5.0.0_rc2', '5.0.0_rc3', '5.0.0'), False) + chk(('5.0.0-0_rc3', '5.0.0-1dev', '5.0.0-1'), False) From f5724590ce894a156c7e5fb63648f1b355d22f58 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 11:30:42 +0100 Subject: [PATCH 79/92] [FIX] modules that cannot be loaded are marked as uninstallable bzr revid: christophe@tinyerp.com-20090205103042-hkqsip3d4mgf7smh --- bin/addons/__init__.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index fcc60ca1809..57d5742431e 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -273,26 +273,23 @@ def get_modules(): return list(set(listdir(ad) + listdir(_ad))) -def create_graph(module_list, force=None): +def create_graph(cr, module_list, force=None): graph = Graph() - upgrade_graph(graph, module_list, force) + upgrade_graph(graph, cr, module_list, force) return graph -def upgrade_graph(graph, module_list, force=None): +def upgrade_graph(graph, cr, module_list, force=None): if force is None: force = [] packages = [] len_graph = len(graph) for module in module_list: - try: - mod_path = get_module_path(module) - if not mod_path: - continue - except IOError: - continue + mod_path = get_module_path(module) terp_file = get_module_resource(module, '__terp__.py') - if not terp_file: + if not mod_path or not terp_file: + cr.execute("update ir_module_module set state=%s where name=%s", ('uninstallable', module)) continue + if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path+'.zip'): try: info = eval(tools.file_open(terp_file).read()) @@ -662,7 +659,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): try: report = tools.assertion_report() STATES_TO_LOAD = ['installed', 'to upgrade'] - graph = create_graph(['base'], force) + graph = create_graph(cr, ['base'], force) has_updates = False if update_module: has_updates = load_module_graph(cr, graph, status, perform_checks=False, report=report) @@ -698,7 +695,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): if not module_list: break - new_modules_in_graph = upgrade_graph(graph, module_list, force) + new_modules_in_graph = upgrade_graph(graph, cr, module_list, force) if new_modules_in_graph == 0: # nothing to load break From fb64a0d6f54c35955e7957e5656341b25e56f476 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" <hmo@tinyerp.com> Date: Thu, 5 Feb 2009 17:21:40 +0530 Subject: [PATCH 80/92] [DMS:#325632] put exception handling bzr revid: hmo@tinyerp.com-20090205115140-pb3dkpadn0crxmkk --- addons/document/document.py | 39 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/addons/document/document.py b/addons/document/document.py index ada5c78dc55..84a13af5564 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -510,24 +510,27 @@ class document_file(osv.osv): if not value: return True #if (not context) or context.get('store_method','fs')=='fs': - path = self._get_filestore(cr) - if not os.path.isdir(path): - os.makedirs(path) - flag = None - # This can be improved - for dirs in os.listdir(path): - if os.path.isdir(os.path.join(path,dirs)) and len(os.listdir(os.path.join(path,dirs)))<4000: - flag = dirs - break - flag = flag or create_directory(path) - filename = random_name() - fname = os.path.join(path, flag, filename) - fp = file(fname,'wb') - v = base64.decodestring(value) - fp.write(v) - filesize = os.stat(fname).st_size - cr.execute('update ir_attachment set store_fname=%s,store_method=%s,file_size=%s where id=%s', (os.path.join(flag,filename),'fs',len(v),id)) - return True + try: + path = self._get_filestore(cr) + if not os.path.isdir(path): + os.makedirs(path) + flag = None + # This can be improved + for dirs in os.listdir(path): + if os.path.isdir(os.path.join(path,dirs)) and len(os.listdir(os.path.join(path,dirs)))<4000: + flag = dirs + break + flag = flag or create_directory(path) + filename = random_name() + fname = os.path.join(path, flag, filename) + fp = file(fname,'wb') + v = base64.decodestring(value) + fp.write(v) + filesize = os.stat(fname).st_size + cr.execute('update ir_attachment set store_fname=%s,store_method=%s,file_size=%s where id=%s', (os.path.join(flag,filename),'fs',len(v),id)) + return True + except Exception,e : + raise except_orm('Error!', str(e)) _columns = { 'user_id': fields.many2one('res.users', 'Owner', select=1), From 580ab8c750be375663f614385e959361e071f30a Mon Sep 17 00:00:00 2001 From: husen daudi <hda@hda> Date: Thu, 5 Feb 2009 17:38:59 +0530 Subject: [PATCH 81/92] bugfix by nch lp bug: https://launchpad.net/bugs/325632 fixed bzr revid: hda@hda-20090205120859-ogaeismjmduhholo --- bin/report/report_sxw.py | 53 +++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 6c0b84fb69e..c35059db742 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -166,18 +166,18 @@ class _format(object): class _float_format(float, _format): - + def __init__(self,value): super(_float_format, self).__init__() self.val = value and str(value) or str(0.00) - + def __str__(self): digits = 2 if hasattr(self,'_field') and hasattr(self._field, 'digits') and self._field.digits: digits = self._field.digits[1] return self.lang_obj.format('%.' + str(digits) + 'f', self.name, True) return self.val - + # if not self.object._context: # return locale.format('%f', self.name, True) # digit = 2 @@ -190,7 +190,7 @@ class _int_format(int, _format): def __init__(self,value): super(_int_format, self).__init__() self.val = value and str(value) or str(0) - + def __str__(self): if hasattr(self,'lang_obj'): return self.lang_obj.format('%.d', self.name, True) @@ -202,13 +202,13 @@ class _date_format(str, _format): def __init__(self,value): super(_date_format, self).__init__() self.val = value and str(value) or '' - + def __str__(self): if self.val: if hasattr(self,'name') and (self.name): date = mx.DateTime.strptime(self.name,DT_FORMAT) return date.strftime(self.lang_obj.date_format) - return self.val + return self.val # if not self.object._context: # return self.name # @@ -225,13 +225,13 @@ class _dttime_format(str, _format): def __init__(self,value): super(_dttime_format, self).__init__() self.val = value and str(value) or '' - + def __str__(self): if self.val: if hasattr(self,'name') and self.name: datetime = mx.DateTime.strptime(self.name,DHM_FORMAT) return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) - return self.val + return self.val _fields_process = { @@ -335,7 +335,7 @@ class rml_parse(object): ns = node.nextSibling pp.removeChild(node) self._node = pp - + lst = tools.ustr(text).split('\n') if not (text and lst): return None @@ -390,13 +390,13 @@ class rml_parse(object): if date_time: date_format = lang_obj.date_format + " " + lang_obj.time_format parse_format = date_format - + # filtering time.strftime('%Y-%m-%d') if type(value) == type(''): parse_format = DHM_FORMAT - if (not date_time): + if (not date_time): return value - + if not isinstance(value, time.struct_time): # assume string, parse it # if len(str(value)) == 10: @@ -650,7 +650,10 @@ class report_sxw(report_rml): if report_xml.attachment_use and aname and context.get('attachment_use', True): aids = pool.get('ir.attachment').search(cr, uid, [('datas_fname','=',aname+'.pdf'),('res_model','=',self.table),('res_id','=',obj.id)]) if aids: - d = base64.decodestring(pool.get('ir.attachment').browse(cr, uid, aids[0]).datas) + brow_rec = pool.get('ir.attachment').browse(cr, uid, aids[0]) + if not brow_rec.datas: + continue + d = base64.decodestring(brow_rec.datas) results.append((d,'pdf')) continue @@ -667,18 +670,18 @@ class report_sxw(report_rml): ) cr.commit() results.append(result) - - if results[0][1]=='pdf': - from pyPdf import PdfFileWriter, PdfFileReader - import cStringIO - output = PdfFileWriter() - for r in results: - reader = PdfFileReader(cStringIO.StringIO(r[0])) - for page in range(reader.getNumPages()): - output.addPage(reader.getPage(page)) - s = cStringIO.StringIO() - output.write(s) - return s.getvalue(), results[0][1] + if results: + if results[0][1]=='pdf': + from pyPdf import PdfFileWriter, PdfFileReader + import cStringIO + output = PdfFileWriter() + for r in results: + reader = PdfFileReader(cStringIO.StringIO(r[0])) + for page in range(reader.getNumPages()): + output.addPage(reader.getPage(page)) + s = cStringIO.StringIO() + output.write(s) + return s.getvalue(), results[0][1] return self.create_single(cr, uid, ids, data, report_xml, context) def create_single(self, cr, uid, ids, data, report_xml, context={}): From 56a68ebf4a784ceec370abe5b93cfc74cbb83c12 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 13:51:17 +0100 Subject: [PATCH 82/92] [FIX] fix locale problems bzr revid: christophe@tinyerp.com-20090205125117-l6xdm5iik9nrjls7 --- bin/tools/translate.py | 63 ++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 8670c308517..8b5e68e4e1b 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -524,15 +524,16 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= if not ids: # lets create the language with locale information - lc, encoding = locale.getdefaultlocale() - try: - if os.name == 'nt': - from report.report_sxw import _LOCALE2WIN32 - code = _LOCALE2WIN32.get(lang, lang) - else: - code = lang - locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename((code, encoding)))) - except Exception: + fail = True + for ln in get_locales(lang): + try: + locale.setlocale(locale.LC_ALL, ln) + fail = False + break + except locale.Error: + continue + if fail: + lc = locale.getdefaultlocale()[0] msg = 'Unable to get information for locale %s. Information from the default locale (%s) have been used.' logger.notifyChannel('i18n', netsvc.LOG_WARNING, msg % (lang, lc)) @@ -645,19 +646,47 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= filename = '[lang: %s][format: %s]' % (lang or 'new', fileformat) logger.notifyChannel("i18n", netsvc.LOG_ERROR, "couldn't read translation file %s" % (filename,)) +def get_locales(lang=None): + if lang is None: + lang = locale.getdefaultlocale()[0] + + if os.name == 'nt': + from report.report_sxw import _LOCALE2WIN32 + lang = _LOCALE2WIN32.get(lang, lang) + + def process(enc): + ln = locale._build_localename((lang, enc)) + yield ln + nln = locale.normalize(ln) + if nln != ln: + yield nln + + for x in process('utf8'): yield x + + prefenc = locale.getpreferredencoding() + if prefenc: + for x in process(prefenc): yield x + + prefenc = { + 'latin1': 'latin9', + 'iso-8859-1': 'iso8859-15', + 'cp1252': '1252', + }.get(prefenc.lower()) + if prefenc: + for x in process(prefenc): yield x + + yield lang + + + def resetlocale(): # locale.resetlocale is bugged with some locales. - loc = locale.getdefaultlocale()[0] - try: - ln = locale._build_localename((loc, 'utf8')) - locale.setlocale(locale.LC_ALL, ln) - except locale.Error: - enc = locale.getpreferredencoding() - ln = locale._build_localename((loc, enc)) + for ln in get_locales(): try: locale.setlocale(locale.LC_ALL, ln) + break except locale.Error: - locale.setlocale(locale.LC_ALL, loc) + continue # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 47a658c475bf1380b06574704d500497abcd03ef Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 14:18:12 +0100 Subject: [PATCH 83/92] [FIX] locale problems (again) bzr revid: christophe@tinyerp.com-20090205131812-btihwg9g1qweyln3 --- bin/netsvc.py | 16 +++++++++------- bin/tools/misc.py | 4 ++-- bin/tools/translate.py | 3 +-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index 656fde1ef22..d121e4b5b39 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -88,29 +88,31 @@ LOG_CRITICAL = 'critical' logging.DEBUG_RPC = logging.DEBUG - 1 class UnicodeFormatter(logging.Formatter): - def __init__(self, fmt=None, datefmt=None): + def __init__(self, enc, fmt=None, datefmt=None): + self._enc = enc logging.Formatter.__init__(self, fmt, datefmt) self._fmt = tools.ustr(self._fmt) if self.datefmt is not None: self.datefmt = tools.ustr(self.datefmt) def formatTime(self, *args, **kwargs): - return tools.ustr(logging.Formatter.formatTime(self, *args, **kwargs)) + return tools.ustr(logging.Formatter.formatTime(self, *args, **kwargs), self._enc) def formatException(self, *args, **kwargs): - return tools.ustr(logging.Formatter.formatException(self, *args, **kwargs)) + return tools.ustr(logging.Formatter.formatException(self, *args, **kwargs), self._enc) def format(self, *args, **kwargs): - return tools.ustr(logging.Formatter.format(self, *args, **kwargs)) + return tools.ustr(logging.Formatter.format(self, *args, **kwargs), self._enc) def init_logger(): import os from tools.translate import resetlocale - resetlocale() + l = resetlocale() or '' + enc = '.' in l and l.split('.')[1] or 'utf-8' logger = logging.getLogger() # create a format for log messages and dates - formatter = UnicodeFormatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') + formatter = UnicodeFormatter(enc, '[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') logging_to_stdout = False if tools.config['syslog']: @@ -121,7 +123,7 @@ def init_logger(): release.version)) else: handler = logging.handlers.SysLogHandler('/dev/log') - formatter = UnicodeFormatter("%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') + formatter = UnicodeFormatter(enc, "%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') elif tools.config['logfile']: # LogFile Handler diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 04a1bba0ab5..0a47ae044ec 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -658,7 +658,7 @@ class cache(object): def to_xml(s): return s.replace('&','&').replace('<','<').replace('>','>') -def ustr(value): +def ustr(value, fromenc='utf-8'): """This method is similar to the builtin `str` method, except it will return Unicode string. @@ -677,7 +677,7 @@ def ustr(value): if not isinstance(value, str): value = str(value) - return unicode(value, 'utf-8') + return unicode(value, fromenc) def exception_to_unicode(e): if hasattr(e, 'message'): diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 8b5e68e4e1b..b2ef256d11a 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -683,8 +683,7 @@ def resetlocale(): # locale.resetlocale is bugged with some locales. for ln in get_locales(): try: - locale.setlocale(locale.LC_ALL, ln) - break + return locale.setlocale(locale.LC_ALL, ln) except locale.Error: continue From f31e75a5e82d30e8ba3e08b0d6a41519933437e8 Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Thu, 5 Feb 2009 14:18:41 +0100 Subject: [PATCH 84/92] several fixes en improvements of l10n_be wizard [FIX] year tag of vat declaration wizard: used first 4 char of date instead of last 4 char of name, because name can be manually changed by user! [FIX] year tag of vat listing wizard: used first 4 char of date instead of last 4 char of name, because name can be manually changed by user! [FIX] vat listing wizard is now based on account_periods and not dates! [FIX] vat listing is only for belgian customers [FIX] vat listing was wrongly filled (amount and turnover tags were sometimes switched): fixed and improved readability [IMP] cleaning of vat listing [IMP] improved the menuitems structure and names more explicit bzr revid: qdp@tinyerp.com-20090205131841-ahs0xr30ukmybcdq --- addons/l10n_be/l10n_be_wizard.xml | 20 +++-- .../l10n_be/wizard/account_vat_declaration.py | 2 +- addons/l10n_be/wizard/partner_vat_listing.py | 83 +++++++++++-------- 3 files changed, 64 insertions(+), 41 deletions(-) diff --git a/addons/l10n_be/l10n_be_wizard.xml b/addons/l10n_be/l10n_be_wizard.xml index 12e38eba2ea..32960abc714 100644 --- a/addons/l10n_be/l10n_be_wizard.xml +++ b/addons/l10n_be/l10n_be_wizard.xml @@ -1,27 +1,35 @@ <?xml version="1.0"?> <openerp> <data> + + <menuitem + id="menu_finance_belgian_statement" + name="Belgium Statements" + parent="account.menu_finance_legal_statement"/> + <wizard - string="Enlist Vat Details" + string="Annual Listing of VAT-Subjected Customers" model="res.partner" name="list.vat.detail" menu="False" id="partner_wizard_vat"/> + <menuitem - name="Listing of VAT Customers" - parent="account.menu_finance_legal_statement" + name="Annual Listing of VAT-Subjected Customers" + parent="menu_finance_belgian_statement" action="partner_wizard_vat" type="wizard" id="partner_wizard_vat_menu"/> <wizard - string="Taxes Statement" + string="Periodical VAT Declaration" name="wizard.account.xml.vat.declaration" menu="False" id="wizard_xml_vat_declaration"/> + <menuitem - name="Taxes Statement" - parent="account.menu_finance_legal_statement" + name="Periodical VAT Declaration" + parent="menu_finance_belgian_statement" action="wizard_xml_vat_declaration" type="wizard" id="account_wizard_vat_declaration"/> diff --git a/addons/l10n_be/wizard/account_vat_declaration.py b/addons/l10n_be/wizard/account_vat_declaration.py index 942b3f74dad..7a6baef2f11 100644 --- a/addons/l10n_be/wizard/account_vat_declaration.py +++ b/addons/l10n_be/wizard/account_vat_declaration.py @@ -99,7 +99,7 @@ class wizard_vat_declaration(wizard.interface): data_of_file += '<QUARTER>'+quarter+'</QUARTER>\n\t\t\t' else: data_of_file += '<MONTH>'+starting_month+'</MONTH>\n\t\t\t' - data_of_file += '<YEAR>'+str(current_year[-4:])+'</YEAR>\n\t\t</DPERIODE>\n\t\t<ASK RESTITUTION="NO" PAYMENT="NO"/>' + data_of_file += '<YEAR>' + str(account_period.date_stop[:4]) + '</YEAR>\n\t\t</DPERIODE>\n\t\t<ASK RESTITUTION="NO" PAYMENT="NO"/>' data_of_file +='\n\t\t<DATA>\n\t\t\t<DATA_ELEM>' for item in tax_info: diff --git a/addons/l10n_be/wizard/partner_vat_listing.py b/addons/l10n_be/wizard/partner_vat_listing.py index e259d194608..051ecd1b273 100644 --- a/addons/l10n_be/wizard/partner_vat_listing.py +++ b/addons/l10n_be/wizard/partner_vat_listing.py @@ -62,26 +62,23 @@ class wizard_vat(wizard.interface): def _create_xml(self, cr, uid, data, context): datas=[] - # now wizard will use user->company instead of directly company from res.company - seq_controlref = pooler.get_pool(cr.dbname).get('ir.sequence').get(cr, uid,'controlref') seq_declarantnum = pooler.get_pool(cr.dbname).get('ir.sequence').get(cr, uid,'declarantnum') obj_cmpny = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid).company_id company_vat = obj_cmpny.partner_id.vat - if not company_vat: #if not vat_company: + if not company_vat: raise wizard.except_wizard('Data Insufficient','No VAT Number Associated with Main Company!') cref = company_vat + seq_controlref dnum = cref + seq_declarantnum -# obj_company=pooler.get_pool(cr.dbname).get('res.company').browse(cr,uid,1) -# vat_company=obj_company.partner_id.vat p_id_list=pooler.get_pool(cr.dbname).get('res.partner').search(cr,uid,[('vat_subjected','!=',False)]) if not p_id_list: raise wizard.except_wizard('Data Insufficient!','No partner has a VAT Number asociated with him.') obj_year=pooler.get_pool(cr.dbname).get('account.fiscalyear').browse(cr,uid,data['form']['fyear']) - period="to_date('" + str(obj_year.date_start) + "','yyyy-mm-dd') and to_date('" + str(obj_year.date_stop) +"','yyyy-mm-dd')" + period_ids = pooler.get_pool(cr.dbname).get('account.period').search(cr, uid, [('fiscalyear_id', '=', data['form']['fyear'])]) + period = "("+','.join(map(lambda x: str(x), period_ids)) +")" street=zip_city=country='' addr = pooler.get_pool(cr.dbname).get('res.partner').address_get(cr, uid, [obj_cmpny.partner_id.id], ['invoice']) @@ -108,39 +105,57 @@ class wizard_vat(wizard.interface): data_file +='\n<AgentRepr DecNumber="1">\n\t<CompanyInfo>\n\t\t<VATNum>'+str(company_vat)+'</VATNum>\n\t\t<Name>'+str(obj_cmpny.name)+'</Name>\n\t\t<Street>'+ str(street) +'</Street>\n\t\t<CityAndZipCode>'+ str(zip_city) +'</CityAndZipCode>' data_file +='\n\t\t<Country>'+ str(country) +'</Country>\n\t</CompanyInfo>\n</AgentRepr>' data_comp ='\n<CompanyInfo>\n\t<VATNum>'+str(company_vat)+'</VATNum>\n\t<Name>'+str(obj_cmpny.name)+'</Name>\n\t<Street>'+ str(street) +'</Street>\n\t<CityAndZipCode>'+ str(zip_city) +'</CityAndZipCode>\n\t<Country>'+ str(country) +'</Country>\n</CompanyInfo>' - data_period ='\n<Period>'+ str(obj_year.name[-4:]) +'</Period>' + data_period ='\n<Period>'+ str(obj_year.date_stop[:4]) +'</Period>' error_message=[] + for p_id in p_id_list: - record=[] # this holds record per partner - obj_partner=pooler.get_pool(cr.dbname).get('res.partner').browse(cr,uid,p_id) - cr.execute('select b.code,sum(credit)-sum(debit) from account_move_line l left join account_account a on (l.account_id=a.id) left join account_account_type b on (a.user_type=b.id) where b.code in ('"'produit'"','"'tax'"') and l.partner_id=%%s and l.date between %s group by b.code' % (period,), (p_id,)) + record = {} # this holds record per partner + obj_partner = pooler.get_pool(cr.dbname).get('res.partner').browse(cr,uid,p_id) + + #This listing is only for customers located in belgium, that's the + #reason why we skip all the partners that haven't their + #(or one of their) default address(es) located in Belgium. + go_ahead = False + for ads in obj_partner.address: + if ads.type == 'default' and (ads.country_id and ads.country_id.code == 'BE'): + go_ahead = True + break + if not go_ahead: + continue + query = 'select b.code,sum(credit)-sum(debit) from account_move_line l left join account_account a on (l.account_id=a.id) left join account_account_type b on (a.user_type=b.id) where b.code in ('"'produit'"','"'tax'"') and l.partner_id='+str(p_id)+' and l.period_id in '+period+' group by b.code' + cr.execute(query) line_info=cr.fetchall() if not line_info: continue - record.append(obj_partner.vat) - addr = pooler.get_pool(cr.dbname).get('res.partner').address_get(cr, uid, [obj_partner.id], ['invoice']) - if addr.get('invoice',False): - ads=pooler.get_pool(cr.dbname).get('res.partner.address').browse(cr,uid,[addr['invoice']])[0] + record['vat'] = obj_partner.vat + + #it seems that this listing is only for belgian customers + record['country'] = 'BE' + + #...deprecated... + #~addr = pooler.get_pool(cr.dbname).get('res.partner').address_get(cr, uid, [obj_partner.id], ['invoice']) - if ads.country_id: - record.append(ads.country_id.code) - else: - error_message.append('Data Insufficient! : '+ 'The Partner "'+obj_partner.name + '"'' has no country associated with its Invoice address!') + #~ if addr.get('invoice',False): + #~ads=pooler.get_pool(cr.dbname).get('res.partner.address').browse(cr,uid,[addr['invoice']])[0] + + #~ if ads.country_id: + #~ record.append(ads.country_id.code) + #~ else: + #~ error_message.append('Data Insufficient! : '+ 'The Partner "'+obj_partner.name + '"'' has no country associated with its Invoice address!') - if len(record)<2: - record.append('') - error_message.append('Data Insufficient! : '+ 'The Partner "'+obj_partner.name + '"'' has no Invoice address!') - if len(line_info)==1: - if line_info[0][0]=='produit': - record.append(0.00) - record.append(line_info[0][1]) + #~ if len(record)<2: + #~ record.append('') + #~ error_message.append('Data Insufficient! : '+ 'The Partner "'+obj_partner.name + '"'' has no Invoice address!') + + record['amount'] = 0 + record['turnover'] = 0 + + for item in line_info: + if item[0]=='produit': + record['turnover'] += item[1] else: - record.append(line_info[0][1]) - record.append(0.00) - else: - for item in line_info: - record.append(item[1]) + record['amount'] += item[1] datas.append(record) seq=0 @@ -151,12 +166,12 @@ class wizard_vat(wizard.interface): data['form']['msg']='Exception : \n' +'-'*50+'\n'+ '\n'.join(error_message) return data['form'] for line in datas: - if line[3]< data['form']['limit_amount']: + if line['turnover'] < data['form']['limit_amount']: continue seq +=1 - sum_tax +=line[2] - sum_turnover +=line[3] - data_clientinfo +='\n<ClientList SequenceNum="'+str(seq)+'">\n\t<CompanyInfo>\n\t\t<VATNum>'+line[0] +'</VATNum>\n\t\t<Country>'+line[1] +'</Country>\n\t</CompanyInfo>\n\t<Amount>'+str(int(line[2] * 100)) +'</Amount>\n\t<TurnOver>'+str(int(line[3] * 100)) +'</TurnOver>\n</ClientList>' + sum_tax +=line['amount'] + sum_turnover +=line['turnover'] + data_clientinfo +='\n<ClientList SequenceNum="'+str(seq)+'">\n\t<CompanyInfo>\n\t\t<VATNum>'+line['vat'] +'</VATNum>\n\t\t<Country>'+line['country'] +'</Country>\n\t</CompanyInfo>\n\t<Amount>'+str(int(line['amount'] * 100)) +'</Amount>\n\t<TurnOver>'+str(int(line['turnover'] * 100)) +'</TurnOver>\n</ClientList>' data_decl ='\n<DeclarantList SequenceNum="1" DeclarantNum="'+ dnum + '" ClientNbr="'+ str(seq) +'" TurnOverSum="'+ str(int(sum_turnover * 100)) +'" TaxSum="'+ str(int(sum_tax * 100)) +'" />' data_file += str(data_decl) + str(data_comp) + str(data_period) + str(data_clientinfo) + '\n</VatList>' From 1ea82dc87e6e9b5995b364bed8af79304d9408c2 Mon Sep 17 00:00:00 2001 From: husen daudi <hda@hda> Date: Thu, 5 Feb 2009 19:02:55 +0530 Subject: [PATCH 85/92] bugfix by nch for dms bzr revid: hda@hda-20090205133255-3fiwfn2290tkqak7 --- bin/report/report_sxw.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index c35059db742..5cb00e86d3b 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -656,19 +656,23 @@ class report_sxw(report_rml): d = base64.decodestring(brow_rec.datas) results.append((d,'pdf')) continue - result = self.create_single(cr, uid, [obj.id], data, report_xml, context) - if aname: - name = aname+'.'+result[1] - pool.get('ir.attachment').create(cr, uid, { - 'name': aname, - 'datas': base64.encodestring(result[0]), - 'datas_fname': name, - 'res_model': self.table, - 'res_id': obj.id, - }, context=context - ) - cr.commit() + try: + if aname: + name = aname+'.'+result[1] + pool.get('ir.attachment').create(cr, uid, { + 'name': aname, + 'datas': base64.encodestring(result[0]), + 'datas_fname': name, + 'res_model': self.table, + 'res_id': obj.id, + }, context=context + ) + cr.commit() + except Exception,e: + import traceback, sys + tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) + netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR,str(e)) results.append(result) if results: if results[0][1]=='pdf': From eed8260fda4f71c1dc59b276db1480c414828116 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Thu, 5 Feb 2009 14:40:49 +0100 Subject: [PATCH 86/92] [FIX] locale bzr revid: christophe@tinyerp.com-20090205134049-suv0tmz2rqdj7rid --- bin/netsvc.py | 26 ++++---------------------- bin/tools/misc.py | 4 ++-- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index d121e4b5b39..75246e981b8 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -87,32 +87,14 @@ LOG_CRITICAL = 'critical' # add new log level below DEBUG logging.DEBUG_RPC = logging.DEBUG - 1 -class UnicodeFormatter(logging.Formatter): - def __init__(self, enc, fmt=None, datefmt=None): - self._enc = enc - logging.Formatter.__init__(self, fmt, datefmt) - self._fmt = tools.ustr(self._fmt) - if self.datefmt is not None: - self.datefmt = tools.ustr(self.datefmt) - - def formatTime(self, *args, **kwargs): - return tools.ustr(logging.Formatter.formatTime(self, *args, **kwargs), self._enc) - - def formatException(self, *args, **kwargs): - return tools.ustr(logging.Formatter.formatException(self, *args, **kwargs), self._enc) - - def format(self, *args, **kwargs): - return tools.ustr(logging.Formatter.format(self, *args, **kwargs), self._enc) - def init_logger(): import os from tools.translate import resetlocale - l = resetlocale() or '' - enc = '.' in l and l.split('.')[1] or 'utf-8' + resetlocale() logger = logging.getLogger() # create a format for log messages and dates - formatter = UnicodeFormatter(enc, '[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %Y %H:%M:%S') + formatter = logging.Formatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s') logging_to_stdout = False if tools.config['syslog']: @@ -123,7 +105,7 @@ def init_logger(): release.version)) else: handler = logging.handlers.SysLogHandler('/dev/log') - formatter = UnicodeFormatter(enc, "%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') + formatter = logging.Formatter("%s %s" % (release.description, release.version) + ':%(levelname)s:%(name)s:%(message)s') elif tools.config['logfile']: # LogFile Handler @@ -175,7 +157,7 @@ def init_logger(): class Logger(object): def notifyChannel(self, name, level, msg): - log = logging.getLogger(name) + log = logging.getLogger(tools.ustr(name)) if level == LOG_DEBUG_RPC and not hasattr(log, level): fct = lambda msg, *args, **kwargs: log.log(logging.DEBUG_RPC, msg, *args, **kwargs) diff --git a/bin/tools/misc.py b/bin/tools/misc.py index 0a47ae044ec..04a1bba0ab5 100644 --- a/bin/tools/misc.py +++ b/bin/tools/misc.py @@ -658,7 +658,7 @@ class cache(object): def to_xml(s): return s.replace('&','&').replace('<','<').replace('>','>') -def ustr(value, fromenc='utf-8'): +def ustr(value): """This method is similar to the builtin `str` method, except it will return Unicode string. @@ -677,7 +677,7 @@ def ustr(value, fromenc='utf-8'): if not isinstance(value, str): value = str(value) - return unicode(value, fromenc) + return unicode(value, 'utf-8') def exception_to_unicode(e): if hasattr(e, 'message'): From d2341bb9a6ac9e994df2e6998228e262927d9e30 Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Thu, 5 Feb 2009 15:00:23 +0100 Subject: [PATCH 87/92] [IMP] added name field in stock.move.tree view bzr revid: qdp@tinyerp.com-20090205140023-4221a9wsws3o29se --- addons/stock/stock_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index c7e5aa8d0a3..c0c465af5ef 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1205,6 +1205,7 @@ <field eval="6" name="priority"/> <field name="arch" type="xml"> <tree color="grey:state=='cancel'" string="Moves"> + <field name="name"/> <field name="product_id"/> <field name="product_qty"/> <field name="product_uom" string="UOM"/> From 39f483b80bda8c09d6846a4e936a65a34596bccc Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Thu, 5 Feb 2009 16:28:06 +0100 Subject: [PATCH 88/92] [FIX] setting to None the address of a stock.picking was crashing because of a browse null [FIX] when generating the account_move_lines from a stock.picking, the partner wasn't linked bzr revid: qdp@tinyerp.com-20090205152806-z5f4movn0itt2fwh --- addons/stock/stock.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 2208860a71a..a792711970e 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -445,7 +445,6 @@ class stock_picking(osv.osv): # return super(stock_picking, self).copy(cr, uid, id, data, context) def onchange_partner_in(self, cr, uid, context, partner_id=None): - sid = self.pool.get('res.partner.address').browse(cr, uid, partner_id, context).partner_id.property_stock_supplier.id return { } def action_explode(self, cr, uid, moves, context={}): @@ -1178,6 +1177,9 @@ class stock_move(osv.osv): amount = move.product_qty * move.product_id.standard_price date = time.strftime('%Y-%m-%d') + partner_id = False + if move.picking_id: + partner_id = move.picking_id.address_id and (move.picking_id.address_id.partner_id and move.picking_id.address_id.partner_id.id or False) or False lines = [ (0, 0, { 'name': move.name, @@ -1185,14 +1187,16 @@ class stock_move(osv.osv): 'credit': amount, 'account_id': acc_src, 'ref': ref, - 'date': date}), + 'date': date, + 'partner_id': partner_id}), (0, 0, { 'name': move.name, 'quantity': move.product_qty, 'debit': amount, 'account_id': acc_dest, 'ref': ref, - 'date': date}) + 'date': date, + 'partner_id': partner_id}) ] self.pool.get('account.move').create(cr, uid, { 'name': move.name, From 442bba25c76a02cfb71c0df8dcad319ed2ad7c02 Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Thu, 5 Feb 2009 17:41:33 +0100 Subject: [PATCH 89/92] [FIX] bugfixed problem of ir.sequence on stock.picking name (missing numbers) [IMP] name is not copied anymore when a stock.picking is beeing copied bzr revid: qdp@tinyerp.com-20090205164133-k758rjmdrr0kcghr --- addons/stock/stock.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a792711970e..afcc1cec474 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -397,7 +397,7 @@ class stock_picking(osv.osv): _columns = { - 'name': fields.char('Reference', size=64, required=True, select=True), + 'name': fields.char('Reference', size=64, select=True), 'origin': fields.char('Origin Reference', size=64), 'backorder_id': fields.many2one('stock.picking', 'Back Order'), 'type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True), @@ -432,7 +432,7 @@ class stock_picking(osv.osv): select=True, required=True, readonly=True, states={'draft':[('readonly',False)]}), } _defaults = { - 'name': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'stock.picking'), + #'name': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'stock.picking'), 'active': lambda *a: 1, 'state': lambda *a: 'draft', 'move_type': lambda *a: 'direct', @@ -440,9 +440,12 @@ class stock_picking(osv.osv): 'invoice_state': lambda *a: 'none', 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), } - #def copy(self, cr, uid, id, data=None, context={}): - # data = data or {} - # return super(stock_picking, self).copy(cr, uid, id, data, context) + def copy(self, cr, uid, id, default=None, context={}): + if default is None: + default = {} + default = default.copy() + default['name'] = False + return super(stock_picking, self).copy(cr, uid, id, default, context) def onchange_partner_in(self, cr, uid, context, partner_id=None): return { } @@ -451,7 +454,8 @@ class stock_picking(osv.osv): return moves def action_confirm(self, cr, uid, ids, context={}): - self.write(cr, uid, ids, {'state': 'confirmed'}) + val = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking') + self.write(cr, uid, ids, {'name': val, 'state': 'confirmed'}) todo = [] for picking in self.browse(cr, uid, ids): for r in picking.move_lines: From 76f327da8e5a4df8166c9354bc543d3102ce65ac Mon Sep 17 00:00:00 2001 From: qdp <qdp@tinyerp.com> Date: Thu, 5 Feb 2009 17:49:27 +0100 Subject: [PATCH 90/92] [FIX] completed the tax.template definition of l10n_lu (type_tax_use and description) bzr revid: qdp@tinyerp.com-20090205164927-bsnz2u34kgccpa3k --- addons/l10n_lu/account.tax.template.csv | 71 +++++++++++++------------ 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/addons/l10n_lu/account.tax.template.csv b/addons/l10n_lu/account.tax.template.csv index 93b4aaa28ea..3b751c5d448 100644 --- a/addons/l10n_lu/account.tax.template.csv +++ b/addons/l10n_lu/account.tax.template.csv @@ -1,35 +1,36 @@ -"ref_base_code_id:id","ref_base_sign","name","ref_tax_code_id:id","account_collected_id:id","amount","chart_template_id:id","tax_code_id:id","child_depend","include_base_amount","parent_id:id","tax_sign","account_paid_id:id","base_code_id:id","id","ref_tax_sign" -"account_tax_code_template_9",-1,"Intra Travail à façon 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_1",1 -"account_tax_code_template_9",-1,"Intra Livraison avec installation 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_2",1 -"account_tax_code_template_9",-1,"Intra transfert de biens 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_3",1 -"account_tax_code_template_13",-1,"Vente de tabacs 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_13","account_tax_template_9",1 -"account_tax_code_template_10",-1,"Exportations 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_10","account_tax_template_10",1 -,1,"Achats frais généraux 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,,"account_tax_template_11",1 -"account_tax_code_template_29",-1,"Ventes 3%","account_tax_code_template_34","account_451000","0.0300","l10nlu_chart_template","account_tax_code_template_34",0,0,,1,"account_451000","account_tax_code_template_29","account_tax_template_5",-1 -"account_tax_code_template_28",-1,"Ventes 6%","account_tax_code_template_33","account_451000","0.0600","l10nlu_chart_template","account_tax_code_template_33",0,0,,1,"account_451000","account_tax_code_template_28","account_tax_template_6",-1 -"account_tax_code_template_30",-1,"Ventes 12%","account_tax_code_template_35","account_451000","0.1200","l10nlu_chart_template","account_tax_code_template_35",0,0,,1,"account_451000","account_tax_code_template_30","account_tax_template_7",-1 -"account_tax_code_template_27",-1,"Ventes 15%","account_tax_code_template_32","account_451000","0.1500","l10nlu_chart_template","account_tax_code_template_32",0,0,,1,"account_451000","account_tax_code_template_27","account_tax_template_8",-1 -,1,"Achats frais généraux 15%","account_tax_code_template_18","account_411000","0.1500","l10nlu_chart_template","account_tax_code_template_18",0,0,,1,"account_411000",,"account_tax_template_12",-1 -,1,"Achats Intra-Co",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_13",1 -,1,"Achats de Services Art.26",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_18",1 -,1,"Ventes de Services Art.26",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_21",1 -,1,"Livraison de Biens Triangulaire 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,,1,"account_411000","account_tax_code_template_38","account_tax_template_26",1 -,1,"Livraisons de biens triangulaire 2",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,,-1,"account_451000",,"account_tax_template_25",1 -,1,"Importations a des fins de l'entreprise",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_30",1 -,1,"Importations a des fins privées",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_33",1 -,1,"Livraisons de Biens Art.26",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_36",1 -,1,"Livraison de Biens triangulaire",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_24",1 -,1,"Livraisons de biens triangulaire 2",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_24",-1,"account_451000",,"account_tax_template_22",1 -,1,"Livraison de Biens Triangulaire 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_24",1,"account_411000","account_tax_code_template_38","account_tax_template_23",1 -,1,"Importations Intra-Co2",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_56",0,0,"account_tax_template_30",-1,"account_411000","account_tax_code_template_51","account_tax_template_28",1 -,1,"Importations Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_20",0,0,"account_tax_template_30",1,"account_411000",,"account_tax_template_29",1 -,1,"Importations Fins Privées",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_64",0,0,"account_tax_template_33",-1,"account_411000","account_tax_code_template_60","account_tax_template_31",1 -,1,"Importations Fins Privées",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_20",0,0,"account_tax_template_33",1,"account_411000",,"account_tax_template_32",1 -,1,"Livraison de Biens Art26",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_36",-1,"account_451000",,"account_tax_template_34",1 -,1,"Livraisons de Biens Art26",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_82",0,0,"account_tax_template_36",1,"account_411000","account_tax_code_template_78","account_tax_template_35",1 -,1,"Achats Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_19",0,0,"account_tax_template_13",1,"account_411000","account_tax_code_template_38","account_tax_template_14",1 -,1,"Achats Intra-CO2",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_13",-1,"account_411000",,"account_tax_template_15",1 -,1,"Services Intra-Co2",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_18",-1,"account_411000",,"account_tax_template_17",1 -,1,"Services Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_18",1,"account_411000","account_tax_code_template_38","account_tax_template_16",1 -,1,"Services Intra-Co2",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_21",-1,"account_451000",,"account_tax_template_19",1 -,1,"Services Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_86",0,0,"account_tax_template_21",1,"account_411000","account_tax_code_template_74","account_tax_template_20",1 +"ref_base_code_id:id","ref_base_sign","name","description","type_tax_use","ref_tax_code_id:id","account_collected_id:id","amount","chart_template_id:id","tax_code_id:id","child_depend","include_base_amount","parent_id:id","tax_sign","account_paid_id:id","base_code_id:id","id","ref_tax_sign" +"account_tax_code_template_9",-1,"Intra Travail à façon 0%","ESWRK0","sale",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_1",1 +"account_tax_code_template_9",-1,"Intra Livraison avec installation 0%","ESDLI0","sale",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_2",1 +"account_tax_code_template_9",-1,"Intra transfert de biens 0%","ESTRF0","sale",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_3",1 +"account_tax_code_template_13",-1,"Vente de tabacs 0%","NSNST0","sale",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_13","account_tax_template_9",1 +"account_tax_code_template_10",-1,"Exportations 0%","ISEXP0","sale",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_10","account_tax_template_10",1 +,1,"Achats frais généraux 0%","ESSDD0","purchase",,,"0.0000","l10nlu_chart_template",,0,0,,1,,,"account_tax_template_11",1 +"account_tax_code_template_29",-1,"Ventes 3%","NSS 3","sale","account_tax_code_template_34","account_451000","0.0300","l10nlu_chart_template","account_tax_code_template_34",0,0,,1,"account_451000","account_tax_code_template_29","account_tax_template_5",-1 +"account_tax_code_template_28",-1,"Ventes 6%","NSS 6","sale","account_tax_code_template_33","account_451000","0.0600","l10nlu_chart_template","account_tax_code_template_33",0,0,,1,"account_451000","account_tax_code_template_28","account_tax_template_6",-1 +"account_tax_code_template_30",-1,"Ventes 12%","NSS 12","sale","account_tax_code_template_35","account_451000","0.1200","l10nlu_chart_template","account_tax_code_template_35",0,0,,1,"account_451000","account_tax_code_template_30","account_tax_template_7",-1 +"account_tax_code_template_27",-1,"Ventes 15%","NSS 15","sale","account_tax_code_template_32","account_451000","0.1500","l10nlu_chart_template","account_tax_code_template_32",0,0,,1,"account_451000","account_tax_code_template_27","account_tax_template_8",-1 +,1,"Achats frais généraux 15%","NSGSD15","purchase","account_tax_code_template_18","account_411000","0.1500","l10nlu_chart_template","account_tax_code_template_18",0,0,,1,"account_411000",,"account_tax_template_12",-1 +,1,"Achats Intra-Co",,"purchase",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_13",1 +,1,"Achats de Services Art.26",,"purchase",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_18",1 +,1,"Ventes de Services Art.26",,"sale",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_21",1 +,1,"Livraison de Biens Triangulaire 1",,"sale",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,,1,"account_411000","account_tax_code_template_38","account_tax_template_26",1 +,1,"Livraisons de biens triangulaire 2",,"sale",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,,-1,"account_451000",,"account_tax_template_25",1 +,1,"Importations a des fins de l'entreprise",,"purchase",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_30",1 +,1,"Importations a des fins privées",,"purchase",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_33",1 +,1,"Livraisons de Biens Art.26",,"sale",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_36",1 +,1,"Livraison de Biens triangulaire",,"sale",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_24",1 +,1,"Livraisons de biens triangulaire 2",,"sale",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_24",-1,"account_451000",,"account_tax_template_22",1 +,1,"Livraison de Biens Triangulaire 1",,"sale",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_24",1,"account_411000","account_tax_code_template_38","account_tax_template_23",1 +,1,"Importations Intra-Co2",,"purchase",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_56",0,0,"account_tax_template_30",-1,"account_411000","account_tax_code_template_51","account_tax_template_28",1 +,1,"Importations Intra-Co 1",,"purchase",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_20",0,0,"account_tax_template_30",1,"account_411000",,"account_tax_template_29",1 +,1,"Importations Fins Privées",,"purchase",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_64",0,0,"account_tax_template_33",-1,"account_411000","account_tax_code_template_60","account_tax_template_31",1 +,1,"Importations Fins Privées",,"purchase",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_20",0,0,"account_tax_template_33",1,"account_411000",,"account_tax_template_32",1 +,1,"Livraison de Biens Art26",,"sale",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_36",-1,"account_451000",,"account_tax_template_34",1 +,1,"Livraisons de Biens Art26",,"sale",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_82",0,0,"account_tax_template_36",1,"account_411000","account_tax_code_template_78","account_tax_template_35",1 +,1,"Achats Intra-Co 1",,"purchase",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_19",0,0,"account_tax_template_13",1,"account_411000","account_tax_code_template_38","account_tax_template_14",1 +,1,"Achats Intra-CO2",,"purchase",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_13",-1,"account_411000",,"account_tax_template_15",1 +,1,"Services Intra-Co2",,"purchase",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_18",-1,"account_411000",,"account_tax_template_17",1 +,1,"Services Intra-Co 1",,"purchase",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_18",1,"account_411000","account_tax_code_template_38","account_tax_template_16",1 +,1,"Services Intra-Co2",,"sale",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_21",-1,"account_451000",,"account_tax_template_19",1 +,1,"Services Intra-Co 1",,"sale",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_86",0,0,"account_tax_template_21",1,"account_411000","account_tax_code_template_74","account_tax_template_20",1 + From 96b596ec526ee5321644b79b0426c5beb543cd81 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Thu, 5 Feb 2009 18:11:04 +0100 Subject: [PATCH 91/92] bugfix bzr revid: fp@tinyerp.com-20090205171104-4lqkjij8ooewts4x --- addons/account/product.py | 4 ++-- addons/stock/stock.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/account/product.py b/addons/account/product.py index b053a6e2826..b26d9b12208 100644 --- a/addons/account/product.py +++ b/addons/account/product.py @@ -34,7 +34,7 @@ class product_category(osv.osv): string="Income Account", method=True, view_load=True, - help="This account will be used instead of the default one to value incoming stock for the current product category"), + help="This account will be used to value incoming stock for the current product category"), 'property_account_expense_categ': fields.property( 'account.account', type='many2one', @@ -42,7 +42,7 @@ class product_category(osv.osv): string="Expense Account", method=True, view_load=True, - help="This account will be used instead of the default one to value outgoing stock for the current product category"), + help="This account will be used to value outgoing stock for the current product category"), } product_category() diff --git a/addons/stock/stock.py b/addons/stock/stock.py index afcc1cec474..92fa50dbd0b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -432,7 +432,7 @@ class stock_picking(osv.osv): select=True, required=True, readonly=True, states={'draft':[('readonly',False)]}), } _defaults = { - #'name': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'stock.picking'), + 'name': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'stock.picking'), 'active': lambda *a: 1, 'state': lambda *a: 'draft', 'move_type': lambda *a: 'direct', @@ -454,8 +454,7 @@ class stock_picking(osv.osv): return moves def action_confirm(self, cr, uid, ids, context={}): - val = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking') - self.write(cr, uid, ids, {'name': val, 'state': 'confirmed'}) + self.write(cr, uid, ids, {'state': 'confirmed'}) todo = [] for picking in self.browse(cr, uid, ids): for r in picking.move_lines: From 9b4d0613a68024fe9474f2e0e613f957a54be21b Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Thu, 5 Feb 2009 18:30:32 +0100 Subject: [PATCH 92/92] modifs bzr revid: fp@tinyerp.com-20090205173032-6hos06o1pq1m3ukk --- addons/document/document.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/document/document.py b/addons/document/document.py index 84a13af5564..36d71c27a82 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -513,7 +513,11 @@ class document_file(osv.osv): try: path = self._get_filestore(cr) if not os.path.isdir(path): - os.makedirs(path) + try: + os.makedirs(path) + except: + raise except_orm('Permission Denied !', 'You do not permissions to write on the server side.') + flag = None # This can be improved for dirs in os.listdir(path):