From 70811ec5a199871196af5e024c6b1759dbfb5751 Mon Sep 17 00:00:00 2001 From: Launchpad Code Hosting Date: Wed, 20 Jan 2010 04:36:15 +0000 Subject: [PATCH 1/9] Launchpad automatic translations update. bzr revid: codehost@crowberry-20100120043615-dtrufoa9pj4bb0ak --- bin/addons/base/i18n/uk.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/base/i18n/uk.po b/bin/addons/base/i18n/uk.po index 2ebaea1d630..a8710995501 100644 --- a/bin/addons/base/i18n/uk.po +++ b/bin/addons/base/i18n/uk.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-01-18 05:27+0000\n" +"PO-Revision-Date: 2010-01-19 05:18+0000\n" "Last-Translator: Fabien (Open ERP) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-01-19 04:41+0000\n" +"X-Launchpad-Export-Date: 2010-01-20 04:36+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base From 95ea9b141becbf7ab7498f3e388e049db3f5fe14 Mon Sep 17 00:00:00 2001 From: "HDA (OpenERP)" Date: Wed, 20 Jan 2010 20:01:32 +0530 Subject: [PATCH 2/9] [IMP] group by functionality bzr revid: hda@tinyerp.com-20100120143132-oet7eoten9smy3m3 --- bin/osv/orm.py | 224 ++++++++++++++++++++++++++----------------------- 1 file changed, 119 insertions(+), 105 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 134929fcefa..8ee4a6170db 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -348,111 +348,8 @@ class orm_template(object): CONCURRENCY_CHECK_FIELD = '__last_update' - def read_group(self, cr, user, ids, fields, groupby, context=None): - context = context or {} - if not ids:return - - if fields[groupby]['type'] not in ('many2one','date','datetime'): - raise Exception(_("Type Not supported for Group By: %s :Only many2one,date and datetime are supported ") %(fields[groupby]['type'],)) - - qu1 = ' where id in (' + ','.join([str(id) for id in ids]) + ')' - qu2 = '' - # construct a clause for the rules : - d1, d2, d3 = self.pool.get('ir.rule').domain_get(cr, user, self._name) - - if d1: - qu1 = qu1 and qu1+' and '+d1 or ' where '+d1 - qu2 += d2 - - float_int_fields = list(field_name for field_name,values in fields.items() if values['type'] in ('float','integer')) - sum = {} - - cr.execute('select '+groupby+' from ' + self._table +qu1+' group by '+groupby+qu2) - parent_res = cr.fetchall() - try: - parent_res = [(m[0],m[1]) for m in parent_res if m[0]] - except: - parent_res = [(m[0],) for m in parent_res if m[0]] - groupby_ids = map(lambda x:x[0],parent_res) - - groupby_name = {} - child_ids_dict = {} - - if fields[groupby]['type'] == 'many2one': - groupby_name = dict(self.pool.get(fields[groupby]['relation']).name_get(cr,user,groupby_ids,context)) - - chqu1 =' where id in (' + ','.join([str(id) for id in ids]) + ') and ' - - # get child ids - for parent_id in groupby_ids: - cr.execute('select id from '+self._table+chqu1 +groupby+" = '%s'"%(parent_id,)) - child_ids = cr.fetchall() - for val in child_ids: - if parent_id not in child_ids_dict: - child_ids_dict[parent_id] = [val[0]] - else: - child_ids_dict[parent_id].append(val[0]) - #create [{},{}] for parent ids i.e for group by field - - result = [] - if fields[groupby]['type'] in ('date','datetime'): - curr_date = datetime.date.today() - yesterday = (curr_date - datetime.timedelta(days=1)).strftime('%Y-%m-%d') - lastweek = (curr_date + datetime.timedelta(weeks=-1)).strftime('%Y-%m-%d') - date_result = {'Today':{'group_child':[]},'Yesterday':{'group_child':[]}, - 'LastWeek':{'group_child':[]},'Old':{'group_child':[]}} - for x in parent_res: - db_date = x[0][:10] - if db_date == curr_date.strftime('%Y-%m-%d'): - date_format = 'Today' - elif db_date == yesterday: - date_format = 'Yesterday' - elif (db_date < yesterday) and (db_date >= lastweek): - date_format = 'LastWeek' - else: - date_format = 'Old' - date_result[date_format].update({'id':None,groupby:date_format}) - date_result[date_format]['group_child'] += child_ids_dict[x[0]] - float_int_sum = self.read(cr, user, child_ids_dict[x[0]], float_int_fields, context) - for value in float_int_sum: - for field,val in value.items(): - if field == 'id':continue - if field not in sum: - sum[field] = 0.0 - sum[field] += val - for k,v in sum.items(): - date_result[date_format][k] = v - sum = {} - for key,val in date_result.items(): - if len(date_result[key]) == 1: - del date_result[key] - continue - for field in fields.keys(): - if field not in val: - val[field] = False - if key in ('Today','Yesterday') and len(result): - result.insert(0,val) - else: - result.insert(-1,val) - return result - else: - for x in parent_res: - parent_val_dict = {'id':str(x[0])+':Gpby',groupby:(x[0],groupby_name[x[0]]),'group_child':child_ids_dict[x[0]]} - float_int_sum = self.read(cr, user, child_ids_dict[x[0]], float_int_fields, context) - for value in float_int_sum: - for field,val in value.items(): - if field == 'id':continue - if field not in sum: - sum[field] = 0.0 - sum[field] += val - for k,v in sum.items(): - parent_val_dict[k] = v - sum = {} - for field in fields.keys(): - if field not in parent_val_dict: - parent_val_dict[field] = False - result.append(parent_val_dict) - return result + def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): + raise _('The read_group method is not implemented on this object !') def _field_create(self, cr, context={}): cr.execute("SELECT id FROM ir_model WHERE model=%s", (self._name,)) @@ -1899,6 +1796,123 @@ class orm(orm_template): _table = None _protected = ['read','write','create','default_get','perm_read','unlink','fields_get','fields_view_get','search','name_get','distinct_field_get','name_search','copy','import_data','search_count', 'exists'] + def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): + context = context or {} + + if fields[groupby]['type'] not in ('many2one','date','datetime'): + raise Exception(_("Type Not supported for Group By: %s :Only many2one,date and datetime are supported ") %(fields[groupby]['type'],)) + + self.pool.get('ir.model.access').check(cr, uid, self._name, 'read', context=context) + if not fields: + fields = self._columns.keys() + self._inherit_fields.keys() + + # compute the where, order by, limit and offset clauses + (qu1, qu2, tables) = self._where_calc(cr, uid, domain, context=context) + dom = self.pool.get('ir.rule').domain_get(cr, uid, self._name, context=context) + qu1 = qu1 + dom[0] + qu2 = qu2 + dom[1] + for t in dom[2]: + if t not in tables: + tables.append(t) + if len(qu1): + qu1 = ' where '+string.join(qu1, ' and ') + else: + qu1 = '' +# limit_str = limit and ' limit %d' % limit or '' +# offset_str = offset and ' offset %d' % offset or '' + + float_int_fields = list(field_name for field_name,values in fields.items() if values['type'] in ('float','integer')) + sum = {} + flist = groupby + for f in float_int_fields: + if f not in ['id','sequence']: + flist += ',sum('+f+') as '+f + + cr.execute('select '+flist+' from ' + self._table +qu1+' group by '+groupby,qu2) + parent_res = cr.fetchall() + try: + parent_res = [(m[0],m[1]) for m in parent_res if m[0]] + except: + parent_res = [(m[0],) for m in parent_res if m[0]] + groupby_ids = map(lambda x:x[0],parent_res) + + groupby_name = {} + child_ids_dict = {} + + if fields[groupby]['type'] == 'many2one': + groupby_name = dict(self.pool.get(fields[groupby]['relation']).name_get(cr,uid,groupby_ids,context)) + + # get child ids + for parent_id in groupby_ids: + cr.execute('select id from '+self._table+qu1 +' AND '+groupby+" = '%s'",qu2+[parent_id]) + child_ids = cr.fetchall() + for val in child_ids: + if parent_id not in child_ids_dict: + child_ids_dict[parent_id] = [val[0]] + else: + child_ids_dict[parent_id].append(val[0]) + #create [{},{}] for parent ids i.e for group by field + + result = [] + if fields[groupby]['type'] in ('date','datetime'): + curr_date = datetime.date.today() + yesterday = (curr_date - datetime.timedelta(days=1)).strftime('%Y-%m-%d') + lastweek = (curr_date + datetime.timedelta(weeks=-1)).strftime('%Y-%m-%d') + date_result = {'Today':{'group_child':[]},'Yesterday':{'group_child':[]}, + 'LastWeek':{'group_child':[]},'Old':{'group_child':[]}} + for x in parent_res: + db_date = x[0][:10] + if db_date == curr_date.strftime('%Y-%m-%d'): + date_format = 'Today' + elif db_date == yesterday: + date_format = 'Yesterday' + elif (db_date < yesterday) and (db_date >= lastweek): + date_format = 'LastWeek' + else: + date_format = 'Old' + date_result[date_format].update({'id':None,groupby:date_format}) + date_result[date_format]['group_child'] += child_ids_dict[x[0]] + float_int_sum = self.read(cr, uid, child_ids_dict[x[0]], float_int_fields, context) + for value in float_int_sum: + for field,val in value.items(): + if field in ['id','sequence']:continue + if field not in sum: + sum[field] = 0.0 + sum[field] += val + for k,v in sum.items(): + date_result[date_format][k] = v + sum = {} + for key,val in date_result.items(): + if len(date_result[key]) == 1: + del date_result[key] + continue + for field in fields.keys(): + if field not in val: + val[field] = False + if key in ('Today','Yesterday') and len(result): + result.insert(0,val) + else: + result.insert(-1,val) + return result + else: + for x in parent_res: + parent_val_dict = {'id':str(x[0])+':Gpby',groupby:(x[0],groupby_name[x[0]]),'group_child':child_ids_dict[x[0]]} + float_int_sum = self.read(cr, uid, child_ids_dict[x[0]], float_int_fields, context) + for value in float_int_sum: + for field,val in value.items(): + if field == 'id':continue + if field not in sum: + sum[field] = 0.0 + sum[field] += val + for k,v in sum.items(): + parent_val_dict[k] = v + sum = {} + for field in fields.keys(): + if field not in parent_val_dict: + parent_val_dict[field] = False + result.append(parent_val_dict) + return result + def _parent_store_compute(self, cr): logger = netsvc.Logger() logger.notifyChannel('orm', netsvc.LOG_INFO, 'Computing parent left and right for table %s...' % (self._table, )) From 43e9a9bb33751aeaf6790bc72b72b665a64d241a Mon Sep 17 00:00:00 2001 From: Launchpad Code Hosting Date: Thu, 21 Jan 2010 04:33:50 +0000 Subject: [PATCH 3/9] Launchpad automatic translations update. bzr revid: codehost@crowberry-20100121043350-q61rtullfbuh3wn1 --- bin/addons/base/i18n/fr.po | 10 +++++----- bin/addons/base/i18n/uk.po | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/addons/base/i18n/fr.po b/bin/addons/base/i18n/fr.po index 9ca7e1b6604..f8f51f05665 100644 --- a/bin/addons/base/i18n/fr.po +++ b/bin/addons/base/i18n/fr.po @@ -7,19 +7,19 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2009-12-25 06:29+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-01-20 09:53+0000\n" +"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-01-14 04:46+0000\n" +"X-Launchpad-Export-Date: 2010-01-21 04:33+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base #: model:res.country,name:base.sh msgid "Saint Helena" -msgstr "Sainte-Hélène" +msgstr "Île Sainte-Hélène" #. module: base #: wizard_view:res.partner.sms_send,init:0 @@ -2574,7 +2574,7 @@ msgstr "Type d'évènement" #: view:res.partner.bank:0 #: model:res.partner.bank.type,name:base.bank_normal msgid "Bank account" -msgstr "Compte banquaire" +msgstr "Compte bancaire" #. module: base #: view:ir.sequence.type:0 diff --git a/bin/addons/base/i18n/uk.po b/bin/addons/base/i18n/uk.po index a8710995501..2adeaba4363 100644 --- a/bin/addons/base/i18n/uk.po +++ b/bin/addons/base/i18n/uk.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-12-18 08:39+0000\n" -"PO-Revision-Date: 2010-01-19 05:18+0000\n" +"PO-Revision-Date: 2010-01-20 05:18+0000\n" "Last-Translator: Fabien (Open ERP) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-01-20 04:36+0000\n" +"X-Launchpad-Export-Date: 2010-01-21 04:33+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base From be9a863b07aea8f30fa4a0dc1c18586c279cb04a Mon Sep 17 00:00:00 2001 From: "HDA (OpenERP)" Date: Thu, 21 Jan 2010 12:54:32 +0530 Subject: [PATCH 4/9] Improve read_group bzr revid: hda@tinyerp.com-20100121072432-0vrjmmcwwi6jzskg --- bin/osv/orm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 8ee4a6170db..df771db4000 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1818,8 +1818,8 @@ class orm(orm_template): qu1 = ' where '+string.join(qu1, ' and ') else: qu1 = '' -# limit_str = limit and ' limit %d' % limit or '' -# offset_str = offset and ' offset %d' % offset or '' + limit_str = limit and ' limit %d' % limit or '' + offset_str = offset and ' offset %d' % offset or '' float_int_fields = list(field_name for field_name,values in fields.items() if values['type'] in ('float','integer')) sum = {} @@ -1828,7 +1828,7 @@ class orm(orm_template): if f not in ['id','sequence']: flist += ',sum('+f+') as '+f - cr.execute('select '+flist+' from ' + self._table +qu1+' group by '+groupby,qu2) + cr.execute('select '+flist+' from ' + self._table +qu1+' group by '+ groupby + limit_str + offset_str,qu2) parent_res = cr.fetchall() try: parent_res = [(m[0],m[1]) for m in parent_res if m[0]] From 8fc7f3ddc371bbc919ac51ad4573f2f8b81e4bb9 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 21 Jan 2010 09:21:47 +0100 Subject: [PATCH 5/9] [IMP] better views project mgt bzr revid: fp@tinyerp.com-20100121082147-8rpf0qh611z78f94 --- addons/project/project.py | 4 +++- addons/project/project_view.xml | 9 +++++---- addons/project_gtd/project_gtd.py | 12 ++++++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index 815f69ecf3d..a104238ec05 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -493,7 +493,9 @@ class task(osv.osv): typeid = typ.type.id types = map(lambda x:x.id, typ.project_id.type_ids) if types: - if typeid and typeid in types and types.index(typeid) != len(types)-1 : + if not typeid: + self.write(cr, uid, typ.id, {'type': types[0]}) + elif typeid and typeid in types and types.index(typeid) != len(types)-1 : index = types.index(typeid) self.write(cr, uid, typ.id, {'type': types[index+1]}) return True diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index cee6d9ac2e2..888efaadae8 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -471,10 +471,6 @@ - - - - @@ -488,6 +484,11 @@ + + + + + diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index a6df9823cf1..076b3ae4b9e 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -29,6 +29,7 @@ import tools import netsvc from osv import fields, osv import ir +from tools.translate import _ class project_gtd_context(osv.osv): _name = "project.gtd.context" @@ -148,9 +149,12 @@ class project_task(osv.osv): timebox_ids = timebox_obj.search(cr,uid,[]) for task in self.browse(cr,uid,ids): timebox = task.timebox_id.id - if timebox and timebox_ids.index(timebox) != 0 : - index = timebox_ids.index(timebox) - self.write(cr, uid, task.id, {'timebox_id': timebox_ids[index - 1]}) + if timebox: + if timebox_ids.index(timebox): + index = timebox_ids.index(timebox) + self.write(cr, uid, task.id, {'timebox_id': timebox_ids[index - 1]}) + else: + self.write(cr, uid, task.id, {'timebox_id': False}) return True def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): @@ -159,7 +163,7 @@ class project_task(osv.osv): timebox_obj = self.pool.get('project.gtd.timebox') if res['type'] == 'search': tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[])) - search_extended ='''''' % (len(tt)+6,) + search_extended ='''''' % (len(tt)+6,_('Getting Things Done')) search_extended += '''''' search_extended += '''''' for time in tt: From e126dbec68c4c3ed99e2bb1db50461c73e87dea6 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Thu, 21 Jan 2010 14:11:53 +0530 Subject: [PATCH 6/9] [IMP]:survey:-Improved survey.request view. bzr revid: apa@tinyerp.com-20100121084153-e7vjgz30kn3w8bjj --- addons/survey/survey_view.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml index 443a43701e0..20bb9982aa5 100644 --- a/addons/survey/survey_view.xml +++ b/addons/survey/survey_view.xml @@ -43,7 +43,7 @@ - + @@ -93,7 +93,7 @@ - + @@ -279,7 +279,7 @@ - + @@ -463,7 +463,7 @@ - + @@ -957,7 +957,7 @@
- + @@ -978,7 +978,7 @@ - + From 6c9aff23282505a950fd176568c69426dbc509e1 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Thu, 21 Jan 2010 14:27:12 +0530 Subject: [PATCH 7/9] [IMP]:survey:-Improved survey data. bzr revid: apa@tinyerp.com-20100121085712-uo4c98blkyeqfbaj --- addons/survey/survey_demo.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/survey/survey_demo.xml b/addons/survey/survey_demo.xml index f618e903b98..eafa1aad81e 100644 --- a/addons/survey/survey_demo.xml +++ b/addons/survey/survey_demo.xml @@ -761,6 +761,11 @@ + + No + + + True Please enter a comment. @@ -984,11 +989,17 @@ 1 - - No + + YES + + No + + + + True Please enter a comment. From fdbe67292caeea1081e5fe7f3a168d5a7d822d4a Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 21 Jan 2010 17:31:23 +0530 Subject: [PATCH 8/9] [FIX] Added Missing import statements of translations( from tools.translate import _) lp bug: https://launchpad.net/bugs/510217 fixed bzr revid: jvo@tinyerp.com-20100121120123-k9hvy4nvegqf1vav --- addons/document/document_storage.py | 1 + addons/document_ics/document_ics.py | 1 + addons/hr_attendance/wizard/print_attendance_error.py | 1 + addons/hr_timesheet_invoice/wizard/account_analytic_profit.py | 1 + addons/purchase_manual/wizard/wizard_purchase_line_invoice.py | 1 + addons/sale_crm/wizard/makesale.py | 1 + 6 files changed, 6 insertions(+) diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py index 54e4ad3f9cf..d09bc62d325 100644 --- a/addons/document/document_storage.py +++ b/addons/document/document_storage.py @@ -25,6 +25,7 @@ import os import tools import base64 from tools.misc import ustr +from tools.translate import _ from osv.orm import except_orm diff --git a/addons/document_ics/document_ics.py b/addons/document_ics/document_ics.py index 150d44df4b6..acda761b279 100644 --- a/addons/document_ics/document_ics.py +++ b/addons/document_ics/document_ics.py @@ -30,6 +30,7 @@ import random import tools import re +from tools.translate import _ from document.nodes import node_content from tools.safe_eval import safe_eval diff --git a/addons/hr_attendance/wizard/print_attendance_error.py b/addons/hr_attendance/wizard/print_attendance_error.py index 234a878eb2e..cdddcaa0ddb 100644 --- a/addons/hr_attendance/wizard/print_attendance_error.py +++ b/addons/hr_attendance/wizard/print_attendance_error.py @@ -22,6 +22,7 @@ import wizard import time import pooler +from tools.translate import _ _date_form = ''' diff --git a/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py b/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py index 41fec24ae74..c2d4aecd171 100644 --- a/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py +++ b/addons/hr_timesheet_invoice/wizard/account_analytic_profit.py @@ -22,6 +22,7 @@ import wizard import datetime import pooler +from tools.translate import _ form=''' diff --git a/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py b/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py index 0982d5bbba6..0e30368d41b 100644 --- a/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py +++ b/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py @@ -24,6 +24,7 @@ import netsvc import ir import pooler from osv import osv +from tools.translate import _ invoice_form = """ diff --git a/addons/sale_crm/wizard/makesale.py b/addons/sale_crm/wizard/makesale.py index e366ceae814..fc2a27d479a 100644 --- a/addons/sale_crm/wizard/makesale.py +++ b/addons/sale_crm/wizard/makesale.py @@ -25,6 +25,7 @@ import wizard import netsvc import ir import pooler +from tools.translate import _ sale_form = """ From 13460bde68ee78703bb6245e1537a7fa43226642 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Thu, 21 Jan 2010 18:12:08 +0530 Subject: [PATCH 9/9] [ADD/IMP]:crm_hr,hr_evaluation: * Add demo data job survey in crm_hr. * Improved demo data for hr_evaluation. bzr revid: apa@tinyerp.com-20100121124208-rmv25daf8selh2yz --- addons/crm_hr/__terp__.py | 8 +- addons/crm_hr/crm_hr_data.xml | 445 +++++++++++++++++++- addons/hr_evaluation/__terp__.py | 2 +- addons/hr_evaluation/hr_evaluation_data.xml | 94 +++++ 4 files changed, 523 insertions(+), 26 deletions(-) diff --git a/addons/crm_hr/__terp__.py b/addons/crm_hr/__terp__.py index afa94c81178..3faec9b3b96 100644 --- a/addons/crm_hr/__terp__.py +++ b/addons/crm_hr/__terp__.py @@ -26,21 +26,21 @@ 'version': '1.0', 'category': 'Generic Modules/CRM & SRM', 'description': """ - This module provide Store the Job + This module provide Store the Job """, 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['crm','hr','board_crm_configuration'], + 'depends': ['crm','hr','board_crm_configuration','survey'], 'init_xml': [ 'crm_hr_data.xml' ], 'update_xml': [ - 'crm_hr_wizard.xml', + 'crm_hr_wizard.xml', 'crm_hr_view.xml', 'crm_hr_menu.xml', 'report_crm_hr_view.xml', 'security/crm_hr_security.xml', - 'board_crm_hr_statistical_view.xml', + 'board_crm_hr_statistical_view.xml', ], 'demo_xml': [ 'crm_hr_demo.xml' diff --git a/addons/crm_hr/crm_hr_data.xml b/addons/crm_hr/crm_hr_data.xml index 94a47be6d2f..8d8f6c2ee94 100644 --- a/addons/crm_hr/crm_hr_data.xml +++ b/addons/crm_hr/crm_hr_data.xml @@ -1,76 +1,479 @@ - + - + Salesman - + - + Junior Developer - - - + + + - + Graduate - - + + Licenced - + > Bac +5 - + - + - + Initial Jobs Demand - + First Interview - + Second Interview - + Contract Proposed - + Contract Signed - + Refused by Employee - + Refused by Company - + + + + + + + Job Survey + draft + + + + + + Default Section + + + + + + + Education &amp; Activities + + + + + + + Importance + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + From which university will you graduate? + + single_textbox + The comment you entered is in an invalid format. + + + + Other + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + Rate the Importance + + matrix_of_choices_only_one_ans + The comment you entered is in an invalid format. + + + + Other + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + Education + + comment + The comment you entered is in an invalid format. + + + + Other + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + Knowledge + + comment + The comment you entered is in an invalid format. + + + + Other + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + What is your gender? + + multiple_choice_only_one_ans + The comment you entered is in an invalid format. + + + + Other + + + + + + Male + + + + + + Female + + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + What age group do you belong to? + + multiple_choice_only_one_ans + The comment you entered is in an invalid format. + + + + Other + + + + + + 0 - 15 + + + + + 16 - 20 + + + + + 21 - 30 + + + + + 31 - 40 + + + + + 41 - 50 + + + + + 51 - 60 + + + + + 61 - 70 + + + + + 71 + + + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + Exprience + + comment + The comment you entered is in an invalid format. + + + + Other + + + + + + + do_not_validate + do_not_validate + Please enter a comment. + The choices need to add up to [enter sum here]. + + The comment you entered is in an invalid format. + + This question requires an answer. + + Activities + + comment + The comment you entered is in an invalid format. + + + + Other + + + + + + + + Not important + + + + + + + + Somewhat important + + + + + + + + Important + + + + + + + + Very important + + + + + + + + Most important + + + + + + + + Good pay + + + + + + + Getting on with colleagues + + + + + + + Office environment (décor, light, space etc) + + + + + + + Desk space + + + + + + + State of the art technology + + + + + + + Office location (proximity to home) + + + + + + + Good management/boss + + + + + + + Freebies such as tea, coffee and stationery + + + + + + + Perks such as free parking, gym passes etc + + + + + + + No out of hours working + + + + + + + Dress code + + + + + + + Regular meetings + + + + + + + Good social life (office nights out, good Christmas parties etc) + + + + + diff --git a/addons/hr_evaluation/__terp__.py b/addons/hr_evaluation/__terp__.py index 4dc5cb4eecd..27e55d16cf7 100644 --- a/addons/hr_evaluation/__terp__.py +++ b/addons/hr_evaluation/__terp__.py @@ -25,7 +25,7 @@ "author" : "Tiny", "category" : "Generic Modules/Human Resources", "website" : "http://www.openerp.com", - "depends" : ["hr","survey"], + "depends" : ["hr",'crm_hr'], "description": "Ability to create employees evaluation.", "init_xml" : [], "demo_xml" : ["hr_evaluation_demo.xml"], diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml index ba1951558f4..2a3d72d3ccd 100644 --- a/addons/hr_evaluation/hr_evaluation_data.xml +++ b/addons/hr_evaluation/hr_evaluation_data.xml @@ -1287,4 +1287,98 @@ Once the form had been filled, the employee send it to his supervisor. + + + + + waiting_answer + + + fp@tinyerp.com + 2010-02-21 + + + + + + + Manager's Evaluation Plan + + + + + + + + Send to Subordinates + + + + bottom-up + + + + + + + + + + + Send to Managers + + + + top-down + + + + + + + + + + + Send to Employee + + + + self + + + + + + + + + + + Final Interview With Manager + + + + final + + + + + + + + + + 0 + + + draft + + 2010-01-21 + + + + + +