From d314626a204eb5746ed21a45bc041c8a0364e02d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 26 Jan 2009 10:35:16 +0100 Subject: [PATCH 01/13] [IMP] remove commented code bzr revid: christophe@tinyerp.com-20090126093516-or5huux2zssxtnay --- bin/addons/base/ir/ir_model.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index 69729317471..1631d7e1229 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -96,11 +96,6 @@ class ir_model_grid(osv.osv): _table = 'ir_model' _inherit = 'ir.model' _description = "Objects Security Grid" - #_rec_name = 'name' - #_columns = { - # 'name': fields.char('Object', size=64), - # 'model': fields.char('Object Name', size=64), - #} def create(self, cr, uid, vals, context=None): raise osv.except_osv('Error !', 'You cannot add an entry to this view !') From 9701d2380642b1af42a4d240e0f1ecdbb22f7c91 Mon Sep 17 00:00:00 2001 From: Geoff Gardiner Date: Mon, 26 Jan 2009 15:04:53 +0000 Subject: [PATCH 02/13] Test of change to a label in res_user.py bzr revid: gsg@pinot-grigio-20090126150453-m7qi2xvccs5qycu2 --- bin/addons/base/res/res_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py index 6b36d43b854..665cdd81f9d 100644 --- a/bin/addons/base/res/res_user.py +++ b/bin/addons/base/res/res_user.py @@ -66,7 +66,7 @@ class roles(osv.osv): _columns = { 'name': fields.char('Role Name', size=64, required=True), 'parent_id': fields.many2one('res.roles', 'Parent', select=True), - 'child_id': fields.one2many('res.roles', 'parent_id', 'Childs'), + 'child_id': fields.one2many('res.roles', 'parent_id', 'Children'), 'users': fields.many2many('res.users', 'res_roles_users_rel', 'rid', 'uid', 'Users'), } _defaults = { From 8adc58fa92075da8f923839bd4b8f780a3f53d8e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 26 Jan 2009 16:47:04 +0100 Subject: [PATCH 03/13] [FIX] use _inherit for inherited objects bzr revid: christophe@tinyerp.com-20090126154704-gexicefs2528dg51 --- bin/addons/base/ir/ir_actions.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index 02b4fa6da6e..a544048bbb1 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -233,6 +233,7 @@ act_window_view() class act_wizard(osv.osv): _name = 'ir.actions.wizard' + _inherit = 'ir.actions.actions' _table = 'ir_act_wizard' _sequence = 'ir_actions_id_seq' _columns = { @@ -669,12 +670,8 @@ actions_server() class act_window_close(osv.osv): _name = 'ir.actions.act_window_close' + _inherit = 'ir.actions.actions' _table = 'ir_actions' - _sequence = 'ir_actions_id_seq' - _columns = { - 'name': fields.char('Action Name', size=64, translate=True), - 'type': fields.char('Action Type', size=32, required=True), - } _defaults = { 'type': lambda *a: 'ir.actions.act_window_close', } From ab41714295af23aa5c95790777fbe2e65dff8efa Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 26 Jan 2009 16:50:46 +0100 Subject: [PATCH 04/13] [IMP] log in logger 'orm' instead of 'init' [FIX] warn the user when a column has been remove from a object bzr revid: christophe@tinyerp.com-20090126155046-quegkdj9l5a4d3ub --- bin/osv/orm.py | 52 +++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 1a5d67456af..f55bc2e28ed 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1368,7 +1368,7 @@ class orm(orm_template): def _parent_store_compute(self, cr): logger = netsvc.Logger() - logger.notifyChannel('init', netsvc.LOG_INFO, 'Computing parent left and right for table %s...' % (self._table, )) + logger.notifyChannel('orm', netsvc.LOG_INFO, 'Computing parent left and right for table %s...' % (self._table, )) def browse_rec(root, pos=0): # TODO: set order where = self._parent_name+'='+str(root) @@ -1388,7 +1388,7 @@ class orm(orm_template): def _update_store(self, cr, f, k): logger = netsvc.Logger() - logger.notifyChannel('init', netsvc.LOG_INFO, "storing computed values of fields.function '%s'" % (k,)) + logger.notifyChannel('orm', netsvc.LOG_INFO, "storing computed values of fields.function '%s'" % (k,)) ss = self._columns[k]._symbol_set update_query = 'UPDATE "%s" SET "%s"=%s WHERE id=%%s' % (self._table, k, ss[0]) cr.execute('select id from '+self._table) @@ -1425,11 +1425,11 @@ class orm(orm_template): """, (self._table, 'parent_left')) if not cr.rowcount: if 'parent_left' not in self._columns: - logger.notifyChannel('init', netsvc.LOG_ERROR, 'create a column parent_left on object %s: fields.integer(\'Left Parent\', select=1)' % (self._table, )) + logger.notifyChannel('orm', netsvc.LOG_ERROR, 'create a column parent_left on object %s: fields.integer(\'Left Parent\', select=1)' % (self._table, )) if 'parent_right' not in self._columns: - logger.notifyChannel('init', netsvc.LOG_ERROR, 'create a column parent_right on object %s: fields.integer(\'Right Parent\', select=1)' % (self._table, )) + logger.notifyChannel('orm', netsvc.LOG_ERROR, 'create a column parent_right on object %s: fields.integer(\'Right Parent\', select=1)' % (self._table, )) if self._columns[self._parent_name].ondelete<>'cascade': - logger.notifyChannel('init', netsvc.LOG_ERROR, "the columns %s on object must be set as ondelete='cascasde'" % (self._name, self._parent_name)) + logger.notifyChannel('orm', netsvc.LOG_ERROR, "the columns %s on object must be set as ondelete='cascasde'" % (self._name, self._parent_name)) cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_left" INTEGER' % (self._table,)) cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_right" INTEGER' % (self._table,)) cr.commit() @@ -1454,15 +1454,20 @@ class orm(orm_template): # iterate on the database columns to drop the NOT NULL constraints # of fields which were required but have been removed - cr.execute( - "SELECT a.attname, a.attnotnull "\ - "FROM pg_class c, pg_attribute a "\ - "WHERE c.oid=a.attrelid AND c.relname=%s", (self._table,)) - db_columns = cr.dictfetchall() - for column in db_columns: - if column['attname'] not in ('id', 'oid', 'tableoid', 'ctid', 'xmin', 'xmax', 'cmin', 'cmax'): - if column['attnotnull'] and column['attname'] not in self._columns: - cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" DROP NOT NULL' % (self._table, column['attname'])) + 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(): + logger.notifyChannel("orm", netsvc.LOG_WARNING, "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'])) # iterate on the "object columns" todo_update_store = [] @@ -1512,9 +1517,9 @@ class orm(orm_template): query = 'UPDATE "%s" SET "%s"=%s' % (self._table, k, ss[0]) cr.execute(query, (ss[1](default),)) cr.commit() - logger.notifyChannel('init', netsvc.LOG_DEBUG, 'setting default value of new column %s of table %s'% (k, self._table)) + logger.notifyChannel('orm', netsvc.LOG_DEBUG, 'setting default value of new column %s of table %s'% (k, self._table)) elif not create: - logger.notifyChannel('init', netsvc.LOG_DEBUG, 'creating new column %s of table %s'% (k, self._table)) + logger.notifyChannel('orm', netsvc.LOG_DEBUG, 'creating new column %s of table %s'% (k, self._table)) if isinstance(f, fields.function): order = 10 @@ -1539,7 +1544,7 @@ class orm(orm_template): cr.commit() cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL' % (self._table, k)) except Exception, e: - logger.notifyChannel('init', netsvc.LOG_WARNING, 'WARNING: unable to set column %s of table %s not null !\nTry to re-run: openerp-server.py --update=module\nIf it doesn\'t work, update records and execute manually:\nALTER TABLE %s ALTER COLUMN %s SET NOT NULL' % (k, self._table, self._table, k)) + logger.notifyChannel('orm', netsvc.LOG_WARNING, 'WARNING: unable to set column %s of table %s not null !\nTry to re-run: openerp-server.py --update=module\nIf it doesn\'t work, update records and execute manually:\nALTER TABLE %s ALTER COLUMN %s SET NOT NULL' % (k, self._table, self._table, k)) cr.commit() elif len(res)==1: f_pg_def = res[0] @@ -1547,7 +1552,7 @@ class orm(orm_template): f_pg_size = f_pg_def['size'] f_pg_notnull = f_pg_def['attnotnull'] if isinstance(f, fields.function) and not f.store: - logger.notifyChannel('init', netsvc.LOG_INFO, 'column %s (%s) in table %s removed: converted to a function !\n' % (k, f.string, self._table)) + logger.notifyChannel('orm', netsvc.LOG_INFO, 'column %s (%s) in table %s removed: converted to a function !\n' % (k, f.string, self._table)) cr.execute('ALTER TABLE %s DROP COLUMN %s'% (self._table, k)) cr.commit() f_obj_type = None @@ -1563,7 +1568,7 @@ class orm(orm_template): ('date', 'datetime', 'TIMESTAMP', '::TIMESTAMP'), ] if f_pg_type == 'varchar' and f._type == 'char' and f_pg_size != f.size: - logger.notifyChannel('init', netsvc.LOG_INFO, "column '%s' in table '%s' changed size" % (k, self._table)) + logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed size" % (k, self._table)) cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO temp_change_size' % (self._table, k)) cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" VARCHAR(%d)' % (self._table, k, f.size)) cr.execute('UPDATE "%s" SET "%s"=temp_change_size::VARCHAR(%d)' % (self._table, k, f.size)) @@ -1571,7 +1576,7 @@ class orm(orm_template): cr.commit() for c in casts: if (f_pg_type==c[0]) and (f._type==c[1]): - logger.notifyChannel('init', netsvc.LOG_INFO, "column '%s' in table '%s' changed type to %s." % (k, self._table, c[1])) + logger.notifyChannel('orm', netsvc.LOG_INFO, "column '%s' in table '%s' changed type to %s." % (k, self._table, c[1])) ok = True cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO temp_change_size' % (self._table, k)) cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, k, c[2])) @@ -1581,7 +1586,7 @@ class orm(orm_template): if f_pg_type != f_obj_type: if not ok: - logger.notifyChannel('init', netsvc.LOG_WARNING, "column '%s' in table '%s' has changed type (DB = %s, def = %s) but unable to migrate this change !" % (k, self._table, f_pg_type, f._type)) + logger.notifyChannel('orm', netsvc.LOG_WARNING, "column '%s' in table '%s' has changed type (DB = %s, def = %s) but unable to migrate this change !" % (k, self._table, f_pg_type, f._type)) # if the field is required and hasn't got a NOT NULL constraint if f.required and f_pg_notnull == 0: @@ -1598,7 +1603,7 @@ class orm(orm_template): cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" SET NOT NULL' % (self._table, k)) cr.commit() except Exception, e: - logger.notifyChannel('init', netsvc.LOG_WARNING, 'unable to set a NOT NULL constraint on column %s of the %s table !\nIf you want to have it, you should update the records and execute manually:\nALTER TABLE %s ALTER COLUMN %s SET NOT NULL' % (k, self._table, self._table, k)) + logger.notifyChannel('orm', netsvc.LOG_WARNING, 'unable to set a NOT NULL constraint on column %s of the %s table !\nIf you want to have it, you should update the records and execute manually:\nALTER TABLE %s ALTER COLUMN %s SET NOT NULL' % (k, self._table, self._table, k)) cr.commit() elif not f.required and f_pg_notnull == 1: cr.execute('ALTER TABLE "%s" ALTER COLUMN "%s" DROP NOT NULL' % (self._table, k)) @@ -1644,7 +1649,6 @@ class orm(orm_template): cr.execute('ALTER TABLE "' + self._table + '" ADD FOREIGN KEY ("' + k + '") REFERENCES "' + ref + '" ON DELETE ' + f.ondelete) cr.commit() else: - logger = netsvc.Logger() logger.notifyChannel('orm', netsvc.LOG_ERROR, "Programming error !") for order,f,k in todo_update_store: todo_end.append((order, self._update_store, (f, k))) @@ -1661,7 +1665,7 @@ class orm(orm_template): cr.execute('alter table "%s" add constraint "%s_%s" %s' % (self._table, self._table, key, con,)) cr.commit() except: - logger.notifyChannel('init', netsvc.LOG_WARNING, 'unable to add \'%s\' constraint on table %s !\n If you want to have it, you should update the records and execute manually:\nALTER table %s ADD CONSTRAINT %s_%s %s' % (con, self._table, self._table, self._table, key, con,)) + logger.notifyChannel('orm', netsvc.LOG_WARNING, 'unable to add \'%s\' constraint on table %s !\n If you want to have it, you should update the records and execute manually:\nALTER table %s ADD CONSTRAINT %s_%s %s' % (con, self._table, self._table, self._table, key, con,)) if create: if hasattr(self, "_sql"): From 18b90ecdcf755f75dd25bfbc8a6b3ab8ebace109 Mon Sep 17 00:00:00 2001 From: Geoff Gardiner Date: Mon, 26 Jan 2009 17:40:29 +0000 Subject: [PATCH 05/13] Set of label improvements to Open ERP Server. bzr revid: gsg@pinot-grigio-20090126174029-y6niysxn4adegdxu --- bin/addons/base/ir/ir_actions.py | 70 +++++++++---------- bin/addons/base/ir/ir_cron.py | 6 +- bin/addons/base/ir/ir_default.py | 2 +- bin/addons/base/ir/ir_exports.py | 8 +-- bin/addons/base/ir/ir_model.py | 8 +-- bin/addons/base/ir/ir_report_custom.py | 14 ++-- bin/addons/base/ir/ir_rule.py | 2 +- bin/addons/base/ir/ir_ui_menu.py | 4 +- bin/addons/base/ir/ir_ui_view.py | 4 +- bin/addons/base/ir/ir_values.py | 2 +- bin/addons/base/ir/workflow/workflow.py | 4 +- bin/addons/base/module/module.py | 10 +-- .../base/module/wizard/wizard_import_lang.py | 2 +- .../module/wizard/wizard_module_import.py | 2 +- .../wizard/wizard_module_lang_install.py | 2 +- bin/addons/base/res/country.py | 3 +- bin/addons/base/res/ir_property_view.xml | 2 +- bin/addons/base/res/partner/partner.py | 20 +++--- bin/addons/base/res/partner/partner_view.xml | 20 +++--- bin/addons/base/res/res_company.py | 2 +- bin/addons/base/res/res_currency.py | 2 +- bin/addons/base/res/res_request.py | 2 +- 22 files changed, 96 insertions(+), 95 deletions(-) diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index 02b4fa6da6e..50d3b4c8102 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -50,7 +50,7 @@ class report_custom(osv.osv): 'model':fields.char('Object', size=64, required=True), 'report_id': fields.integer('Report Ref.', required=True), 'usage': fields.char('Action Usage', size=32), - 'multi': fields.boolean('On multiple doc.', help="If set to true, the action will not be displayed on the right toolbar of a form views.") + 'multi': fields.boolean('On multiple doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view.") } _defaults = { 'multi': lambda *a: False, @@ -112,7 +112,7 @@ class report_xml(osv.osv): 'header': fields.boolean('Add RML header', help="Add or not the coporate RML header"), 'multi': fields.boolean('On multiple doc.', - help="If set to true, the action will not be displayed on the right toolbar of a form views."), + help="If set to true, the action will not be displayed on the right toolbar of a form view."), 'report_type': fields.selection([ ('pdf', 'pdf'), ('html', 'html'), @@ -121,8 +121,8 @@ class report_xml(osv.osv): ('odt', 'odt'), ], string='Type', required=True), 'groups_id': fields.many2many('res.groups', 'res_groups_report_rel', 'uid', 'gid', 'Groups'), - 'attachment': fields.char('Save As Attachment Prefix', size=128, help='This is the filename of the attachment to store the printing result. Keep empty to not save the printed reports. You can use python expression using the object and time variables.'), - 'attachment_use': fields.boolean('Reload from Attachment', help='If you check this, the second time the user print with same attachment name, it returns the previour report.') + 'attachment': fields.char('Save As Attachment Prefix', size=128, help='This is the filename of the attachment used to store the printing result. Keep empty to not save the printed reports. You can use a python expression with the object and time variables.'), + 'attachment_use': fields.boolean('Reload from Attachment', help='If you check this, then the second time the user prints with same attachment name, it returns the previous report.') } _defaults = { 'type': lambda *a: 'ir.actions.report.xml', @@ -186,8 +186,8 @@ class act_window(osv.osv): 'res_model': fields.char('Object', size=64), 'src_model': fields.char('Source Object', size=64), 'target': fields.selection([('current','Current Window'),('new','New Window')], 'Target Window'), - 'view_type': fields.selection((('tree','Tree'),('form','Form')),string='Type of view'), - 'view_mode': fields.char('Mode of view', size=250), + 'view_type': fields.selection((('tree','Tree'),('form','Form')),string='View Type'), + 'view_mode': fields.char('View Mode', size=250), 'usage': fields.char('Action Usage', size=32), 'view_ids': fields.one2many('ir.actions.act_window.view', 'act_window_id', 'Views'), 'views': fields.function(_views_get_fnc, method=True, type='binary', string='Views'), @@ -220,10 +220,10 @@ class act_window_view(osv.osv): ('form', 'Form'), ('graph', 'Graph'), ('calendar', 'Calendar'), - ('gantt', 'Gantt')), string='Type of view', required=True), + ('gantt', 'Gantt')), string='View Type', required=True), 'act_window_id': fields.many2one('ir.actions.act_window', 'Action', ondelete='cascade'), - 'multi': fields.boolean('On multiple doc.', - help="If set to true, the action will not be displayed on the right toolbar of a form views."), + 'multi': fields.boolean('On Multiple Doc.', + help="If set to true, the action will not be displayed on the right toolbar of a form view."), } _defaults = { 'multi': lambda *a: False, @@ -236,10 +236,10 @@ class act_wizard(osv.osv): _table = 'ir_act_wizard' _sequence = 'ir_actions_id_seq' _columns = { - 'name': fields.char('Wizard info', size=64, required=True, translate=True), - 'type': fields.char('Action type', size=32, required=True), - 'wiz_name': fields.char('Wizard name', size=64, required=True), - 'multi': fields.boolean('Action on multiple doc.', help="If set to true, the wizard will not be displayed on the right toolbar of a form views."), + 'name': fields.char('Wizard Info', size=64, required=True, translate=True), + 'type': fields.char('Action Type', size=32, required=True), + 'wiz_name': fields.char('Wizard Name', size=64, required=True), + 'multi': fields.boolean('Action on Multiple Doc.', help="If set to true, the wizard will not be displayed on the right toolbar of a form view."), 'groups_id': fields.many2many('res.groups', 'res_groups_wizard_rel', 'uid', 'gid', 'Groups'), 'model': fields.char('Object', size=64), } @@ -256,7 +256,7 @@ class act_url(osv.osv): _columns = { 'name': fields.char('Action Name', size=64, translate=True), 'type': fields.char('Action Type', size=32, required=True), - 'url': fields.text('Action Url',required=True), + 'url': fields.text('Action URL',required=True), 'target': fields.selection(( ('new', 'New Window'), ('self', 'This Window')), @@ -384,8 +384,8 @@ class actions_server(osv.osv): _sequence = 'ir_actions_id_seq' _order = 'sequence' _columns = { - 'name': fields.char('Action Name', required=True, size=64, help="Easy to Refer action by name i.e. One Sales Order -> Many Invoice"), - 'condition' : fields.char('Condition', size=256, required=True, help="Condition that is to be test before execute action, i.e : object.list_price > object.cost_price"), + 'name': fields.char('Action Name', required=True, size=64, help="Easy to Refer action by name e.g. One Sales Order -> Many Invoices"), + 'condition' : fields.char('Condition', size=256, required=True, help="Condition that is to be tested before action is executed, e.g. object.list_price > object.cost_price"), 'state': fields.selection([ ('client_action','Client Action'), ('dummy','Dummy'), @@ -397,28 +397,28 @@ class actions_server(osv.osv): ('object_create','Create Object'), ('object_write','Write Object'), ('other','Multi Actions'), - ], 'Action Type', required=True, size=32, help="Type of the Action that is to be execute"), - 'code':fields.text('Python Code', help="python code to be execute"), - 'sequence': fields.integer('Sequence', help="Important when you deal with the multi action, the execution order will be decided based on this, low number higher priority"), - 'model_id': fields.many2one('ir.model', 'Object', required=True, help="select the obect on which the action will work (read, write, create)"), - 'action_id': fields.many2one('ir.actions.actions', 'Client Action', help="Select the Ation Window, Report, Wizard to be execute"), - 'trigger_name': fields.selection(_select_signals, string='Trigger Name', size=128, help="Select the Signal name that is to be "), - 'wkf_model_id': fields.many2one('ir.model', 'Workflow on', help="Workflow to be execute on which model"), - 'trigger_obj_id': fields.many2one('ir.model.fields','Trigger On', help="select the object from the model on which the workflow will execute"), - 'email': fields.char('Email Address', size=512, help="provides the fiels that will refer to the tiny to fetch the email address, i.e. you select the invoice, then `object.invoice_address_id.email` is the field which give the correct address"), - 'subject': fields.char('Subject', size=1024, translate=True, help="Specify the subject, you can use the fields from the object. like `Hello [[ object.partner_id.name ]]`"), - 'message': fields.text('Message', translate=True, help="Specify the Message, you can use the fields from the object. like `Dear [[ object.partner_id.name ]]`"), - 'mobile': fields.char('Mobile No', size=512, help="provides the fiels that will refer to the tiny to fetch the mobile number, i.e. you select the invoice, then `object.invoice_address_id.mobile` is the field which give the correct mobile number"), + ], 'Action Type', required=True, size=32, help="Type of the Action that is to be executed"), + 'code':fields.text('Python Code', help="Python code to be executed"), + 'sequence': fields.integer('Sequence', help="Important when you deal with multiple actions, the execution order will be decided based on this, low number is higher priority."), + 'model_id': fields.many2one('ir.model', 'Object', required=True, help="Select the obect on which the action will work (read, write, create)."), + 'action_id': fields.many2one('ir.actions.actions', 'Client Action', help="Select the Action Window, Report, Wizard to be executed."), + 'trigger_name': fields.selection(_select_signals, string='Trigger Name', size=128, help="Select the Signal name that is to be used as the trigger."), + 'wkf_model_id': fields.many2one('ir.model', 'Workflow On', help="Workflow to be executed on this model."), + 'trigger_obj_id': fields.many2one('ir.model.fields','Trigger On', help="Select the object from the model on which the workflow will executed."), + 'email': fields.char('Email Address', size=512, help="Provides the fields that will be used to fetch the email address, e.g. when you select the invoice, then `object.invoice_address_id.email` is the field which gives the correct address"), + 'subject': fields.char('Subject', size=1024, translate=True, help="Specify the subject. You can use fields from the object, e.g. `Hello [[ object.partner_id.name ]]`"), + 'message': fields.text('Message', translate=True, help="Specify the message. You can use the fields from the object. e.g. `Dear [[ object.partner_id.name ]]`"), + 'mobile': fields.char('Mobile No', size=512, help="Provides fields that be used to fetch the mobile number, e.g. you select the invoice, then `object.invoice_address_id.mobile` is the field which gives the correct mobile number"), 'sms': fields.char('SMS', size=160, translate=True), - 'child_ids': fields.many2many('ir.actions.server', 'rel_server_actions', 'server_id', 'action_id', 'Others Actions'), + 'child_ids': fields.many2many('ir.actions.server', 'rel_server_actions', 'server_id', 'action_id', 'Other Actions'), 'usage': fields.char('Action Usage', size=32), 'type': fields.char('Action Type', size=32, required=True), - 'srcmodel_id': fields.many2one('ir.model', 'Model', help="In which object you want to create / write the object if its empty refer to the Object field"), - 'fields_lines': fields.one2many('ir.server.object.lines', 'server_id', 'Fields Mapping'), - 'record_id':fields.many2one('ir.model.fields', 'Create Id', help="Provide the field name from where the record id stores after the create operations, if its empty, you can not track the new record"), - 'write_id':fields.char('Write Id', size=256, help="Provide the field name from where the record id refer for the write operation, if its empty it will refer to the active id of the object"), - 'loop_action':fields.many2one('ir.actions.server', 'Loop Action', help="select the action, which will be executes. Loop action will not be avaliable inside loop"), - 'expression':fields.char('Loop Expression', size=512, help="enter the field/expression that will return the list, i.e. select the sale order in Object, and we can have loop on sales order line. Expression = `object.order_line`"), + 'srcmodel_id': fields.many2one('ir.model', 'Model', help="Object in which you want to create / write the object. If it is empty then refer to the Object field."), + 'fields_lines': fields.one2many('ir.server.object.lines', 'server_id', 'Field Mappings.'), + 'record_id':fields.many2one('ir.model.fields', 'Create Id', help="Provide the field name where the record id is stored after the create operations. If it is empty, you can not track the new record."), + 'write_id':fields.char('Write Id', size=256, help="Provide the field name that the record id refers to for the write operation. If it is empty it will refer to the active id of the object."), + 'loop_action':fields.many2one('ir.actions.server', 'Loop Action', help="Select the action that will be executed. Loop action will not be avaliable inside loop."), + 'expression':fields.char('Loop Expression', size=512, help="Enter the field/expression that will return the list. E.g. select the sale order in Object, and you can have loop on the sales order line. Expression = `object.order_line`."), } _defaults = { 'state': lambda *a: 'dummy', diff --git a/bin/addons/base/ir/ir_cron.py b/bin/addons/base/ir/ir_cron.py index 1510173fdae..75d6b61f131 100644 --- a/bin/addons/base/ir/ir_cron.py +++ b/bin/addons/base/ir/ir_cron.py @@ -47,9 +47,9 @@ class ir_cron(osv.osv, netsvc.Agent): 'interval_number': fields.integer('Interval Number'), 'interval_type': fields.selection( [('minutes', 'Minutes'), ('hours', 'Hours'), ('work_days','Work Days'), ('days', 'Days'),('weeks', 'Weeks'), ('months', 'Months')], 'Interval Unit'), - 'numbercall': fields.integer('Number of calls', help='Number of time the function is called,\na negative number indicates that the function will always be called'), - 'doall' : fields.boolean('Repeat missed'), - 'nextcall' : fields.datetime('Next call date', required=True), + 'numbercall': fields.integer('Number of Calls', help='Number of time the function is called,\na negative number indicates that the function will always be called'), + 'doall' : fields.boolean('Repeat Missed'), + 'nextcall' : fields.datetime('Next Call Date', required=True), 'model': fields.char('Object', size=64), 'function': fields.char('Function', size=64), 'args': fields.text('Arguments'), diff --git a/bin/addons/base/ir/ir_default.py b/bin/addons/base/ir/ir_default.py index 7cafd7c2101..4916c654ea3 100644 --- a/bin/addons/base/ir/ir_default.py +++ b/bin/addons/base/ir/ir_default.py @@ -26,7 +26,7 @@ class ir_default(osv.osv): _name = 'ir.default' _columns = { 'field_tbl': fields.char('Object',size=64), - 'field_name': fields.char('Object field',size=64), + 'field_name': fields.char('Object Field',size=64), 'value': fields.char('Default Value',size=64), 'uid': fields.many2one('res.users', 'Users'), 'page': fields.char('View',size=64), diff --git a/bin/addons/base/ir/ir_exports.py b/bin/addons/base/ir/ir_exports.py index 9ea635e3231..fb70adf1b27 100644 --- a/bin/addons/base/ir/ir_exports.py +++ b/bin/addons/base/ir/ir_exports.py @@ -26,10 +26,10 @@ from osv import fields,osv class ir_exports(osv.osv): _name = "ir.exports" _columns = { - 'name': fields.char('Export name', size=128), + 'name': fields.char('Export Name', size=128), 'resource': fields.char('Resource', size=128), 'export_fields': fields.one2many('ir.exports.line', 'export_id', - 'Export Id'), + 'Export ID'), } ir_exports() @@ -37,8 +37,8 @@ ir_exports() class ir_exports_line(osv.osv): _name = 'ir.exports.line' _columns = { - 'name': fields.char('Field name', size=64), - 'export_id': fields.many2one('ir.exports', 'Exportation', select=True, ondelete='cascade'), + 'name': fields.char('Field Name', size=64), + 'export_id': fields.many2one('ir.exports', 'Export', select=True, ondelete='cascade'), } ir_exports_line() diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index 69729317471..30442e4e154 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -43,7 +43,7 @@ class ir_model(osv.osv): 'model': fields.char('Object Name', size=64, required=True, select=1), 'info': fields.text('Information'), 'field_id': fields.one2many('ir.model.fields', 'model_id', 'Fields', required=True), - 'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manualy Created',readonly=True), + 'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Manually Created',readonly=True), 'access_ids': fields.one2many('ir.model.access', 'model_id', 'Access'), } _defaults = { @@ -200,7 +200,7 @@ class ir_model_fields(osv.osv): 'model': fields.char('Object Name', size=64, required=True), 'relation': fields.char('Object Relation', size=64), 'relation_field': fields.char('Relation Field', size=64), - 'model_id': fields.many2one('ir.model', 'Object id', required=True, select=True, ondelete='cascade'), + 'model_id': fields.many2one('ir.model', 'Object ID', required=True, select=True, ondelete='cascade'), 'field_description': fields.char('Field Label', required=True, size=256), 'ttype': fields.selection(_get_fields_type, 'Field Type',size=64, required=True), 'selection': fields.char('Field Selection',size=128), @@ -209,7 +209,7 @@ class ir_model_fields(osv.osv): 'select_level': fields.selection([('0','Not Searchable'),('1','Always Searchable'),('2','Advanced Search')],'Searchable', required=True), 'translate': fields.boolean('Translate'), 'size': fields.integer('Size'), - 'state': fields.selection([('manual','Custom Field'),('base','Base Field')],'Manualy Created', required=True, readonly=True), + 'state': fields.selection([('manual','Custom Field'),('base','Base Field')],'Manually Created', required=True, readonly=True), 'on_delete': fields.selection([('cascade','Cascade'),('set null','Set NULL')], 'On delete', help='On delete property for many2one fields'), 'domain': fields.char('Domain', size=256), 'groups': fields.many2many('res.groups', 'ir_model_fields_group_rel', 'field_id', 'group_id', 'Groups'), @@ -589,7 +589,7 @@ class ir_model_config(osv.osv): _name = 'ir.model.config' _columns = { 'password': fields.char('Password', size=64), - 'password_check': fields.char('confirmation', size=64), + 'password_check': fields.char('Confirmation', size=64), } def action_cancel(self, cr, uid, ids, context={}): diff --git a/bin/addons/base/ir/ir_report_custom.py b/bin/addons/base/ir/ir_report_custom.py index fcc9a02e198..54dc0874ee0 100644 --- a/bin/addons/base/ir/ir_report_custom.py +++ b/bin/addons/base/ir/ir_report_custom.py @@ -33,7 +33,7 @@ class report_custom(osv.osv): 'name': fields.char('Report Name', size=64, required=True, translate=True), 'model_id': fields.many2one('ir.model','Object', required=True, change_default=True), 'type': fields.selection([('table','Tabular'),('pie','Pie Chart'),('bar','Bar Chart'),('line','Line Plot')], "Report Type", size=64, required='True'), - 'title': fields.char("Report title", size=64, required='True', translate=True), + 'title': fields.char("Report Title", size=64, required='True', translate=True), 'print_format': fields.selection((('A4','a4'),('A5','a5')), 'Print format', required=True), 'print_orientation': fields.selection((('landscape','Landscape'),('portrait','Portrait')), 'Print orientation', required=True, size=16), 'repeat_header': fields.boolean('Repeat Header'), @@ -134,19 +134,19 @@ class report_custom_fields(osv.osv): _columns = { 'name': fields.char('Name', size=64, required=True), 'report_id': fields.many2one('ir.report.custom', 'Report Ref', select=True), - 'field_child0': fields.many2one('ir.model.fields', 'field child0', required=True), + 'field_child0': fields.many2one('ir.model.fields', 'Field child0', required=True), 'fc0_operande': fields.many2one('ir.model.fields', 'Constraint'), 'fc0_condition': fields.char('Condition', size=64), 'fc0_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'), - 'field_child1': fields.many2one('ir.model.fields', 'field child1'), + 'field_child1': fields.many2one('ir.model.fields', 'Field child1'), 'fc1_operande': fields.many2one('ir.model.fields', 'Constraint'), 'fc1_condition': fields.char('condition', size=64), 'fc1_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'), - 'field_child2': fields.many2one('ir.model.fields', 'field child2'), + 'field_child2': fields.many2one('ir.model.fields', 'Field child2'), 'fc2_operande': fields.many2one('ir.model.fields', 'Constraint'), 'fc2_condition': fields.char('condition', size=64), 'fc2_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'), - 'field_child3': fields.many2one('ir.model.fields', 'field child3'), + 'field_child3': fields.many2one('ir.model.fields', 'Field child3'), 'fc3_operande': fields.many2one('ir.model.fields', 'Constraint'), 'fc3_condition': fields.char('condition', size=64), 'fc3_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'), @@ -154,10 +154,10 @@ class report_custom_fields(osv.osv): 'sequence': fields.integer('Sequence', required=True), 'width': fields.integer('Fixed Width'), 'operation': fields.selection((('none', 'None'),('calc_sum','Calculate Sum'),('calc_avg','Calculate Average'),('calc_count','Calculate Count'),('calc_max', 'Get Max'))), - 'groupby' : fields.boolean('Group by'), + 'groupby' : fields.boolean('Group By'), 'bgcolor': fields.char('Background Color', size=64), 'fontcolor': fields.char('Font color', size=64), - 'cumulate': fields.boolean('Cumulate') + 'cumulate': fields.boolean('Accumulate') } _defaults = { 'alignment': lambda *a: 'left', diff --git a/bin/addons/base/ir/ir_rule.py b/bin/addons/base/ir/ir_rule.py index 40b40033a62..18fd97c4bd9 100644 --- a/bin/addons/base/ir/ir_rule.py +++ b/bin/addons/base/ir/ir_rule.py @@ -31,7 +31,7 @@ class ir_rule_group(osv.osv): _columns = { 'name': fields.char('Name', size=128, select=1), 'model_id': fields.many2one('ir.model', 'Object',select=1, required=True), - 'global': fields.boolean('Global', select=1, help="Make the rule global or it needs to be put on a group or user"), + 'global': fields.boolean('Global', select=1, help="Make the rule global, otherwise it needs to be put on a group or user"), 'rules': fields.one2many('ir.rule', 'rule_group', 'Tests', help="The rule is satisfied if at least one test is True"), 'groups': fields.many2many('res.groups', 'group_rule_group_rel', 'rule_group_id', 'group_id', 'Groups'), 'users': fields.many2many('res.users', 'user_rule_group_rel', 'rule_group_id', 'user_id', 'Users'), diff --git a/bin/addons/base/ir/ir_ui_menu.py b/bin/addons/base/ir/ir_ui_menu.py index 3e566e0be56..507934e38e1 100644 --- a/bin/addons/base/ir/ir_ui_menu.py +++ b/bin/addons/base/ir/ir_ui_menu.py @@ -225,10 +225,10 @@ class ir_ui_menu(osv.osv): _columns = { 'name': fields.char('Menu', size=64, required=True, translate=True), 'sequence': fields.integer('Sequence'), - 'child_id' : fields.one2many('ir.ui.menu', 'parent_id','Child ids'), + 'child_id' : fields.one2many('ir.ui.menu', 'parent_id','Child IDs'), 'parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', select=True), 'groups_id': many2many_unique('res.groups', 'ir_ui_menu_group_rel', - 'menu_id', 'gid', 'Groups', help="If you put groups, the visibility of this menu will be based on these groups. "\ + 'menu_id', 'gid', 'Groups', help="If you have groups, the visibility of this menu will be based on these groups. "\ "If this field is empty, Open ERP will compute visibility based on the related object's read access."), 'complete_name': fields.function(_get_full_name, method=True, string='Complete Name', type='char', size=128), diff --git a/bin/addons/base/ir/ir_ui_view.py b/bin/addons/base/ir/ir_ui_view.py index 0af9a32cbb8..f80b865db1b 100644 --- a/bin/addons/base/ir/ir_ui_view.py +++ b/bin/addons/base/ir/ir_ui_view.py @@ -42,7 +42,7 @@ def _check_xml(self, cr, uid, ids, context={}): class view_custom(osv.osv): _name = 'ir.ui.view.custom' _columns = { - 'ref_id': fields.many2one('ir.ui.view', 'Orignal View'), + 'ref_id': fields.many2one('ir.ui.view', 'Original View'), 'user_id': fields.many2one('res.users', 'User'), 'arch': fields.text('View Architecture', required=True), } @@ -62,7 +62,7 @@ class view(osv.osv): ('gantt', 'Gantt')), 'View Type', required=True), 'arch': fields.text('View Architecture', required=True), 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade'), - 'field_parent': fields.char('Childs Field',size=64), + 'field_parent': fields.char('Child Field',size=64), } _defaults = { 'arch': lambda *a: '\n\n\t\n', diff --git a/bin/addons/base/ir/ir_values.py b/bin/addons/base/ir/ir_values.py index 087b14dc99d..5b64622f356 100644 --- a/bin/addons/base/ir/ir_values.py +++ b/bin/addons/base/ir/ir_values.py @@ -79,7 +79,7 @@ class ir_values(osv.osv): help="The kind of action or button in the client side that will trigger the action."), 'meta': fields.text('Meta Datas'), 'meta_unpickle': fields.function(_value_unpickle, fnct_inv=_value_pickle, - method=True, type='text', string='Meta Datas'), + method=True, type='text', string='Metadata'), 'res_id': fields.integer('Object ID', help="Keep 0 if the action must appear on all resources."), 'user_id': fields.many2one('res.users', 'User', ondelete='cascade'), 'company_id': fields.many2one('res.company', 'Company') diff --git a/bin/addons/base/ir/workflow/workflow.py b/bin/addons/base/ir/workflow/workflow.py index 585ec490275..b980014a44f 100644 --- a/bin/addons/base/ir/workflow/workflow.py +++ b/bin/addons/base/ir/workflow/workflow.py @@ -110,8 +110,8 @@ class wkf_activity(osv.osv): 'flow_stop': fields.boolean('Flow Stop'), 'subflow_id': fields.many2one('workflow', 'Subflow'), 'signal_send': fields.char('Signal (subflow.*)', size=32), - 'out_transitions': fields.one2many('workflow.transition', 'act_from', 'Outgoing transitions'), - 'in_transitions': fields.one2many('workflow.transition', 'act_to', 'Incoming transitions'), + 'out_transitions': fields.one2many('workflow.transition', 'act_from', 'Outgoing Transitions'), + 'in_transitions': fields.one2many('workflow.transition', 'act_to', 'Incoming Transitions'), } _defaults = { 'kind': lambda *a: 'dummy', diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index a4f822a5e16..34f3f4b02da 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -43,12 +43,12 @@ class module_repository(osv.osv): _description = "Module Repository" _columns = { 'name': fields.char('Name', size=128), - 'url': fields.char('Url', size=256, required=True), + 'url': fields.char('URL', size=256, required=True), 'sequence': fields.integer('Sequence', required=True), 'filter': fields.char('Filter', size=128, required=True, help='Regexp to search module on the repository webpage:\n' '- The first parenthesis must match the name of the module.\n' - '- The second parenthesis must match all the version number.\n' + '- The second parenthesis must match the whole version number.\n' '- The last parenthesis must match the extension of the module.'), 'active': fields.boolean('Active'), } @@ -76,8 +76,8 @@ class module_category(osv.osv): _columns = { 'name': fields.char("Name", size=128, required=True), 'parent_id': fields.many2one('ir.module.category', 'Parent Category', select=True), - 'child_ids': fields.one2many('ir.module.category', 'parent_id', 'Parent Category'), - 'module_nr': fields.function(_module_nbr, method=True, string='# of Modules', type='integer') + 'child_ids': fields.one2many('ir.module.category', 'parent_id', 'Child Categories'), + 'module_nr': fields.function(_module_nbr, method=True, string='Number of Modules', type='integer') } _order = 'name' module_category() @@ -140,7 +140,7 @@ class module(osv.osv): _columns = { 'name': fields.char("Name", size=128, readonly=True, required=True), 'category_id': fields.many2one('ir.module.category', 'Category', readonly=True), - 'shortdesc': fields.char('Short description', size=256, readonly=True, translate=True), + 'shortdesc': fields.char('Short Description', size=256, readonly=True, translate=True), 'description': fields.text("Description", readonly=True, translate=True), 'author': fields.char("Author", size=128, readonly=True), 'website': fields.char("Website", size=256, readonly=True), diff --git a/bin/addons/base/module/wizard/wizard_import_lang.py b/bin/addons/base/module/wizard/wizard_import_lang.py index aad846d59ac..f17b50c3434 100644 --- a/bin/addons/base/module/wizard/wizard_import_lang.py +++ b/bin/addons/base/module/wizard/wizard_import_lang.py @@ -30,7 +30,7 @@ view_form="""
- + diff --git a/bin/addons/base/module/wizard/wizard_module_import.py b/bin/addons/base/module/wizard/wizard_module_import.py index a2c653471e2..fbf66d4c222 100644 --- a/bin/addons/base/module/wizard/wizard_module_import.py +++ b/bin/addons/base/module/wizard/wizard_module_import.py @@ -39,7 +39,7 @@ finish_form =''' ask_form =''' - +