diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index a8de84f2cdc..a76a7c015a6 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -327,7 +327,7 @@ - + @@ -335,7 +335,12 @@ - + + + + + + diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 31b2d7f7cc8..9849a5b012d 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -30,9 +30,14 @@ import pooler import pytz import re import tools -import vobject import time + +try: + import vobject +except ImportError: + raise osv.except_osv('vobject Import Error!','Please install python-vobject from http://vobject.skyhouseconsulting.com/') + # O-1 Optional and can come only once # O-n Optional and can come more than once # R-1 Required and can come only once @@ -66,33 +71,33 @@ def openobjectid2uid(cr, uidval, oomodel): return value def get_attribute_mapping(cr, uid, calname, context={}): - if not context: - context = {} - pool = pooler.get_pool(cr.dbname) - field_obj = pool.get('basic.calendar.fields') - type_obj = pool.get('basic.calendar.lines') - domain = [('object_id.model', '=', context.get('model'))] - if context.get('calendar_id'): - domain.append(('calendar_id', '=', context.get('calendar_id'))) - type_id = type_obj.search(cr, uid, domain) - fids = field_obj.search(cr, uid, [('type_id', '=', type_id[0])]) - res = {} - for field in field_obj.browse(cr, uid, fids): - attr = field.name.name - res[attr] = {} - res[attr]['field'] = field.field_id.name - res[attr]['type'] = field.field_id.ttype - if field.fn == 'hours': - res[attr]['type'] = "timedelta" - if res[attr]['type'] in ('one2many', 'many2many', 'many2one'): - res[attr]['object'] = field.field_id.relation - elif res[attr]['type'] in ('selection') and field.mapping: - res[attr]['mapping'] = eval(field.mapping) - if not res.get('uid', None): - res['uid'] = {} - res['uid']['field'] = 'id' - res['uid']['type'] = "integer" - return res + if not context: + context = {} + pool = pooler.get_pool(cr.dbname) + field_obj = pool.get('basic.calendar.fields') + type_obj = pool.get('basic.calendar.lines') + domain = [('object_id.model', '=', context.get('model'))] + if context.get('calendar_id'): + domain.append(('calendar_id', '=', context.get('calendar_id'))) + type_id = type_obj.search(cr, uid, domain) + fids = field_obj.search(cr, uid, [('type_id', '=', type_id[0])]) + res = {} + for field in field_obj.browse(cr, uid, fids): + attr = field.name.name + res[attr] = {} + res[attr]['field'] = field.field_id.name + res[attr]['type'] = field.field_id.ttype + if field.fn == 'hours': + res[attr]['type'] = "timedelta" + if res[attr]['type'] in ('one2many', 'many2many', 'many2one'): + res[attr]['object'] = field.field_id.relation + elif res[attr]['type'] in ('selection') and field.mapping: + res[attr]['mapping'] = eval(field.mapping) + if not res.get('uid', None): + res['uid'] = {} + res['uid']['field'] = 'id' + res['uid']['type'] = "integer" + return res def map_data(cr, uid, obj): vals = {} @@ -345,13 +350,13 @@ class Calendar(CalDAV, osv.osv): _columns = { 'name': fields.char("Name", size=64), 'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'), - 'active': fields.boolean('Active'), + 'active': fields.boolean('Active'), 'create_date': fields.datetime('Created Date'), 'write_date': fields.datetime('Modifided Date'), } _defaults = { - 'active': lambda *a: True, + 'active': lambda *a: True, } def export_cal(self, cr, uid, ids, vobj='vevent', context={}): @@ -413,7 +418,7 @@ class basic_calendar_line(osv.osv): } _defaults = { - 'domain': lambda *a: '[]', + 'domain': lambda *a: '[]', } basic_calendar_line() @@ -422,11 +427,11 @@ class basic_calendar_attribute(osv.osv): _name = 'basic.calendar.attributes' _description = 'Calendar attributes' _columns = { - 'name': fields.char("Name", size=64, required=True), + 'name': fields.char("Name", size=64, required=True), 'type': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO'), \ ('alarm', 'Alarm'), \ ('attendee', 'Attendee')], \ - string="Type", size=64, required=True), + string="Type", size=64, required=True), } basic_calendar_attribute() @@ -436,20 +441,20 @@ class basic_calendar_fields(osv.osv): _description = 'Calendar fields' _columns = { - 'field_id': fields.many2one('ir.model.fields', 'OpenObject Field'), - 'name': fields.many2one('basic.calendar.attributes', 'Name', required=True), + 'field_id': fields.many2one('ir.model.fields', 'OpenObject Field'), + 'name': fields.many2one('basic.calendar.attributes', 'Name', required=True), 'type_id': fields.many2one('basic.calendar.lines', 'Type', \ - required=True, ondelete='cascade'), - 'expr': fields.char("Expression", size=64), - 'fn': fields.selection( [('field', 'Use the field'), - ('const', 'Expression as constant'), - ('hours', 'Interval in hours'), - ],'Function'), + required=True, ondelete='cascade'), + 'expr': fields.char("Expression", size=64), + 'fn': fields.selection([('field', 'Use the field'), + ('const', 'Expression as constant'), + ('hours', 'Interval in hours'), + ], 'Function'), 'mapping': fields.text('Mapping'), } _defaults = { - 'fn': lambda *a: 'field', + 'fn': lambda *a: 'field', } def check_line(self, cr, uid, vals, name, context=None): @@ -471,7 +476,7 @@ class basic_calendar_fields(osv.osv): name = cr.fetchone() name = name[0] if name in ('valarm', 'attendee'): - self.check_line(cr, uid, vals, name, context=context) + self.check_line(cr, uid, vals, name, context=context) cr.execute("Select count(id) from basic_calendar_fields \ where name=%s and type_id=%s" % (vals.get('name'), vals.get('type_id'))) res = cr.fetchone() @@ -487,7 +492,7 @@ class basic_calendar_fields(osv.osv): field = self.browse(cr, uid, id, context=context) name = field.name.name if name in ('valarm', 'attendee'): - self.check_line(cr, uid, vals, name, context=context) + self.check_line(cr, uid, vals, name, context=context) qry = "Select count(id) from basic_calendar_fields \ where name=%s and type_id=%s" % (field.name.id, field.type_id.id) cr.execute(qry) diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py index 60c8d5f8fc3..af632e532b5 100644 --- a/addons/base_contact/__terp__.py +++ b/addons/base_contact/__terp__.py @@ -40,7 +40,7 @@ """, 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['base','process','sale'], + 'depends': ['base','process'], 'init_xml': [], 'update_xml': [ 'security/ir.model.access.csv', diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml index 6123e7ed938..d4b99e11a85 100644 --- a/addons/base_contact/base_contact_view.xml +++ b/addons/base_contact/base_contact_view.xml @@ -419,7 +419,18 @@ res_model="res.partner.job" src_model="res.partner" /> - + + + + + + + diff --git a/addons/base_module_merge/i18n/ru.po b/addons/base_module_merge/i18n/ru.po index 33266cc8bea..016eb866788 100644 --- a/addons/base_module_merge/i18n/ru.po +++ b/addons/base_module_merge/i18n/ru.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-02-04 04:47+0000\n" +"X-Launchpad-Export-Date: 2010-02-05 05:01+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base_module_merge diff --git a/addons/base_module_quality/i18n/pt_BR.po b/addons/base_module_quality/i18n/pt_BR.po index 88d7caaafbb..b799c63da63 100644 --- a/addons/base_module_quality/i18n/pt_BR.po +++ b/addons/base_module_quality/i18n/pt_BR.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-12-07 16:08+0000\n" -"Last-Translator: Pedro_Maschio \n" +"PO-Revision-Date: 2010-02-04 10:26+0000\n" +"Last-Translator: Holverat Bortolossi \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2009-12-16 05:26+0000\n" +"X-Launchpad-Export-Date: 2010-02-05 05:01+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base_module_quality @@ -27,18 +27,18 @@ msgstr "Pontuação Final (%)" msgid "" "The Object name must start with x_ and not contain any special character !" msgstr "" -"O nome do objeto precisa iniciar com x_ e não conter nenhum caracter " +"O nome do Objeto deve começar com x_ e não deve conter nenhum caracter " "especial!" #. module: base_module_quality #: model:ir.module.module,shortdesc:base_module_quality.module_meta_information msgid "Base module quality" -msgstr "Qualidade do módulo base" +msgstr "Módulo base da qualidade" #. module: base_module_quality #: field:module.quality.check,name:0 msgid "Rated Module" -msgstr "Nota do Módulo" +msgstr "Módulo Avaliado" #. module: base_module_quality #: view:module.quality.detail:0 @@ -53,7 +53,7 @@ msgstr "Nota" #. module: base_module_quality #: field:module.quality.detail,state:0 msgid "State" -msgstr "Status" +msgstr "Estado" #. module: base_module_quality #: field:module.quality.detail,detail:0 diff --git a/addons/caldav/caldav.py b/addons/caldav/caldav.py index ff35a8492c8..d440902f9e2 100644 --- a/addons/caldav/caldav.py +++ b/addons/caldav/caldav.py @@ -82,7 +82,7 @@ html_invitation = """ You are invited for %(company)s Event. - Below are the details of event : + Below are the details of event: @@ -237,7 +237,7 @@ class calendar_attendee(osv.osv): result[id][name] = uid if name == 'language': user_obj = self.pool.get('res.users') - lang = user_obj.read(cr, uid, uid, ['context_lang']) ['context_lang'] + lang = user_obj.read(cr, uid, uid, ['context_lang'])['context_lang'] result[id][name] = lang.replace('_', '-') return result @@ -285,10 +285,10 @@ request was delegated to"), 'del_from_user_ids': fields.many2many('calendar.attendee', 'att_del_from_user_rel', \ 'attendee_id', 'user_id', 'Users'), 'sent_by': fields.function(_compute_data, method=True, string='Sent By', type="char", multi='sent_by', store=True, size=124, help="Specify the user that is acting on behalf of the calendar user"), - 'sent_by_uid': fields.function(_compute_data, method=True, string='Sent By User', type="many2one", relation="res.users", multi='sent_by_uid'), + 'sent_by_uid': fields.function(_compute_data, method=True, string='Sent By User', type="many2one", relation="res.users", multi='sent_by_uid'), 'cn': fields.function(_compute_data, method=True, string='Common name', type="char", size=124, multi='cn', store=True), 'dir': fields.char('URI Reference', size=124, help="Reference to the URI that points to the directory information corresponding to the attendee."), - 'language': fields.function(_compute_data, method=True, string='Language', type="selection", selection=_lang_get, multi='language', store=True, help="To specify the language for text values in a property or property parameter."), + 'language': fields.function(_compute_data, method=True, string='Language', type="selection", selection=_lang_get, multi='language', store=True, help="To specify the language for text values in a property or property parameter."), 'user_id': fields.many2one('res.users', 'User'), 'partner_address_id': fields.many2one('res.partner.address', 'Contact'), 'partner_id':fields.related('partner_address_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'), @@ -424,7 +424,7 @@ are both optional, but if one occurs, so MUST the other"""), model_obj = self.pool.get(model) for datas in model_obj.browse(cr, uid, ids): alarm_ids = alarm_obj.search(cr, uid, [('model_id', '=', model_id), ('res_id', '=', datas.id)]) - if alarm_ids and len(alarm_ids): + if alarm_ids: alarm_obj.unlink(cr, uid, alarm_ids) cr.execute('Update %s set caldav_alarm_id=NULL, alarm_id=NULL\ where id=%s' % (model_obj._table, datas.id)) @@ -486,7 +486,7 @@ or contains the text to be used for display"""), res = super(calendar_alarm, self).create(cr, uid, vals, context) return res - def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, \ + def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False,\ context=None): if not context: context = {} @@ -535,7 +535,7 @@ or contains the text to be used for display"""), mail_to.append(att.user_id.address_id.email) tools.email_send( - tools.config.get('email_from',False), + tools.config.get('email_from', False), mail_to, sub, body @@ -551,7 +551,7 @@ class calendar_event(osv.osv): _description = "Calendar Event" __attribute__ = {} - def _tz_get(self,cr,uid, context={}): + def _tz_get(self, cr, uid, context={}): return [(x.lower(), x) for x in pytz.all_timezones] def onchange_rrule_type(self, cr, uid, ids, rtype, *args, **argv): @@ -590,7 +590,7 @@ class calendar_event(osv.osv): 'name': fields.char('Description', size=64, required=True), 'date': fields.datetime('Date'), 'date_deadline': fields.datetime('Deadline'), - 'create_date': fields.datetime('Created' ,readonly=True), + 'create_date': fields.datetime('Created', readonly=True), 'duration': fields.function(_get_duration, method=True, \ fnct_inv=_set_duration, string='Duration'), 'description': fields.text('Your action'), @@ -613,7 +613,7 @@ rule or repeating pattern for anexception to a recurrence set"), 'caldav_alarm_id': fields.many2one('calendar.alarm', 'Alarm'), 'recurrent_uid': fields.integer('Recurrent ID'), 'recurrent_id': fields.datetime('Recurrent ID date'), - 'vtimezone': fields.selection(_tz_get, 'Timezone', size=64), + 'vtimezone': fields.selection(_tz_get, 'Timezone', size=64), 'user_id': fields.many2one('res.users', 'Responsible'), } @@ -637,8 +637,8 @@ rule or repeating pattern for anexception to a recurrence set"), def check_import(self, cr, uid, vals, context={}): ids = [] for val in vals: - exists, r_id = base_calendar.uid2openobjectid(cr, val['id'], self._name, \ - val.get('recurrent_id')) + exists, r_id = base_calendar.uid2openobjectid(cr, val['id'], \ + self._name, val.get('recurrent_id')) if val.has_key('create_date'): val.pop('create_date') val['caldav_url'] = context.get('url') or '' val.pop('id') @@ -752,8 +752,8 @@ rule or repeating pattern for anexception to a recurrence set"), start_date = arg[2] elif arg[1] in ('<', '<='): until_date = arg[2] - res = super(calendar_event, self).search(cr, uid, args_without_date, offset, - limit, order, context, count) + res = super(calendar_event, self).search(cr, uid, args_without_date, \ + offset, limit, order, context, count) return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit) @@ -825,8 +825,7 @@ rule or repeating pattern for anexception to a recurrence set"), for record in self.read(cr, uid, [caldav_id2real_id(id)], \ ['date', 'rrule', 'exdate']): if record['rrule']: - exdate = (record['exdate'] and (record['exdate'] + ',') or '') + \ - ''.join((re.compile('\d')).findall(date_new)) + 'Z' + exdate = (record['exdate'] and (record['exdate'] + ',') or '') + ''.join((re.compile('\d')).findall(date_new)) + 'Z' if record['date'] == date_new: res = self.write(cr, uid, [caldav_id2real_id(id)], {'exdate': exdate}) else: @@ -867,14 +866,14 @@ class calendar_todo(osv.osv): return True _columns = { - 'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \ - string='Duration', store=True, type='datetime'), + 'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \ + string='Duration', store=True, type='datetime'), 'duration': fields.integer('Duration'), } __attribute__ = {} - def import_cal(self, cr, uid, data, data_id=None, context={}): + def import_cal(self, cr, uid, data, data_id=None, context={}): todo_obj = self.pool.get('basic.calendar.todo') vals = todo_obj.import_cal(cr, uid, data, context=context) return self.check_import(cr, uid, vals, context=context) @@ -954,7 +953,7 @@ class ir_values(osv.osv): new_model.append((data[0], caldav_id2real_id(data[1]))) else: new_model.append(data) - return super(ir_values, self).set(cr, uid, key, key2, name, new_model, \ + return super(ir_values, self).set(cr, uid, key, key2, name, new_model,\ value, replace, isobject, meta, preserve_user, company) def get(self, cr, uid, key, key2, models, meta=False, context={}, \ diff --git a/addons/crm/crm.py b/addons/crm/crm.py index aade125d08c..d302cdf341f 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -651,23 +651,22 @@ class crm_case(osv.osv): def onchange_partner_id(self, cr, uid, ids, part, email=False): if not part: - return {'value':{'partner_address_id': False}} + return {'value':{'partner_address_id': False, + 'email_from': False, + 'partner_name2': False}} addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact']) - data = {'partner_address_id':addr['contact']} - if addr['contact'] and not email: - data['email_from'] = self.pool.get('res.partner.address').browse(cr, uid, addr['contact']).email + data = {'partner_address_id': addr['contact']} + data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value']) return {'value':data} - - - - def onchange_partner_address_id(self, cr, uid, ids, part, email=False): - if not part: - return {'value':{}} + def onchange_partner_address_id(self, cr, uid, ids, add, email=False): data = {} - if not email: - data['email_from'] = self.pool.get('res.partner.address').browse(cr, uid, part).email - return {'value':data} + if not add: + return {'value': {'email_from': False, 'partner_name2': False}} + address= self.pool.get('res.partner.address').browse(cr, uid, add) + data['email_from'] = address.email + data['partner_name2'] = address.name or '' + return {'value': data} def case_close(self, cr, uid, ids, *args): cases = self.browse(cr, uid, ids) @@ -832,19 +831,21 @@ class crm_email_add_cc_wizard(osv.osv_memory): if not context: return {} history_line = self.pool.get('crm.case.history').browse(cr, uid, context['active_id']) - crm_case = self.pool.get('crm.case') - case = history_line.log_id.case_id + model = history_line.log_id.model_id.model + model_pool = self.pool.get(model) + case = model_pool.browse(cr, uid, history_line.log_id.res_id) body = history_line.description.replace('\n','\n> ') flag = tools.email_send( case.user_id.address_id.email, [case.email_from], subject or '['+str(case.id)+'] '+case.name, - crm_case.format_body(body), + model_pool.format_body(body), email_cc = [email], - openobject_id=str(case.id) + openobject_id=str(case.id), + subtype="html" ) if flag: - crm_case.write(cr, uid, case.id, {'email_cc' : case.email_cc and case.email_cc +','+ email or email}) + model_pool.write(cr, uid, case.id, {'email_cc' : case.email_cc and case.email_cc +','+ email or email}) else: raise osv.except_osv(_('Email Fail!'),("Lastest Email is not sent successfully")) return {} diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml index 75883d1122b..5776e69ce4e 100644 --- a/addons/crm/crm_lead_menu.xml +++ b/addons/crm/crm_lead_menu.xml @@ -10,7 +10,6 @@ crm.lead tree,form - diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 778cf41d756..5e748d2299e 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -47,8 +47,11 @@ - - + + @@ -174,7 +177,7 @@ /> - + diff --git a/addons/crm/i18n/gl.po b/addons/crm/i18n/gl.po index 35c40e9f486..a3e50c0c22a 100644 --- a/addons/crm/i18n/gl.po +++ b/addons/crm/i18n/gl.po @@ -1484,7 +1484,6 @@ msgstr "borrador" #. module: crm #: model:crm.case.stage,name:crm.stage_claim5 #: model:crm.case.stage,name:crm.stage_meet4 -#, fuzzy msgid "Awaiting Response" msgstr "Enviar correo ao responsábel" diff --git a/addons/crm/i18n/lt.po b/addons/crm/i18n/lt.po index fe772720d10..57761fb627b 100644 --- a/addons/crm/i18n/lt.po +++ b/addons/crm/i18n/lt.po @@ -913,7 +913,6 @@ msgstr "" #: model:crm.case.section,name:crm.section_support3 view:crm.opportunity:0 #: model:ir.ui.menu,name:crm.menu_crm_case_opp #: model:process.node,name:crm.process_node_opportunities0 -#, fuzzy msgid "Opportunities" msgstr "Galimybės" @@ -1470,7 +1469,6 @@ msgstr "" #. module: crm #: model:crm.case.stage,name:crm.stage_lead4 -#, fuzzy msgid "Converted" msgstr "Sukurta" @@ -1498,7 +1496,6 @@ msgstr "Istorija" #. module: crm #: model:ir.model,name:crm.model_crm_job -#, fuzzy msgid "Job Cases" msgstr "Klausimai" @@ -1517,7 +1514,6 @@ msgstr "" #: field:report.crm.case.section.categ.stage,state:0 #: field:report.crm.case.section.categ2,state:0 #: field:report.crm.case.section.stage,state:0 -#, fuzzy msgid "State" msgstr "Būklė" @@ -1585,13 +1581,11 @@ msgstr "Bendras aprašymas" #. module: crm #: view:crm.meeting:0 -#, fuzzy msgid "Other Info" msgstr "Papildoma informacija" #. module: crm #: view:crm.claim:0 -#, fuzzy msgid "Claim Cost" msgstr "Planuojamos išlaidos" @@ -1607,7 +1601,6 @@ msgstr "Nuoroda" #. module: crm #: field:crm.meeting,exrule:0 -#, fuzzy msgid "Exception Rule" msgstr "Atlikimo būklė" @@ -1618,7 +1611,6 @@ msgstr "" #. module: crm #: model:crm.case.category2,name:crm.category_lead2 -#, fuzzy msgid "Mail" msgstr "El. paštas" @@ -1671,7 +1663,6 @@ msgstr "Vardas" #. module: crm #: view:crm.opportunity:0 -#, fuzzy msgid "Sales Stage" msgstr "Klausimo būklė" @@ -1682,13 +1673,11 @@ msgstr "" #. module: crm #: field:crm.case.rule,act_mail_to_watchers:0 -#, fuzzy msgid "Mail to watchers (CC)" msgstr "Laiškas stebėtojams (Cc)" #. module: crm #: view:crm.fundraising:0 view:crm.meeting:0 -#, fuzzy msgid "Next Meeting" msgstr "Kitas veiksmas" @@ -1707,7 +1696,6 @@ msgstr "Leidžia ištrinti nejuodraštinius klausimus" #. module: crm #: model:crm.case.stage,name:crm.stage_oppor7 -#, fuzzy msgid "Closed Lost" msgstr "Uždaryta" @@ -1784,7 +1772,6 @@ msgstr "" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_history-act -#, fuzzy msgid "Histories" msgstr "Archyvuoti" @@ -1818,7 +1805,7 @@ msgstr "" #. module: crm #: code:addons/crm/crm.py:0 -#, fuzzy, python-format +#, python-format msgid "Email Fail!" msgstr "El. paštas" @@ -1867,7 +1854,6 @@ msgstr "Aukščiausias" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "Contract Data" msgstr "Sukūrimo data" @@ -1883,7 +1869,6 @@ msgstr "" #. module: crm #: field:crm.menu.config_wizard,document_ics:0 -#, fuzzy msgid "Shared Calendar" msgstr "Kalendorius" @@ -1930,7 +1915,6 @@ msgstr "" #. module: crm #: field:crm.case.category2,name:0 -#, fuzzy msgid "Case Category2 Name" msgstr "Klausimo kategorijos pavadinimas" @@ -1998,13 +1982,11 @@ msgstr "" #. module: crm #: field:crm.meeting,location:0 -#, fuzzy msgid "Location" msgstr "Veiksmas" #. module: crm #: view:crm.fundraising:0 -#, fuzzy msgid "Payment Mode" msgstr "Pirminis meniu" @@ -2061,7 +2043,6 @@ msgstr "Sukurta" #. module: crm #: view:crm.lead:0 -#, fuzzy msgid "Lead Information" msgstr "Bazinė informacija" @@ -2074,7 +2055,6 @@ msgstr "Segmentacijos eilutė" #: wizard_field:crm.job.reschedule_phone_call,init,deadline:0 #: wizard_field:crm.opportunity.reschedule_phone_call,init,deadline:0 #: view:crm.phonecall:0 -#, fuzzy msgid "Planned Date" msgstr "Planuojamos išlaidos" @@ -2115,7 +2095,6 @@ msgstr "" #. module: crm #: model:crm.case.stage,name:crm.stage_oppor1 -#, fuzzy msgid "Prospecting" msgstr "Profiliavimas" @@ -2126,7 +2105,6 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_meeting -#, fuzzy msgid "Meeting Cases" msgstr "Atviri klausimai" @@ -2137,7 +2115,6 @@ msgstr "" #. module: crm #: view:crm.meeting:0 -#, fuzzy msgid "Cancel Meeting" msgstr "Klausimo sekcija" @@ -2148,13 +2125,11 @@ msgstr "" #. module: crm #: view:crm.case.rule:0 -#, fuzzy msgid "%(case_date)s = Creation date" msgstr "%(case_id)s = Klausimo ID" #. module: crm #: model:crm.case.stage,name:crm.stage_phone3 view:crm.phonecall:0 -#, fuzzy msgid "Not Held" msgstr "Pastaba" @@ -2170,13 +2145,11 @@ msgstr "" #. module: crm #: model:crm.case.category2,name:crm.category_claim1 -#, fuzzy msgid "Corrective" msgstr "Aktyvuota" #. module: crm #: model:ir.model,name:crm.model_crm_opportunity -#, fuzzy msgid "Opportunity Cases" msgstr "Atviri klausimai" @@ -2195,7 +2168,6 @@ msgstr "Pašto šablonas siuntimui" #: field:report.crm.case.section.categ.stage,month:0 #: field:report.crm.case.section.categ2,month:0 #: field:report.crm.case.section.stage,month:0 -#, fuzzy msgid "Month" msgstr "Mėnesiai" @@ -2211,13 +2183,11 @@ msgstr "" #. module: crm #: wizard_button:crm.new.send.mail,init,send:0 #: wizard_button:crm.send.mail,init,send:0 -#, fuzzy msgid "Send Email" msgstr "El. paštas" #. module: crm #: wizard_view:crm.new.send.mail,init:0 -#, fuzzy msgid "Set case state to" msgstr "Nustatyti būklę į" @@ -2274,7 +2244,6 @@ msgstr "Pastaba" #: field:report.crm.case.section.categ.stage,delay_close:0 #: field:report.crm.case.section.categ2,delay_close:0 #: field:report.crm.case.section.stage,delay_close:0 -#, fuzzy msgid "Delay Close" msgstr "Delsos tipas" @@ -2299,13 +2268,12 @@ msgstr "Uždaryta" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "Candidate Name2" msgstr "Klausimo kategorijos pavadinimas" #. module: crm #: code:addons/crm/crm.py:0 -#, fuzzy, python-format +#, python-format msgid "cancel" msgstr "Atšaukti" @@ -2317,7 +2285,6 @@ msgstr "" #. module: crm #: view:crm.case:0 field:crm.case,child_ids:0 view:crm.claim:0 view:crm.lead:0 #: view:crm.opportunity:0 -#, fuzzy msgid "Events" msgstr "Partnerio renginiai" @@ -2395,7 +2362,6 @@ msgstr "Klausimo istorija" #. module: crm #: field:crm.case,partner_phone:0 -#, fuzzy msgid "Phone" msgstr "Niekas" @@ -2479,7 +2445,7 @@ msgstr "Veiksmas" #: model:crm.case.section,name:crm.section_support_claims view:crm.claim:0 #: field:crm.menu.config_wizard,claims:0 view:crm.phonecall:0 #: model:ir.ui.menu,name:crm.menu_crm_case_claims -#, fuzzy, python-format +#, python-format msgid "Claims" msgstr "Klausimas" @@ -2495,7 +2461,6 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_case_category2 -#, fuzzy msgid "Category2 of case" msgstr "Klausimo kategorija" @@ -2512,7 +2477,6 @@ msgstr "%(case_user_email)s = Atsakingo paštas" #. module: crm #: model:ir.ui.menu,name:crm.menu_presale -#, fuzzy msgid "Sales" msgstr "Klausimai" @@ -2523,7 +2487,6 @@ msgstr "Bendra" #. module: crm #: model:crm.case.stage,name:crm.stage_lead2 -#, fuzzy msgid "Assigned" msgstr "Visi nepriskirti " @@ -2541,7 +2504,6 @@ msgstr "" #. module: crm #: view:crm.case:0 view:crm.claim:0 view:crm.fundraising:0 view:crm.lead:0 #: selection:crm.new.send.mail,init,state:0 view:crm.opportunity:0 -#, fuzzy msgid "Done" msgstr "Niekas" @@ -2552,7 +2514,6 @@ msgstr "Maks. intervalas" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_category_act_oppor11 -#, fuzzy msgid "All Opportunities" msgstr "Verslo galimybės" @@ -2586,7 +2547,6 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_phonecall -#, fuzzy msgid "Phonecall Cases" msgstr "Visi klausimai" @@ -2619,13 +2579,11 @@ msgstr "" #. module: crm #: wizard_button:crm.job.meeting_set,init,order:0 #: wizard_button:crm.phonecall.meeting_set,init,order:0 -#, fuzzy msgid "Set Meeting" msgstr "Nustatyti sekciją į" #. module: crm #: field:crm.menu.config_wizard,meeting:0 -#, fuzzy msgid "Calendar of Meetings" msgstr "Kalendoriaus peržiūra" @@ -2644,13 +2602,11 @@ msgstr "" #. module: crm #: view:crm.lead:0 -#, fuzzy msgid "Lead Name" msgstr "Taisyklės pavadinimas" #. module: crm #: view:crm.claim:0 -#, fuzzy msgid "Claim/Action Description" msgstr "Segmentacijos aprašymas" @@ -2689,7 +2645,6 @@ msgstr "" #: view:report.crm.case.section.categ.categ2:0 #: view:report.crm.case.section.categ.stage:0 #: view:report.crm.case.section.categ2:0 view:report.crm.case.section.stage:0 -#, fuzzy msgid "This Month" msgstr "Mėnesiai" @@ -2700,7 +2655,6 @@ msgstr "" #. module: crm #: view:crm.opportunity:0 -#, fuzzy msgid "Opportunities Tree" msgstr "Verslo galimybės" @@ -2718,7 +2672,6 @@ msgstr "" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "Open Jobs" msgstr "Atviri klausimai" @@ -2741,13 +2694,11 @@ msgstr "" #. module: crm #: field:crm.case.rule,server_action_id:0 -#, fuzzy msgid "Server Action" msgstr "Sekcija" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_categ_claim0 -#, fuzzy msgid "All Claims" msgstr "Visi klausimai" @@ -2774,7 +2725,6 @@ msgstr "Naujausi laiškai" #. module: crm #: view:crm.case.rule:0 -#, fuzzy msgid "Regex on Communication History" msgstr "Klausimų komunikacijos istorija" @@ -2827,13 +2777,11 @@ msgstr "Paskutinis veiksmas" #. module: crm #: field:crm.case,duration:0 -#, fuzzy msgid "Duration" msgstr "Jūsų veiksmas" #. module: crm #: model:ir.model,name:crm.model_report_crm_case_section_categ_stage -#, fuzzy msgid "Cases by section, Category and stage" msgstr "Klausimai pagal sekciją" @@ -2844,7 +2792,6 @@ msgstr "" #. module: crm #: field:crm.menu.config_wizard,jobs:0 -#, fuzzy msgid "Jobs Hiring Process" msgstr "Tęsti procesą" @@ -2869,7 +2816,6 @@ msgstr "" #: field:report.crm.case.section.categ.stage,nbr:0 #: field:report.crm.case.section.categ2,nbr:0 #: field:report.crm.case.section.stage,nbr:0 -#, fuzzy msgid "# of Cases" msgstr "Klausimai" @@ -2895,14 +2841,12 @@ msgstr "" #. module: crm #: view:crm.meeting:0 -#, fuzzy msgid "Search Meetings" msgstr "Sekcijos" #. module: crm #: selection:crm.lead.opportunity_set,create_partner,action:0 #: selection:crm.phonecall.opportunity_set,create_partner,action:0 -#, fuzzy msgid "Create a new partner" msgstr "Sukūrimo data" @@ -2913,7 +2857,6 @@ msgstr "" #. module: crm #: model:crm.case.stage,name:crm.stage_lead3 -#, fuzzy msgid "In Process" msgstr "Stabdyti procesą" @@ -2936,7 +2879,6 @@ msgstr "" #. module: crm #: model:ir.ui.menu,name:crm.menu_crm_case_section_categ_tree #: view:report.crm.case.section.categ2:0 -#, fuzzy msgid "Cases by Section and Type" msgstr "Klausimai pagal sekciją" @@ -2954,7 +2896,6 @@ msgstr "" #. module: crm #: wizard_field:caldav.crm.export,init,name:0 -#, fuzzy msgid "File name" msgstr "Taisyklės pavadinimas" @@ -2995,7 +2936,6 @@ msgstr "" #: selection:report.crm.case.section.categ.stage,state:0 #: selection:report.crm.case.section.categ2,state:0 #: selection:report.crm.case.section.stage,state:0 -#, fuzzy msgid "Cancelled" msgstr "Atšaukti" @@ -3048,7 +2988,6 @@ msgstr "Klausimų komunikacijos istorija" #. module: crm #: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_categ -#, fuzzy msgid "Cases by Opportunities and Type" msgstr "Verslo galimybės" @@ -3092,7 +3031,6 @@ msgstr "" #. module: crm #: model:crm.case.stage,name:crm.stage_lead1 -#, fuzzy msgid "New" msgstr "Naujas " @@ -3120,7 +3058,6 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_claim -#, fuzzy msgid "Claim Cases" msgstr "Visi klausimai" @@ -3136,7 +3073,6 @@ msgstr "" #. module: crm #: field:crm.meeting,exdate:0 -#, fuzzy msgid "Exception Date/Times" msgstr "Atlikimo būklė" @@ -3147,7 +3083,6 @@ msgstr "" #. module: crm #: model:process.transition,note:crm.process_transition_leadopportunity0 -#, fuzzy msgid "Creating business opportunities from Leads" msgstr "Verslo galimybės" @@ -3173,7 +3108,6 @@ msgstr "Laukia" #. module: crm #: model:process.transition,name:crm.process_transition_leadopportunity0 -#, fuzzy msgid "Prospect Opportunity" msgstr "Verslo galimybės" @@ -3204,7 +3138,6 @@ msgstr "" #. module: crm #: view:crm.case:0 -#, fuzzy msgid "My Cases" msgstr "Mano klausimai" @@ -3226,7 +3159,6 @@ msgstr "" #. module: crm #: model:crm.case.stage,name:crm.stage_phone1 -#, fuzzy msgid "Planned" msgstr "Planuojamos išlaidos" @@ -3237,19 +3169,16 @@ msgstr "" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "Candidate Email" msgstr "Partnerio el. paštas" #. module: crm #: view:crm.opportunity:0 -#, fuzzy msgid "Sales Stage: " msgstr "Klausimo būklė" #. module: crm #: view:crm.claim:0 -#, fuzzy msgid "Type of Action" msgstr "Kitas veiksmas" @@ -3260,7 +3189,6 @@ msgstr "Nustatyti atsakingą į" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "Meeting With Candidates" msgstr "Naujas su kalendoriumi" @@ -3284,7 +3212,6 @@ msgstr "" #. module: crm #: view:report.crm.case.section.categ.categ2:0 -#, fuzzy msgid "Search Cases by User" msgstr "Klausimai pagal sekciją" @@ -3310,7 +3237,6 @@ msgstr "Objekto iškvietimo metodas" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_category_act_fund_all1 -#, fuzzy msgid "All Funds" msgstr "Visi " @@ -3322,7 +3248,6 @@ msgstr "Kalendorius" #. module: crm #: model:crm.case.categ,name:crm.categ_job1 -#, fuzzy msgid "Salesman" msgstr "Pardavimo suma" @@ -3379,7 +3304,6 @@ msgstr "Ne einamasis" #: wizard_field:crm.case.opportunity.partner_opportunity,init,probability:0 #: wizard_field:crm.lead.opportunity_set,opportunity,probability:0 #: wizard_field:crm.phonecall.opportunity_set,opportunity,probability:0 -#, fuzzy msgid "Success Probability" msgstr "Tikimybė (%)" @@ -3437,13 +3361,11 @@ msgstr "" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "Qualication" msgstr "Komunikacija" #. module: crm #: view:crm.meeting:0 -#, fuzzy msgid "Change RRule" msgstr "Klausimo taisyklė" @@ -3460,7 +3382,6 @@ msgstr "" #: model:ir.ui.menu,name:crm.menu_action_report_crm_case_lead_categ_categ2 #: model:ir.ui.menu,name:crm.menu_crm_case_section_categ_categ2_tree #: view:report.crm.case.section.categ.categ2:0 -#, fuzzy msgid "Cases by Section, Category and Type" msgstr "Klausimo kategorijos pavadinimas" @@ -3510,7 +3431,6 @@ msgstr "" #. module: crm #: model:process.process,name:crm.process_process_contractprocess0 -#, fuzzy msgid "Contract" msgstr "Partnerio kontaktas" @@ -3555,7 +3475,6 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_case_stage -#, fuzzy msgid "Stage of case" msgstr "Klausimo kategorija" @@ -3593,7 +3512,6 @@ msgstr "Sekcijos kodas" #. module: crm #: wizard_field:crm.job.meeting_set,init,date:0 #: wizard_field:crm.phonecall.meeting_set,init,date:0 -#, fuzzy msgid "Meeting date" msgstr "Sukūrimo data" @@ -3609,7 +3527,6 @@ msgstr "" #. module: crm #: model:crm.case.stage,name:crm.stage_meet2 -#, fuzzy msgid "Not fixed" msgstr "Pastaba" @@ -3642,7 +3559,6 @@ msgstr "Aprašymas" #: selection:report.crm.case.section.categ.stage,month:0 #: selection:report.crm.case.section.categ2,month:0 #: selection:report.crm.case.section.stage,month:0 -#, fuzzy msgid "May" msgstr "Mano " @@ -3741,13 +3657,11 @@ msgstr "" #. module: crm #: model:crm.case.category2,name:crm.categ2_fund1 -#, fuzzy msgid "Cash" msgstr "Klausimas" #. module: crm #: view:crm.fundraising:0 -#, fuzzy msgid "Funds by Categories" msgstr "Kategorijos" @@ -3791,7 +3705,6 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_helpdesk -#, fuzzy msgid "Helpdesk Cases" msgstr "Atviri klausimai" @@ -3830,13 +3743,11 @@ msgstr "Klausimai pagal sekciją" #. module: crm #: view:crm.job:0 -#, fuzzy msgid "New Jobs" msgstr "Naujas " #. module: crm #: field:crm.menu.config_wizard,fund:0 -#, fuzzy msgid "Fund Raising Operations" msgstr "Profiliavimo parinktys" diff --git a/addons/crm/wizard/wizard_crm_new_send_email.py b/addons/crm/wizard/wizard_crm_new_send_email.py index 42b2f244b68..f3a7a44e06a 100644 --- a/addons/crm/wizard/wizard_crm_new_send_email.py +++ b/addons/crm/wizard/wizard_crm_new_send_email.py @@ -80,11 +80,9 @@ def _mass_mail_send(self, cr, uid, data, context): emails = [data['form']['to']] + (data['form']['cc'] or '').split(',') emails = filter(None, emails) body = data['form']['text'] - if not case.user_id.address_id.email: - raise wizard.except_wizard(_('Warning!'),_("Please specify user's email address !")) if case.user_id.signature: body += '\n\n%s' % (case.user_id.signature) - case_pool._history(cr, uid, [case], _('Send'), history=True, email=False, details=body) + case_pool._history(cr, uid, [case], _('Send'), history=True, email=data['form']['to'], details=body) flag = tools.email_send( case.user_id.address_id.email, emails, @@ -92,8 +90,8 @@ def _mass_mail_send(self, cr, uid, data, context): case_pool.format_body(body), attach=attach, reply_to=case.section_id.reply_to, - - openobject_id=str(case.id) + openobject_id=str(case.id), + subtype="html" ) if flag: if data['form']['state'] == 'unchanged': @@ -113,9 +111,10 @@ def _get_info(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) case = pool.get(data.get('model')).browse(cr, uid, data['id']) - if not case.user_id: raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!')) + if not case.user_id.address_id.email: + raise wizard.except_wizard(_('Warning!'),_("Please specify user's email address !")) return { 'to': case.email_from, diff --git a/addons/crm/wizard/wizard_crm_send_email.py b/addons/crm/wizard/wizard_crm_send_email.py index 181ff2926c6..d6b3732d5e7 100644 --- a/addons/crm/wizard/wizard_crm_send_email.py +++ b/addons/crm/wizard/wizard_crm_send_email.py @@ -51,12 +51,13 @@ email_send_fields = { # this sends an email to ALL the addresses of the selected partners. def _mass_mail_send(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) - case_pool=pool.get(data['model']) hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0] - case = hist_obj.log_id.case_id - case_pool._history(cr, uid, [case], _('Send'), history=True, email=False) - case_pool.write(cr, uid, [case.id], { + model = hist_obj.log_id.model_id.model + model_pool = pool.get(model) + case = model_pool.browse(cr, uid, hist_obj.log_id.res_id) + model_pool._history(cr, uid, [case], _('Send'), history=True, email=False) + model_pool.write(cr, uid, [case.id], { 'som': False, 'canal_id': False, }) @@ -69,9 +70,10 @@ def _mass_mail_send(self, cr, uid, data, context): case.user_id.address_id.email, emails, data['form']['subject'], - case_pool.format_body(body), + model_pool.format_body(body), reply_to=case.section_id.reply_to, - openobject_id=str(case.id) + openobject_id=str(case.id), + subtype="html" ) return {} @@ -80,7 +82,9 @@ def _get_info(self, cr, uid, data, context): raise wizard.except_wizard(_('Error'),_('There is no mail to reply!')) pool = pooler.get_pool(cr.dbname) hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0] - case = hist_obj.log_id.case_id + model = hist_obj.log_id.model_id.model + model_pool = pool.get(model) + case = model_pool.browse(cr, uid, hist_obj.log_id.res_id) if not case.email_from: raise wizard.except_wizard(_('Error'),_('You must put a Partner eMail to use this action!')) if not case.user_id: diff --git a/addons/crm_hr/crm_hr_data.xml b/addons/crm_hr/crm_hr_data.xml index 337e9f3af24..897434987a4 100644 --- a/addons/crm_hr/crm_hr_data.xml +++ b/addons/crm_hr/crm_hr_data.xml @@ -107,6 +107,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -130,6 +131,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -153,6 +155,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -176,6 +179,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -199,6 +203,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -221,12 +226,14 @@ + 1 Male + 1 Female @@ -235,6 +242,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -257,41 +265,49 @@ + 1 0 - 15 + 1 16 - 20 + 1 21 - 30 + 1 31 - 40 + 1 41 - 50 + 1 51 - 60 + 1 61 - 70 + 1 71 + @@ -300,6 +316,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -323,6 +340,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -387,6 +405,7 @@ + 1 Good pay @@ -394,6 +413,7 @@ + 1 Getting on with colleagues @@ -401,6 +421,7 @@ + 1 Office environment (décor, light, space etc) @@ -408,6 +429,7 @@ + 1 Desk space @@ -415,6 +437,7 @@ + 1 State of the art technology @@ -422,6 +445,7 @@ + 1 Office location (proximity to home) @@ -429,6 +453,7 @@ + 1 Good management/boss @@ -436,6 +461,7 @@ + 1 Freebies such as tea, coffee and stationery @@ -443,6 +469,7 @@ + 1 Perks such as free parking, gym passes etc @@ -450,6 +477,7 @@ + 1 No out of hours working @@ -457,6 +485,7 @@ + 1 Dress code @@ -464,6 +493,7 @@ + 1 Regular meetings @@ -471,6 +501,7 @@ + 1 Good social life (office nights out, good Christmas parties etc) diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml index ab156cf1feb..3fa805388c0 100644 --- a/addons/document/document_view.xml +++ b/addons/document/document_view.xml @@ -3,9 +3,9 @@ - - - + + + document.storage @@ -249,7 +249,7 @@ ir.attachment form - + Document / Manager - + diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml index d2223e45fb2..fdd66ca403c 100644 --- a/addons/hr_evaluation/hr_evaluation_data.xml +++ b/addons/hr_evaluation/hr_evaluation_data.xml @@ -79,6 +79,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -90,7 +91,7 @@ Employee Details - multiple_textboxes + multiple_textboxes_diff_type The comment you entered is in an invalid format. @@ -103,6 +104,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -114,7 +116,7 @@ Employee Information - multiple_textboxes + multiple_textboxes_diff_type The comment you entered is in an invalid format. @@ -126,6 +128,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -149,6 +152,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -174,6 +178,7 @@ + 1 do_not_validate do_not_validate Please enter a comment. @@ -194,6 +199,7 @@ - + parent="base.menu_purchase_root" sequence="1"/> - + + parent="base.menu_procurement_management_supplier" action="base.action_partner_supplier_form" sequence="1"/> + parent="base.menu_purchase_root" sequence="4"/> + parent="base.menu_purchase_root" sequence="6"/> + parent="base.menu_purchase_root" sequence="8"/> @@ -161,6 +161,11 @@ + + + + + diff --git a/addons/purchase_manual/purchase_manual_view.xml b/addons/purchase_manual/purchase_manual_view.xml index 60460f30546..4e698dcac53 100644 --- a/addons/purchase_manual/purchase_manual_view.xml +++ b/addons/purchase_manual/purchase_manual_view.xml @@ -77,7 +77,7 @@ - + Uninvoiced Purchase Order Lines diff --git a/addons/purchase_tender/purchase_tender_view.xml b/addons/purchase_tender/purchase_tender_view.xml index a91c36a7201..d76de0bee9f 100644 --- a/addons/purchase_tender/purchase_tender_view.xml +++ b/addons/purchase_tender/purchase_tender_view.xml @@ -68,7 +68,7 @@ purchase.tender form - + diff --git a/addons/report_purchase/report_purchase_view.xml b/addons/report_purchase/report_purchase_view.xml index fdfd860461a..e2559b2c539 100644 --- a/addons/report_purchase/report_purchase_view.xml +++ b/addons/report_purchase/report_purchase_view.xml @@ -79,7 +79,7 @@ - + diff --git a/addons/report_sale/report_sale_view.xml b/addons/report_sale/report_sale_view.xml index 8992e889dcd..4a687a88169 100644 --- a/addons/report_sale/report_sale_view.xml +++ b/addons/report_sale/report_sale_view.xml @@ -64,12 +64,12 @@ - - + + + - @@ -151,13 +151,14 @@ + - + - + diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py index 67d797f86cb..8fcf827af68 100644 --- a/addons/report_timesheet/__terp__.py +++ b/addons/report_timesheet/__terp__.py @@ -28,7 +28,7 @@ All Month, Timesheet By User, Timesheet Of Month, Timesheet By Account""", 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['hr_timesheet', 'hr_timesheet_invoice','hr_attendance'], + 'depends': ['hr_timesheet', 'hr_timesheet_invoice'], 'init_xml': [], 'update_xml': ['security/ir.model.access.csv', 'report_timesheet_view.xml'], 'demo_xml': [], diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index df89d65c06f..8902c39595c 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -242,12 +242,13 @@ - - + + + + - diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 42bef7b13d7..e071ced7ae2 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -665,6 +665,11 @@ + + + + + @@ -786,6 +791,11 @@ + + + + + @@ -939,6 +949,11 @@ + + + + + @@ -1094,6 +1109,11 @@ + + + + + @@ -1142,6 +1162,11 @@ + + + + + @@ -1254,6 +1279,13 @@ + + + + + + + @@ -1373,6 +1405,11 @@ + + + + + diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py index b9c74ebbc2d..2a95d144625 100755 --- a/addons/survey/report/survey_analysis_report.py +++ b/addons/survey/report/survey_analysis_report.py @@ -144,13 +144,13 @@ class survey_analysis(report_rml): for col in range(0, len(que.column_heading_ids) + 1): cols_widhts.append(float(300 / (len(que.column_heading_ids) + 1))) colWidths = ",".join(map(tools.ustr, cols_widhts)) - matrix_ans = ['',] + matrix_ans = [(0,'')] for col in que.column_heading_ids: if col.title not in matrix_ans: - matrix_ans.append(col.title) + matrix_ans.append((col.id,col.title)) rml+="""""" - for mat_col in matrix_ans: - rml+="""""" + to_xml(tools.ustr(mat_col)) + """""" + for mat_col in range(0, len(matrix_ans)): + rml+="""""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """""" rml+="""Response Count """ last_col = cols_widhts[-1] @@ -158,13 +158,13 @@ class survey_analysis(report_rml): rml+="""""" + to_xml(tools.ustr(ans.answer)) + """""" cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %d"%(ans.id)) tot_res = cr.fetchone()[0] - cr.execute("select count(id) ,sra.answer from survey_response_answer sra where sra.answer_id = %d group by sra.answer" % ans.id) + cr.execute("select count(id) ,sra.column_id from survey_response_answer sra where sra.answer_id = %d group by sra.column_id" % ans.id) calc_res = cr.dictfetchall() for mat_col in range(1, len(matrix_ans)): percantage = 0 cal_count = 0 for cal in calc_res: - if cal['answer'] == matrix_ans[mat_col]: + if cal['column_id'] == matrix_ans[mat_col][0]: cal_count = cal['count'] if tot_res: percantage = round(float(cal_count)*100 / tot_res,2) @@ -181,7 +181,7 @@ class survey_analysis(report_rml): rml+="""""" + to_xml(tools.ustr(que.comment_label)) + """ """ + tools.ustr(tot_res) + """""" - elif que.type in['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'multiple_textboxes','date_and_time','date']: + elif que.type in['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'multiple_textboxes','date_and_time','date','multiple_textboxes_diff_type']: rml +="""""" rml += """ @@ -234,13 +234,13 @@ class survey_analysis(report_rml): for col in range(0,len(que.column_heading_ids) + 2): cols_widhts.append(float(300 / (len(que.column_heading_ids) + 2))) colWidths = ",".join(map(tools.ustr, cols_widhts)) - matrix_ans = ['',] + matrix_ans = [(0,'')] for col in que.column_heading_ids: if col.title not in matrix_ans: - matrix_ans.append(col.title) + matrix_ans.append((col.id,col.title)) rml+="""""" - for mat_col in matrix_ans: - rml+="""""" + to_xml(tools.ustr(mat_col)) + """""" + for mat_col in range(0,len(matrix_ans)): + rml+="""""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """""" rml+="""Rating Average Response Count """ @@ -250,14 +250,13 @@ class survey_analysis(report_rml): rating_weight_sum = 0 for mat_col in range(1, len(matrix_ans)): cr.execute("select count(sra.answer_id) from survey_response_line sr, survey_response_answer sra\ - where sr.id = sra.response_id and sra.answer_id = %d and sra.answer ='%s'" % (ans.id,matrix_ans[mat_col])) + where sr.id = sra.response_id and sra.answer_id = %d and sra.column_id ='%d'" % (ans.id,matrix_ans[mat_col][0])) tot_res = cr.fetchone()[0] cr.execute("select count(sra.answer_id),sqc.rating_weight from survey_response_line sr, survey_response_answer sra ,\ survey_question_column_heading sqc where sr.id = sra.response_id and \ sqc.question_id = sr.question_id and sra.answer_id = %d and sqc.title ='%s'\ - group by sra.answer_id,sqc.rating_weight" % (ans.id,matrix_ans[mat_col])) + group by sra.answer_id,sqc.rating_weight" % (ans.id,matrix_ans[mat_col][1])) col_weight = cr.fetchone() - if not col_weight: col_weight= (0,0) elif not col_weight[1]: @@ -295,10 +294,10 @@ class survey_analysis(report_rml): rml += """""" + to_xml(tools.ustr(menu)) + """""" rml += """Response Count""" cr.execute("select count(id), sra.answer_id from survey_response_answer sra \ - where sra.answer='%s' group by sra.answer_id " % (column.title)) + where sra.column_id='%s' group by sra.answer_id " % (column.id)) res_count = cr.dictfetchall() - cr.execute("select count(sra.id),sra.value_choice, sra.answer_id, sra.answer from survey_response_answer sra \ - where sra.answer='%s' group by sra.value_choice ,sra.answer_id, sra.answer" % (column.title)) + cr.execute("select count(sra.id),sra.value_choice, sra.answer_id, sra.column_id from survey_response_answer sra \ + where sra.column_id='%s' group by sra.value_choice ,sra.answer_id, sra.column_id" % (column.id)) calc_percantage = cr.dictfetchall() for ans in que.answer_choice_ids: rml+="""""" + to_xml(tools.ustr(ans.answer)) + """""" diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py index a1e07cd0d3a..7192a6faeb3 100644 --- a/addons/survey/report/survey_browse_response.py +++ b/addons/survey/report/survey_browse_response.py @@ -143,12 +143,13 @@ class survey_browse_response(report_rml): response_id = surv_resp_obj.search(cr, uid, [('survey_id','in',ids)]) surv_resp_line_obj = pooler.get_pool(cr.dbname).get('survey.response.line') surv_obj = pooler.get_pool(cr.dbname).get('survey') + surv_ans_obj = pooler.get_pool(cr.dbname).get('survey.answer') for response in surv_resp_obj.browse(cr,uid, response_id): for survey in surv_obj.browse(cr, uid, [response.survey_id.id]): status = "Not Finished" if response.state == "done": status = "Finished" - rml += """ + rml += """ Survey Title @@ -164,7 +165,7 @@ class survey_browse_response(report_rml): - + """ + to_xml(tools.ustr(survey.title)) + """ @@ -239,25 +240,100 @@ class survey_browse_response(report_rml): """ elif que.type in ['multiple_choice_only_one_ans','multiple_choice_multiple_ans']: if len(answer) and answer[0].state == "done": + ans_list = [] for ans in answer[0].response_answer_ids: - rml +=""" - """ + to_xml(tools.ustr(ans.answer_id.answer)) + """ - """ - if que.comment_field_type: - if answer[0].comment: - rml+=""" + ans_list.append(to_xml(tools.ustr(ans.answer_id.answer))) + + answer_choice=[] + _divide_columns_for_matrix = 20 + _display_ans_in_rows = 5 + _tbl_widths = 500 + for ans in que['answer_choice_ids']: + answer_choice.append(to_xml(tools.ustr((ans.answer)))) + + def divide_list(lst, n): + return [lst[i::n] for i in range(n)] + + divide_list = divide_list(answer_choice,_display_ans_in_rows) + for lst in divide_list: + if que.type == 'multiple_choice_multiple_ans': + if len(lst)<>0 and len(lst)<>int(round(float(len(answer_choice))/_display_ans_in_rows,0)): + lst.append('') + if not lst: + del divide_list[divide_list.index(lst):] + for divide in divide_list: + a = _divide_columns_for_matrix*len(divide) + b = float(_tbl_widths) - float(a) + cols_widhts=[] + for div in range(0,len(divide)): + cols_widhts.append(float(a/len(divide))) + cols_widhts.append(float(b/len(divide))) + colWidths = ",".join(map(tools.ustr, cols_widhts)) + rml+=""" + """ + for div in range(0,len(divide)): + if divide[div]!='': + if que.type == 'multiple_choice_multiple_ans': + if divide[div] in ans_list: + rml += """ + + + + + """ + divide[div] + """""" + else: + rml+=""" + + + + + + """ + divide[div] + """""" + else: + if divide[div] in ans_list: + rml += """ + + + + + """ + divide[div] + """""" + else: + rml+=""" + + + + + + """ + divide[div] + """""" + else: + rml+=""" + + """ + rml+="""""" + if que.is_comment_require and answer[0].comment: + rml+=""" """ + to_xml(tools.ustr(answer[0].comment)) + """""" + else: rml +=""" No Response """ - elif que.type in ['multiple_textboxes','date','date_and_time','numerical_textboxes']: + elif que.type in ['multiple_textboxes_diff_type','multiple_textboxes','date','date_and_time','numerical_textboxes','multiple_textboxes_diff_type']: if len(answer) and answer[0].state == "done": + answer_list = {} for ans in answer[0].response_answer_ids: - rml +=""" - """ + to_xml(tools.ustr(ans.answer_id.answer)) + """ - """ + to_xml(tools.ustr(ans.answer)) + """ - """ + answer_list[ans.answer_id.answer] = ans.answer + for que_ans in que['answer_choice_ids']: + if que_ans.answer in answer_list: + rml +=""" + """ + to_xml(tools.ustr(que_ans.answer)) + """ + """ + to_xml(tools.ustr(answer_list[que_ans.answer])) + """ + """ + else: + rml +=""" + """ + to_xml(tools.ustr(que_ans.answer)) + """ + + """ else: rml +=""" No Response @@ -301,16 +377,16 @@ class survey_browse_response(report_rml): i+=1 cols_widhts.append(round(tmp,2)) colWidths = ",".join(map(tools.ustr, cols_widhts)) - matrix_ans = ['',] + matrix_ans = [(0,''),] for col in que.column_heading_ids: if col.title not in matrix_ans: - matrix_ans.append(col.title) + matrix_ans.append((col.id,col.title)) len_matrix = len(matrix_ans) if que.type in ['matrix_of_choices_only_one_ans','rating_scale'] and que.comment_column: matrix_ans.append(que.column_name) rml+="""""" - for mat_col in matrix_ans: - rml+="""""" + to_xml(tools.ustr(mat_col)) + """""" + for mat_col in range(0, len(matrix_ans)): + rml+="""""" + to_xml(tools.ustr(matrix_ans[mat_col][1])) + """""" rml +="""""" rml+="""""" i=0 @@ -326,7 +402,7 @@ class survey_browse_response(report_rml): for mat_col in range(1, len_matrix): value = """""" for res_ans in answer[0].response_answer_ids: - if res_ans.answer_id.id == ans.id and res_ans.answer == matrix_ans[mat_col]: + if res_ans.answer_id.id == ans.id and res_ans.column_id.id == matrix_ans[mat_col][0]: comment_value = to_xml(tools.ustr(res_ans.comment_field)) if que.type in ['matrix_of_drop_down_menus']: value = """""" + to_xml(tools.ustr(res_ans.value_choice)) + """""" diff --git a/addons/survey/report/survey_form.py b/addons/survey/report/survey_form.py index 0cdc9194c2a..84d6de286fb 100644 --- a/addons/survey/report/survey_form.py +++ b/addons/survey/report/survey_form.py @@ -288,16 +288,11 @@ class survey_form(report_rml): else: rml+="""""" + value + """""" rml+= """""" - elif que.type in ['multiple_textboxes','numerical_textboxes', 'date_and_time','date']: + elif que.type in ['multiple_textboxes','numerical_textboxes', 'date_and_time','date','multiple_textboxes_diff_type']: cols_widhts.append(float(_tbl_widths.replace('cm',''))/2) cols_widhts.append(float(_tbl_widths.replace('cm',''))/2) colWidths = "cm,".join(map(tools.ustr, cols_widhts)) colWidths = tools.ustr(colWidths) + 'cm' - rect_len = "" - if que.type in ['multiple_textboxes']: - rect_len = tools.ustr(cols_widhts[0] - 0.3) + "cm" - else: - rect_len = "6cm" for ans in que.answer_choice_ids: rml +=""" @@ -305,7 +300,7 @@ class survey_form(report_rml): """ + to_xml(tools.ustr(ans.answer)) + """ - + @@ -313,14 +308,11 @@ class survey_form(report_rml): elif que.type in ['comment']: cols_widhts.append(float(_tbl_widths.replace('cm',''))) colWidths = "cm,".join(map(tools.ustr, cols_widhts)) - colWidths = colWidths+'cm' - rect_len = "" - rect_len = tools.ustr(cols_widhts[0] - 0.4) + "cm" - rml+=""" + rml+=""" - + @@ -328,13 +320,12 @@ class survey_form(report_rml): elif que.type in ['single_textbox']: cols_widhts.append(float(_tbl_widths.replace('cm',''))) colWidths = "cm,".join(map(tools.ustr, cols_widhts)) - colWidths = colWidths+'cm' rml+=""" - + - + diff --git a/addons/survey/survey.py b/addons/survey/survey.py index 07fa3fcd9f0..808f900dcd4 100644 --- a/addons/survey/survey.py +++ b/addons/survey/survey.py @@ -92,7 +92,10 @@ class survey(osv.osv): def survey_cancel(self, cr, uid, ids, arg): self.write(cr, uid, ids, { 'state' : 'cancel' }) return True - + + def copy(self, cr, uid, id, default=None,context={}): + raise osv.except_osv(_('Error !'),_('You cannot duplicate the resource!')) + survey() class survey_history(osv.osv): @@ -129,7 +132,7 @@ class survey_page(osv.osv): def default_get(self, cr, uid, fields, context={}): data = super(survey_page, self).default_get(cr, uid, fields, context) if context.has_key('line_order') and context['line_order']: - if len(context['line_order'][-1]) > 2 and context['line_order'][-1][2].has_key('sequence'): + if len(context['line_order'][-1]) > 2 and type(context['line_order'][-1][2]) == type({}) and context['line_order'][-1][2].has_key('sequence'): data['sequence'] = context['line_order'][-1][2]['sequence'] + 1 if context.has_key('survey_id'): data['survey_id'] = context['survey_id'] @@ -150,6 +153,9 @@ class survey_page(osv.osv): 'context': context } + def copy(self, cr, uid, id, default=None,context={}): + raise osv.except_osv(_('Error !'),_('You cannot duplicate the resource!')) + survey_page() class survey_question(osv.osv): @@ -194,7 +200,9 @@ class survey_question(osv.osv): ('matrix_of_choices_only_multi_ans','Matrix of Choices (Multiple Answers Per Row)'), ('matrix_of_drop_down_menus','Matrix of Drop-down Menus'), ('rating_scale','Rating Scale'),('single_textbox','Single Textbox'), - ('multiple_textboxes','Multiple Textboxes'),('comment','Comment/Essay Box'), + ('multiple_textboxes','Multiple Textboxes'), + ('multiple_textboxes_diff_type','Multiple Textboxes With Different Type'), + ('comment','Comment/Essay Box'), ('numerical_textboxes','Numerical Textboxes'),('date','Date'), ('date_and_time','Date and Time'),('descriptive_text','Descriptive Text'), ('table','Table'), @@ -238,6 +246,7 @@ class survey_question(osv.osv): 'rating_allow_one_column_require' : fields.boolean('Allow Only One Response per Column (Forced Ranking)'), 'in_visible_rating_weight':fields.boolean('Is Rating Scale Invisible?'), 'in_visible_menu_choice':fields.boolean('Is Menu Choice Invisible?'), + 'in_visible_answer_type':fields.boolean('Is Answer Type Invisible?'), 'comment_column':fields.boolean('Add comment column in matrix'), 'column_name':fields.char('Column Name',size=256), 'no_of_rows' : fields.integer('No of Rows'), @@ -256,17 +265,30 @@ class survey_question(osv.osv): 'validation_valid_err_msg' : lambda * a : 'The comment you entered is in an invalid format.', 'numeric_required_sum_err_msg' : lambda * a :'The choices need to add up to [enter sum here].', 'make_comment_field_err_msg' : lambda * a : 'Please enter a comment.', + 'in_visible_answer_type' : lambda * a: 1 } def on_change_type(self, cr, uid, ids, type, context=None): + val = {} + val['is_require_answer'] = False + val['is_comment_require'] = False + val['is_validation_require'] = False + val['comment_column'] = False + if type in ['multiple_textboxes_diff_type']: + val['in_visible_answer_type'] = False + return {'value': val} if type in ['rating_scale']: - return {'value': {'in_visible_rating_weight':False,'in_visible_menu_choice':True}} + val.update({'in_visible_rating_weight':False,'in_visible_menu_choice':True}) + return {'value': val} elif type in ['matrix_of_drop_down_menus']: - return {'value': {'in_visible_rating_weight':True,'in_visible_menu_choice':False}} + val.update({'in_visible_rating_weight':True,'in_visible_menu_choice':False}) + return {'value': val} elif type in ['single_textbox']: - return {'value': {'in_visible_rating_weight':True,'in_visible_menu_choice':True}} + val.update({'in_visible_rating_weight':True,'in_visible_menu_choice':True}) + return {'value': val} else: - return {'value': {'in_visible_rating_weight':True,'in_visible_menu_choice':True}} + val.update({'in_visible_rating_weight':True,'in_visible_menu_choice':True,'in_visible_answer_type':True}) + return {'value': val} def write(self, cr, uid, ids, vals, context=None): questions = self.read(cr,uid, ids, ['answer_choice_ids', 'type', 'required_type','req_ans', 'minimum_req_ans', 'maximum_req_ans', 'column_heading_ids']) @@ -348,14 +370,14 @@ class survey_question(osv.osv): raise osv.except_osv(_('Error !'),_("You must enter one or more column heading.")) if vals['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time']: if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] in ['at least', 'at most', 'exactly']: - if vals['req_ans'] > len(vals['answer_choice_ids']) or not vals['req_ans']: + if vals.has_key('answer_choice_ids') and vals['req_ans'] > len(vals['answer_choice_ids']) or not vals['req_ans']: raise osv.except_osv(_('Error !'),_("#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1)) if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] == 'a range': minimum_ans = vals['minimum_req_ans'] maximum_ans = vals['maximum_req_ans'] - if vals['minimum_req_ans'] > len(vals['answer_choice_ids']) or not vals['minimum_req_ans']: + if vals.has_key('answer_choice_ids') or vals['minimum_req_ans'] > len(vals['answer_choice_ids']) or not vals['minimum_req_ans']: raise osv.except_osv(_('Error !'),_("Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1)) - if vals['maximum_req_ans'] > len(vals['answer_choice_ids']) or not vals['maximum_req_ans']: + if vals.has_key('answer_choice_ids') or vals['maximum_req_ans'] > len(vals['answer_choice_ids']) or not vals['maximum_req_ans']: raise osv.except_osv(_('Error !'),_("Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1)) if maximum_ans <= minimum_ans: raise osv.except_osv(_('Error !'),_("Maximum Required Answer is greater than Minimum Required Answer")) @@ -386,7 +408,8 @@ class survey_question(osv.osv): def default_get(self, cr, uid, fields, context={}): data = super(survey_question, self).default_get(cr, uid, fields, context) if context.has_key('line_order') and context['line_order']: - if len(context['line_order'][-1]) > 2 and context['line_order'][-1][2].has_key('sequence'): + + if len(context['line_order'][-1]) > 2 and type(context['line_order'][-1][2]) == type({}) and context['line_order'][-1][2].has_key('sequence'): data['sequence'] = context['line_order'][-1][2]['sequence'] + 1 if context.has_key('page_id'): data['page_id']= context['page_id'] @@ -450,21 +473,31 @@ class survey_answer(osv.osv): } return val + def _get_in_visible_answer_type(self,cr, uid, context={}): + if context.get('in_visible_answer_type',False): + return context['in_visible_answer_type'] + return False + _columns = { 'question_id' : fields.many2one('survey.question', 'Question', ondelete='cascade'), 'answer' : fields.char('Answer', size=128, required=1), 'sequence' : fields.integer('Sequence'), 'response' : fields.function(_calc_response_avg, method=True, string="#Response", multi='sums'), 'average' : fields.function(_calc_response_avg, method=True, string="#Avg", multi='sums'), + 'type' : fields.selection([('char','Character'),('date','Date'),('datetime','Date & Time'),('integer','Integer'),('float','Float'),('selection','Selection'),('email','Email Address')], "Type of Answer",required=1), + 'menu_choice' : fields.text('Menu Choices'), + 'in_visible_answer_type':fields.boolean('Is Answer Type Invisible??') } _defaults = { - 'sequence' : lambda * a: 1 + 'sequence' : lambda * a: 1, + 'type' : lambda * a: 'char', + 'in_visible_answer_type':_get_in_visible_answer_type, } def default_get(self, cr, uid, fields, context={}): data = super(survey_answer, self).default_get(cr, uid, fields, context) if context.has_key('line_order') and context['line_order']: - if len(context['line_order'][-1]) > 2 and context['line_order'][-1][2].has_key('sequence'): + if len(context['line_order'][-1]) > 2 and type(context['line_order'][-1][2]) == type({}) and context['line_order'][-1][2].has_key('sequence'): data['sequence'] = context['line_order'][-1][2]['sequence'] + 1 return data @@ -484,6 +517,8 @@ class survey_response(osv.osv): _defaults = { 'state' : lambda * a: "skip", } + def copy(self, cr, uid, id, default=None,context={}): + raise osv.except_osv(_('Error !'),_('You cannot duplicate the resource!')) survey_response() @@ -495,7 +530,7 @@ class survey_response_line(osv.osv): 'response_id' : fields.many2one('survey.response', 'Response', ondelete='cascade'), 'date_create' : fields.datetime('Create Date', required=1), 'state' : fields.selection([('draft', 'Draft'), ('done', 'Answered'),('skip', 'Skiped')], 'Status', readonly=True), - 'question_id' : fields.many2one('survey.question', 'Question', ondelete='cascade'), + 'question_id' : fields.many2one('survey.question', 'Question'), 'page_id' : fields.related('question_id', 'page_id', type='many2one', relation='survey.page', string='Page'), 'response_answer_ids' : fields.one2many('survey.response.answer', 'response_id', 'Response Answer'), 'response_table_ids' : fields.one2many('survey.tbl.column.heading', 'response_table_id', 'Response Answer'), @@ -525,7 +560,7 @@ class survey_tbl_column_heading(osv.osv): _order = 'name' _columns = { 'name' : fields.integer('Row Number'), - 'column_id' : fields.many2one('survey.question.column.heading', 'Column', ondelete='cascade'), + 'column_id' : fields.many2one('survey.question.column.heading', 'Column'), 'value' : fields.char('Value', size = 255), 'response_table_id' : fields.many2one('survey.response.line', 'Response', ondelete='cascade'), } @@ -538,7 +573,8 @@ class survey_response_answer(osv.osv): _rec_name = 'response_id' _columns = { 'response_id' : fields.many2one('survey.response.line', 'Response', ondelete='cascade'), - 'answer_id' : fields.many2one('survey.answer', 'Answer', required=1, ondelete='cascade'), + 'answer_id' : fields.many2one('survey.answer', 'Answer', required=1), + 'column_id' : fields.many2one('survey.question.column.heading','Column'), 'answer' : fields.char('Value', size =255), 'value_choice' : fields.char('Value Choice', size =255), 'comment' : fields.text('Notes'), @@ -677,7 +713,10 @@ class survey_question_wiz(osv.osv_memory): fields = {} pag_rec = page_obj.read(cr, uid, p_id) xml_form = etree.Element('form', {'string': _(tools.ustr(pag_rec['title']))}) - etree.SubElement(xml_form, 'label', {'string': to_xml(tools.ustr(pag_rec['note'] or '')), 'align': '0.0', 'colspan':'4'}) + xml_group = etree.SubElement(xml_form, 'group', {'col': '1', 'colspan': '4'}) + if pag_rec['note']: + for que_test in pag_rec['note'].split('\n'): + etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"}) que_ids = pag_rec['question_ids'] qu_no = 0 for que in que_ids: @@ -727,7 +766,7 @@ class survey_question_wiz(osv.osv_memory): etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_selection_" + tools.ustr(row['id']),'string':to_xml(tools.ustr(row['answer']))}) selection = [('','')] for col in que_col_head.read(cr, uid, que_rec['column_heading_ids']): - selection.append((col['title'], col['title'])) + selection.append((str(col['id']), col['title'])) fields[tools.ustr(que) + "_selection_" + tools.ustr(row['id'])] = {'type':'selection', 'selection' : selection, 'string': "Answer"} if que_rec['comment_column']: fields[tools.ustr(que) + "_commentcolumn_"+tools.ustr(row['id']) + "_field"] = {'type':'char', 'size' : 255, 'string':tools.ustr(que_rec['column_name']), 'views':{}} @@ -740,8 +779,8 @@ class survey_question_wiz(osv.osv_memory): for row in ans_ids: etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(row['answer'])) +' :-', 'align': '0.0'}) for col in que_col_head.read(cr, uid, que_rec['column_heading_ids']): - etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['title']), 'nolabel':"1"}) - fields[tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['title'])] = {'type':'boolean', 'string': col['title']} + etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id']), 'nolabel':"1"}) + fields[tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id'])] = {'type':'boolean', 'string': col['title']} elif que_rec['type'] == 'matrix_of_drop_down_menus': xml_group = etree.SubElement(xml_group, 'group', {'col': str(len(que_rec['column_heading_ids']) + 1), 'colspan': '4'}) etree.SubElement(xml_group, 'separator', {'string': '.','colspan': '1'}) @@ -754,10 +793,10 @@ class survey_question_wiz(osv.osv_memory): if col['menu_choice']: for item in col['menu_choice'].split('\n'): if item and not item.strip() == '': selection.append((item ,item)) - etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['title']),'nolabel':'1'}) - fields[tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['title'])] = {'type':'selection', 'string': col['title'], 'selection':selection} + etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id']),'nolabel':'1'}) + fields[tools.ustr(que) + "_" + tools.ustr(row['id']) + "_" + tools.ustr(col['id'])] = {'type':'selection', 'string': col['title'], 'selection':selection} elif que_rec['type'] == 'multiple_textboxes': - xml_group = etree.SubElement(xml_group, 'group', {'col': '1', 'colspan': '4'}) + xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'}) type = "char" if que_rec['is_validation_require']: if que_rec['validation_type'] in ['must_be_whole_number']: @@ -767,25 +806,25 @@ class survey_question_wiz(osv.osv_memory): elif que_rec['validation_type'] in ['must_be_date']: type = "date" for ans in ans_ids: - etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"}) + etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"}) if type == "char" : fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'char', 'size':255, 'string':ans['answer']} else: fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type': str(type), 'string':ans['answer']} elif que_rec['type'] == 'numerical_textboxes': - xml_group = etree.SubElement(xml_group, 'group', {'col': '2', 'colspan': '2'}) + xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'}) for ans in ans_ids: - etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_numeric"}) + etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_numeric"}) fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_numeric"] = {'type':'integer', 'string':ans['answer']} elif que_rec['type'] == 'date': - xml_group = etree.SubElement(xml_group, 'group', {'col': '2', 'colspan': '2'}) + xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'}) for ans in ans_ids: - etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(ans['id'])}) + etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id'])}) fields[tools.ustr(que) + "_" + tools.ustr(ans['id'])] = {'type':'date', 'string':ans['answer']} elif que_rec['type'] == 'date_and_time': - xml_group = etree.SubElement(xml_group, 'group', {'col': '2', 'colspan': '2'}) + xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'}) for ans in ans_ids: - etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_" + tools.ustr(ans['id'])}) + etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id'])}) fields[tools.ustr(que) + "_" + tools.ustr(ans['id'])] = {'type':'datetime', 'string':ans['answer']} elif que_rec['type'] == 'descriptive_text': for que_test in que_rec['descriptive_text'].split('\n'): @@ -804,6 +843,24 @@ class survey_question_wiz(osv.osv_memory): for col in que_col_head.read(cr, uid, que_rec['column_heading_ids']): etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_table_" + tools.ustr(col['id']) +"_"+ tools.ustr(row), 'nolabel':"1"}) fields[tools.ustr(que) + "_table_" + tools.ustr(col['id']) +"_"+ tools.ustr(row)] = {'type':'char','size':255,'views':{}} + elif que_rec['type'] == 'multiple_textboxes_diff_type': + xml_group = etree.SubElement(xml_group, 'group', {'col': '4', 'colspan': '4'}) + for ans in ans_ids: + if ans['type'] == "email" : + fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'char', 'size':255, 'string':ans['answer']} + etree.SubElement(xml_group, 'field', {'widget':'email','width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"}) + else: + etree.SubElement(xml_group, 'field', {'width':"300",'colspan': '1','name': tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"}) + if ans['type'] == "char" : + fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'char', 'size':255, 'string':ans['answer']} + elif ans['type'] in ['integer','float','date','datetime']: + fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type': str(ans['type']), 'string':ans['answer']} + else: + selection = [] + if ans['menu_choice']: + for item in ans['menu_choice'].split('\n'): + if item and not item.strip() == '': selection.append((item ,item)) + fields[tools.ustr(que) + "_" + tools.ustr(ans['id']) + "_multi"] = {'type':'selection', 'selection' : selection, 'string':ans['answer']} if que_rec['type'] in ['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale'] and que_rec['is_comment_require']: if que_rec['type'] in ['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans'] and que_rec['comment_field_type'] in ['char','text'] and que_rec['make_comment_field']: etree.SubElement(xml_group, 'field', {'name': tools.ustr(que) + "_otherfield", 'colspan':"4"}) @@ -985,7 +1042,7 @@ class survey_question_wiz(osv.osv_memory): continue elif val1 and key1.split('_')[1] == "selection" and key1.split('_')[0] == que_id: if len(key1.split('_')) > 2: - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[-1], 'answer' : val1}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[-1], 'column_id' : val1}) selected_value.append(val1) response_list.append(str(ans_create_id) + "_" + str(key1.split('_')[-1])) else: @@ -997,10 +1054,10 @@ class survey_question_wiz(osv.osv_memory): comment_value = True else: error = False - if que_rec['comment_valid_type'] == 'must_be_specific_length': + if que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_specific_length': if (not val1 and que_rec['comment_minimum_no']) or len(val1) < que_rec['comment_minimum_no'] or len(val1) > que_rec['comment_maximum_no']: error = True - elif que_rec['comment_valid_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: + elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: error = False try: if que_rec['comment_valid_type'] == 'must_be_whole_number': @@ -1017,7 +1074,7 @@ class survey_question_wiz(osv.osv_memory): error = True except: error = True - elif que_rec['comment_valid_type'] == 'must_be_email_address': + elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_email_address': import re if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val1) == None: error = True @@ -1033,10 +1090,10 @@ class survey_question_wiz(osv.osv_memory): select_count += 1 elif val1 and key1.split('_')[0] == que_id and (key1.split('_')[1] == "single" or (len(key1.split('_')) > 2 and key1.split('_')[2] == 'multi')): error = False - if que_rec['validation_type'] == 'must_be_specific_length': + if que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_specific_length': if (not val1 and que_rec['validation_minimum_no']) or len(val1) < que_rec['validation_minimum_no'] or len(val1) > que_rec['validation_maximum_no']: error = True - elif que_rec['validation_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: + elif que_rec['is_validation_require'] and que_rec['validation_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: error = False try: if que_rec['validation_type'] == 'must_be_whole_number': @@ -1053,7 +1110,7 @@ class survey_question_wiz(osv.osv_memory): error = True except: error = True - elif que_rec['validation_type'] == 'must_be_email_address': + elif que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_email_address': import re if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val1) == None: error = True @@ -1068,16 +1125,23 @@ class survey_question_wiz(osv.osv_memory): sur_name_read['store_ans'][resp_id].update({key1:val1}) select_count += 1 elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) > 2 and key1.split('_')[2] == 'numeric': - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'answer' : val1}) - sur_name_read['store_ans'][resp_id].update({key1:val1}) - select_count += 1 - numeric_sum += int(val1) + if not val1=="0": + try: + numeric_sum += int(val1) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'answer' : val1}) + sur_name_read['store_ans'][resp_id].update({key1:val1}) + select_count += 1 + except: + for res in resp_id_list: + sur_name_read['store_ans'].pop(res) + raise osv.except_osv(_('Error !'), _("'" + que_rec['question'] + "' \nPlease enter an integer value " )) + elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) == 3: if type(val1) == type('') or type(val1) == type(u''): - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'answer' : key1.split('_')[2], 'value_choice' : val1}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'column_id' : key1.split('_')[2], 'value_choice' : val1}) sur_name_read['store_ans'][resp_id].update({key1:val1}) else: - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'answer' : key1.split('_')[2]}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':resp_id, 'answer_id':key1.split('_')[1], 'column_id' : key1.split('_')[2]}) sur_name_read['store_ans'][resp_id].update({key1:True}) matrix_list.append(key1.split('_')[0] + '_' + key1.split('_')[1]) select_count += 1 @@ -1106,7 +1170,7 @@ class survey_question_wiz(osv.osv_memory): for res in resp_id_list: sur_name_read['store_ans'].pop(res) raise osv.except_osv(_('Error re !'), _("'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))) - if que_rec['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']: + if que_rec['type'] in ['multiple_textboxes_diff_type', 'multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']: if matrix_list: if (que_rec['required_type'] == 'all' and len(list(set(matrix_list))) < len(que_rec['answer_choice_ids'])) or \ (que_rec['required_type'] == 'at least' and len(list(set(matrix_list))) < que_rec['req_ans']) or \ @@ -1159,7 +1223,7 @@ class survey_question_wiz(osv.osv_memory): continue elif val and key.split('_')[1] == "selection": if len(key.split('_')) > 2: - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':key.split('_')[-1], 'answer' : val}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':key.split('_')[-1], 'column_id' : val}) selected_value.append(val) response_list.append(str(ans_create_id) + "_" + str(key.split('_')[-1])) else: @@ -1172,10 +1236,10 @@ class survey_question_wiz(osv.osv_memory): comment_value = True else: error = False - if que_rec['comment_valid_type'] == 'must_be_specific_length': + if que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_specific_length': if (not val and que_rec['comment_minimum_no']) or len(val) < que_rec['comment_minimum_no'] or len(val) > que_rec['comment_maximum_no']: error = True - elif que_rec['comment_valid_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: + elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: try: if que_rec['comment_valid_type'] == 'must_be_whole_number': value = int(val) @@ -1191,7 +1255,7 @@ class survey_question_wiz(osv.osv_memory): error = True except: error = True - elif que_rec['comment_valid_type'] == 'must_be_email_address': + elif que_rec['is_comment_require'] and que_rec['comment_valid_type'] == 'must_be_email_address': import re if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None: error = True @@ -1205,10 +1269,10 @@ class survey_question_wiz(osv.osv_memory): select_count += 1 elif val and (key.split('_')[1] == "single" or (len(key.split('_')) > 2 and key.split('_')[2] == 'multi')): error = False - if que_rec['validation_type'] == 'must_be_specific_length': + if que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_specific_length': if (not val and que_rec['validation_minimum_no']) or len(val) < que_rec['validation_minimum_no'] or len(val) > que_rec['validation_maximum_no']: error = True - elif que_rec['validation_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: + elif que_rec['is_validation_require'] and que_rec['validation_type'] in ['must_be_whole_number', 'must_be_decimal_number', 'must_be_date']: error = False try: if que_rec['validation_type'] == 'must_be_whole_number': @@ -1225,7 +1289,7 @@ class survey_question_wiz(osv.osv_memory): error = True except Exception ,e: error = True - elif que_rec['validation_type'] == 'must_be_email_address': + elif que_rec['is_validation_require'] and que_rec['validation_type'] == 'must_be_email_address': import re if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None: error = True @@ -1239,18 +1303,23 @@ class survey_question_wiz(osv.osv_memory): sur_name_read['store_ans'][update].update({key:val}) select_count += 1 elif val and len(key.split('_')) > 2 and key.split('_')[2] == 'numeric': - resp_obj.write(cr, uid, update, {'state': 'done'}) - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'answer' : val}) - sur_name_read['store_ans'][update].update({key:val}) - select_count += 1 - numeric_sum += int(val) + if not val=="0": + try: + numeric_sum += int(val) + resp_obj.write(cr, uid, update, {'state': 'done'}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'answer' : val}) + sur_name_read['store_ans'][update].update({key:val}) + select_count += 1 + except: + raise osv.except_osv(_('Error !'), _("'" + que_rec['question'] + "' \n Please enter an integer value " )) + elif val and len(key.split('_')) == 3: resp_obj.write(cr, uid, update, {'state': 'done'}) if type(val) == type('') or type(val) == type(u''): - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'answer' : ans_id_len[2], 'value_choice' : val}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'column_id' : ans_id_len[2], 'value_choice' : val}) sur_name_read['store_ans'][update].update({key:val}) else: - ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'answer' : ans_id_len[2]}) + ans_create_id = res_ans_obj.create(cr, uid, {'response_id':update, 'answer_id':ans_id_len[1], 'column_id' : ans_id_len[2]}) sur_name_read['store_ans'][update].update({key:True}) matrix_list.append(key.split('_')[0] + '_' + key.split('_')[1]) select_count += 1 @@ -1274,7 +1343,7 @@ class survey_question_wiz(osv.osv_memory): raise osv.except_osv(_('Error re !'), _("'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))) if not select_count: resp_obj.write(cr, uid, update, {'state': 'skip'}) - if que_rec['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']: + if que_rec['type'] in ['multiple_textboxes_diff_type','multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']: if matrix_list: if (que_rec['required_type'] == 'all' and len(list(set(matrix_list))) < len(que_rec['answer_choice_ids'])) or \ (que_rec['required_type'] == 'at least' and len(list(set(matrix_list))) < que_rec['req_ans']) or \ diff --git a/addons/survey/survey_demo.xml b/addons/survey/survey_demo.xml index 03ac38d8b74..38784e23ce5 100644 --- a/addons/survey/survey_demo.xml +++ b/addons/survey/survey_demo.xml @@ -23,6 +23,7 @@ 1 1 + 1 @@ -31,39 +32,47 @@ multiple_choice_only_one_ans 1 + 1 + 1 1 - 10 + 1 11 - 50 + 1 51 - 100 + 1 101 - 250 + 1 251 - 500 + 1 501 - 1000 + 1 > 1000 @@ -73,6 +82,7 @@ + 1 Where are you located? multiple_choice_multiple_ans @@ -80,26 +90,31 @@ + 1 Europ + 1 North America + 1 Asia + 1 South America + 1 Australia @@ -111,6 +126,7 @@ + 1 When did you become an OpenERP official partner? multiple_choice_only_one_ans @@ -118,26 +134,31 @@ + 1 in 2009 + 1 in 2008 + 1 in 2007 + 1 in 2006 + 1 before 2006 @@ -147,6 +168,7 @@ + 1 What kind of solutions do you sell to your customers? multiple_choice_multiple_ans @@ -154,16 +176,19 @@ + 1 Integrations without specific developments + 1 Integrations with specific developments + 1 Odoo Saas Offer @@ -177,6 +202,7 @@ + 1 What do you think about the partnership contract? multiple_choice_only_one_ans @@ -184,21 +210,25 @@ + 1 Ambiguous + 1 Not clear enough + 1 Clear + 1 Very Clear @@ -208,6 +238,7 @@ + 1 When do you propose a maintenance contract to your customers? multiple_choice_only_one_ans @@ -218,16 +249,19 @@ True + 1 With each integration + 1 Sometimes + 1 Never... @@ -237,6 +271,7 @@ + 1 Which maintenance contract do you sell to your customers. multiple_choice_only_one_ans @@ -244,16 +279,19 @@ + 1 OpenERP maintenance contract + 1 Your own contract, but you buy an OpenERP one + 1 Your own contract without buying an OpenERP one @@ -269,6 +307,7 @@ + 1 Give your opinion about Launchpad reporting : matrix_of_choices_only_one_ans @@ -276,16 +315,19 @@ + 1 Is Launchpad easy to find in OpenObject website? + 1 Is it easy to report a bug or a blueprint? + 1 Is it easy to add or modify a translation? @@ -315,17 +357,20 @@ 1 + 1 Leads matrix_of_choices_only_one_ans 1 + 1 Is Launchpad easy to find in OpenObject website? + 1 How are the leads that you find thanks to Tiny be converted in customers? @@ -362,6 +407,7 @@ + 1 How is Tiny's communication with partners about... matrix_of_choices_only_one_ans @@ -369,16 +415,19 @@ + 1 Maintenance contracts + 1 Leads + 1 Training sessions @@ -408,12 +457,14 @@ 1 + 1 at least This question requires an answer. + 1 In your opinion, how could Tiny better communicate with partners and on which subjects? comment @@ -437,6 +488,7 @@ + 1 What is your company's name? single_textbox @@ -446,6 +498,7 @@ + 1 What is your company's sector? multiple_choice_multiple_ans @@ -453,96 +506,115 @@ + 1 Agriculture + 1 Bank & Finance + 1 Engineering + 1 Chemical & Pharmaceutical + 1 HR + 1 Construction + 1 Retail + 1 Electronics + 1 Energy + 1 Education + 1 Industry + 1 Logistics + 1 Media & Entertainment + 1 Public & Nonprofit + 1 Services + 1 Healthcare + 1 Telecommunication And ICT + 1 Tourism & Catering + 1 Other sector @@ -554,6 +626,7 @@ + 1 Which activities do you plan to manage with Odoo ? multiple_choice_multiple_ans @@ -561,41 +634,49 @@ + 1 Customer Relationship Management + 1 Accounting & Finance + 1 Inventory Management + 1 Manufacturing + 1 Human Resources + 1 Project Management + 1 Sales & Purchases + 1 Other @@ -607,6 +688,7 @@ + 1 How did you discover Odoo ? multiple_choice_multiple_ans @@ -614,31 +696,37 @@ + 1 OpenERP website + 1 Search Engine + 1 Word of mouth + 1 Trade show + 1 Press + 1 Other @@ -656,6 +744,7 @@ + 1 Why did you subscribe to Odoo? multiple_choice_only_one_ans @@ -663,32 +752,38 @@ + 1 I was already using OpenERP and wanted to switch to an online offer + 1 It's easier and cheaper than maintaining by myself + 1 I am looking for a SaaS offer for my customers + 1 After having tested it, I plan to download and install it by myself for later use + 1 After having tested it, I don't plan to use it + 1 How much time did you spend to configure the application? matrix_of_choices_only_one_ans @@ -696,26 +791,31 @@ + 1 Creating users and access rights + 1 Adding the modules I need + 1 Configuring the modules + 1 Importing my data + 1 Creating the initial data @@ -752,6 +852,7 @@ + 1 Do you plan to continue using Odoo? multiple_choice_only_one_ans @@ -762,11 +863,13 @@ True + 1 Yes + 1 No @@ -781,6 +884,7 @@ + 1 Which interface would you prefer to use? multiple_choice_only_one_ans @@ -788,16 +892,19 @@ + 1 The web interface + 1 The rich interface (GTK or KDE) + 1 Both @@ -807,6 +914,7 @@ + 1 Give your opinion : matrix_of_choices_only_one_ans @@ -814,21 +922,25 @@ + 1 Is Odoo Website appropriately structured? + 1 Are Odoo Website FAQ clear and concise? + 1 Is OpenERP Web Client simple and useful? + 1 Is the Control Center user-friendly? @@ -872,6 +984,7 @@ + 1 What do you think about ... matrix_of_choices_only_one_ans @@ -881,26 +994,31 @@ + 1 Migrating a database to a new version + 1 Browsing and downloading your backups + 1 Duplicating a database + 1 Checking your monthly hours statistics + 1 Creating a support ticket @@ -936,12 +1054,14 @@ 1 + 1 at least This question requires an answer. + 1 In your opinion, which modules are missing in Odoo? Give examples : single_textbox @@ -958,6 +1078,7 @@ + 1 How often would you prefer to receive your prepaid bill? multiple_choice_only_one_ans @@ -965,16 +1086,19 @@ + 1 Monthly + 1 Annually with 20% discount + 1 Every 2 years with 25% discount @@ -984,6 +1108,7 @@ + 1 Do you plan to use the document management system? multiple_choice_only_one_ans @@ -994,11 +1119,13 @@ True + 1 Yes, I plan to use (GB) + 1 No @@ -1008,6 +1135,7 @@ + 1 How satisfied are you with Odoo's support services : matrix_of_choices_only_one_ans @@ -1015,11 +1143,13 @@ + 1 The time between your question and our answer is + 1 The pertinence of our answers is @@ -1061,6 +1191,7 @@ + 1 Give your opinion about Odoo's matrix_of_choices_only_one_ans @@ -1068,16 +1199,19 @@ + 1 Pricing criteria + 1 Pricing understanding + 1 Range of available modules @@ -1119,6 +1253,7 @@ + 1 If you have any additional comments, write them here : comment @@ -1194,6 +1329,7 @@ + 1 @@ -1213,6 +1349,7 @@ + 1 @@ -1232,6 +1369,7 @@ + 1 @@ -1252,6 +1390,7 @@ + 1 @@ -1272,6 +1411,7 @@ + 1 @@ -1291,6 +1431,7 @@ + 1 @@ -1310,6 +1451,7 @@ + 1 @@ -1329,6 +1471,7 @@ + 1 @@ -1348,6 +1491,7 @@ + 1 @@ -1367,6 +1511,7 @@ + 1 @@ -1386,6 +1531,7 @@ + 1 @@ -1406,6 +1552,7 @@ + 1 @@ -1426,6 +1573,7 @@ + 1 @@ -1445,6 +1593,7 @@ + 1 @@ -1592,6 +1741,7 @@ + 1 @@ -1599,6 +1749,7 @@ + 1 @@ -1606,6 +1757,7 @@ + 1 @@ -1613,6 +1765,7 @@ + 1 @@ -1620,6 +1773,7 @@ + 1 @@ -1627,6 +1781,7 @@ + 1 @@ -1634,6 +1789,7 @@ + 1 @@ -1641,6 +1797,7 @@ + 1 @@ -1648,6 +1805,7 @@ + 1 @@ -1655,6 +1813,7 @@ + 1 @@ -1662,6 +1821,7 @@ + 1 @@ -1669,6 +1829,7 @@ + 1 @@ -1676,6 +1837,7 @@ + 1 @@ -1683,6 +1845,7 @@ + 1 @@ -1690,6 +1853,7 @@ + 1 @@ -1697,6 +1861,7 @@ + 1 @@ -1704,6 +1869,7 @@ + 1 @@ -1711,6 +1877,7 @@ + 1 @@ -1718,6 +1885,7 @@ + 1 @@ -1725,6 +1893,7 @@ + 1 @@ -1732,6 +1901,7 @@ + 1 @@ -1739,6 +1909,7 @@ + 1 @@ -1746,6 +1917,7 @@ + 1 @@ -1753,6 +1925,7 @@ + 1 @@ -1760,6 +1933,7 @@ + 1 @@ -1767,6 +1941,7 @@ + 1 @@ -1774,6 +1949,7 @@ + 1 @@ -1781,6 +1957,7 @@ + 1 @@ -1788,6 +1965,7 @@ + 1 @@ -1795,6 +1973,7 @@ + 1 @@ -1802,6 +1981,7 @@ + 1 @@ -1809,6 +1989,7 @@ + 1 @@ -1816,6 +1997,7 @@ + 1 @@ -1823,6 +2005,7 @@ + 1 @@ -1830,6 +2013,7 @@ + 1 @@ -1837,6 +2021,7 @@ + 1 @@ -1844,6 +2029,7 @@ + 1 @@ -1851,6 +2037,7 @@ + 1 @@ -1858,6 +2045,7 @@ + 1 @@ -1865,6 +2053,7 @@ + 1 @@ -1872,6 +2061,7 @@ + 1 @@ -1879,6 +2069,7 @@ + 1 @@ -1886,6 +2077,7 @@ + 1 @@ -1893,6 +2085,7 @@ + 1 @@ -1900,6 +2093,7 @@ + 1 @@ -1907,6 +2101,7 @@ + 1 @@ -1914,6 +2109,7 @@ + 1 @@ -1921,6 +2117,7 @@ + 1 @@ -1928,9 +2125,693 @@ + 1 + + + + + + Community Survey + + draft + + + + + + + + Please take a few minutes to complete this survey on the quality of service we provide. We welcome your feedback and appreciate your honesty. With your help, we hope to strengthen the bond between our clients. + Service Characteristics + + + + + + + Performance Indicator + + + + + + + Client Information + + + + + + + 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. + + Please rank, your criteria for choosing an organization. + char + + + matrix_of_choices_only_one_ans + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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. + + Please rate the following questions. + char + + + matrix_of_choices_only_one_ans + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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. + + How would you prefer for us to provide most communications? + char + + + multiple_choice_only_one_ans + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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 should we improve on (please be specific)? + char + + + comment + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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 do we do well? + char + + + comment + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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 are the most important challenges facing your organization this year? + char + + + comment + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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. + + How can we help you do your job better? + char + + + comment + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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. + + Please provide any additional comments. + char + + + comment + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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. + + Contact information + char + + + multiple_textboxes_diff_type + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + 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. + + How many years have you been a client? + char + + + multiple_choice_only_one_ans + + The comment you entered is in an invalid format. + + + + + at least + Other (please specify) + + + + + + + + Most Important + + + + + + + + Very Important + + + + + + + + Important + + + + + + + + Less Important + + + + + + + + Not Important + + + + + + + + Excellent + + + + + + + + Above Average + + + + + + + + Average + + + + + + + + Below Average + + + + + + + + Poor + + + + + + + + N/A + + + + + + + + Email + + char + + + + + + + The quality of our responses to your questions and concerns. + + char + + + + + + + 0 - 2 years + + char + + + + + + + Name + + char + + + + + + + Industry/marketplace knowledge + + char + + + + + + + Phone + + char + + + + + + + 3 - 5 years + + char + + + + + + + Length of time in business + + char + + + + + + + The timeliness of our Representatives' response to your needs. + + char + + + + + + + Company + + char + + + + + + + The knowledge level of your Representative. + + char + + + + + + + Mail + + char + + + + + + + Phone number + + char + + + + + + + Consultative capabilities + + char + + + + + + + 6 - 10 years + + char + + + + + + + 10 + years + + char + + + + + + + Your Representative keeps you informed of changes. + + char + + + + + + + Face-to-Face + + char + + + + + + + Technology and Tools provided + + char + + + + + + + Email address + + email + + + + + + + Other + + char + + + + + + + Personal Referral + + char + + + + + + + How is our ability to anticipate your needs and provide assistance pro actively. + + char + + + + + + + Lowest rate + + char + + + + + + + Our products and services we provide meet your objectives. + + char + + + + + + + Responsiveness to requests + + char + + + + + + + We are easy to work with. + + char + + + + + + + Value-added services + + char + + + + + + + Overall, how do you rank our services to you. + + char + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml index 5c84eb6d1e4..3536685ea0a 100644 --- a/addons/survey/survey_view.xml +++ b/addons/survey/survey_view.xml @@ -47,12 +47,13 @@ + - + - + @@ -95,7 +96,7 @@ - + @@ -129,12 +130,12 @@ - + - + @@ -306,12 +307,13 @@ - + + - + - + @@ -388,12 +390,12 @@ - + - + @@ -427,6 +429,7 @@ + @@ -500,12 +503,13 @@ + - + - + @@ -582,12 +586,12 @@ - + - + @@ -665,12 +669,13 @@ + - + - + @@ -711,15 +716,16 @@ - - - - - - + + + + + + + @@ -746,12 +752,12 @@ - + - + @@ -805,6 +811,14 @@
+ + + + + + + +
@@ -815,7 +829,7 @@ survey.answer tree - + @@ -939,7 +953,10 @@
@@ -953,6 +970,7 @@ + diff --git a/addons/wiki/__terp__.py b/addons/wiki/__terp__.py index ebb858927f3..cf792be226f 100644 --- a/addons/wiki/__terp__.py +++ b/addons/wiki/__terp__.py @@ -30,7 +30,7 @@ """, 'author': 'Tiny & Axelor', 'website': 'http://openerp.com', - 'depends': ['base','document'], + 'depends': ['base'], 'init_xml': [], 'update_xml': [ 'wiki_view.xml', diff --git a/addons/wiki/wiki_view.xml b/addons/wiki/wiki_view.xml index 10aae9ed92b..2188accd668 100644 --- a/addons/wiki/wiki_view.xml +++ b/addons/wiki/wiki_view.xml @@ -1,12 +1,11 @@ - - - - - - + + + + + --> @@ -169,7 +168,7 @@ {'section':'1'} - +