bzr revid: fp@tinyerp.com-20100128232912-4iwt3pz079s91uvw
This commit is contained in:
Fabien Pinckaers
2010-01-29 00:29:12 +01:00
53 changed files with 3793 additions and 1024 deletions
+22 -12
View File
@@ -27,6 +27,7 @@ from tools.translate import _
import base64
import pooler
import re
import tools
import vobject
# O-1 Optional and can come only once
@@ -84,7 +85,7 @@ def get_attribute_mapping(cr, uid, calname, context={}):
if not res.get('uid', None):
res['uid'] = {}
res['uid']['field'] = 'id'
res[attr]['type'] = "integer"
res['uid']['type'] = "integer"
return res
def map_data(cr, uid, obj):
@@ -170,12 +171,15 @@ class CalDAV(object):
self.__attribute__[name][type] = None
return True
def parse_ics(self, cr, uid, child):
def parse_ics(self, cr, uid, child, cal_children=None, context=None):
att_data = []
for cal_data in child.getChildren():
if cal_data.name.lower() == 'attendee':
ctx = context.copy()
if cal_children:
ctx.update({'model': cal_children[cal_data.name.lower()]})
attendee = self.pool.get('basic.calendar.attendee')
att_data.append(attendee.import_cal(cr, uid, cal_data))
att_data.append(attendee.import_cal(cr, uid, cal_data, context=ctx))
self.ical_set(cal_data.name.lower(), att_data, 'value')
continue
if cal_data.name.lower() == 'valarm':
@@ -230,7 +234,7 @@ class CalDAV(object):
data[map_field][0], vevent, context=context)
elif data[map_field]:
if map_type in ("char", "text"):
vevent.add(field).value = str(data[map_field].encode('utf8'))
vevent.add(field).value = tools.ustr(data[map_field])
elif map_type in ('datetime', 'date') and data[map_field]:
if field in ('exdate'):
vevent.add(field).value = [parser.parse(data[map_field])]
@@ -239,12 +243,12 @@ class CalDAV(object):
elif map_type == "timedelta":
vevent.add(field).value = timedelta(hours=data[map_field])
elif map_type == "many2one":
vevent.add(field).value = (data.get(map_field)[1]).encode('utf8')
vevent.add(field).value = tools.ustr(data.get(map_field)[1])
elif map_type in ("float", "integer"):
vevent.add(field).value = str(data.get(map_field))
elif map_type == "selection":
if not self.ical_get(field, 'mapping'):
vevent.add(field).value = (data[map_field].encode('utf8')).upper()
vevent.add(field).value = (tools.ustr(data[map_field])).upper()
else:
for key1, val1 in self.ical_get(field, 'mapping').items():
if val1 == data[map_field]:
@@ -291,7 +295,7 @@ class CalDAV(object):
res = []
for child in parsedCal.getChildren():
if child.name.lower() in ('vevent', 'vtodo'):
vals = self.parse_ics(cr, uid, child)
vals = self.parse_ics(cr, uid, child, context=context)
else:
vals = {}
continue
@@ -359,7 +363,7 @@ class Calendar(CalDAV, osv.osv):
if child.name.lower() in cal_children:
context.update({'model': cal_children[child.name.lower()]})
self.__attribute__ = get_attribute_mapping(cr, uid, child.name.lower(), context=context)
val = self.parse_ics(cr, uid, child)
val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context)
obj = self.pool.get(cal_children[child.name.lower()])
if hasattr(obj, 'check_import'):
obj.check_import(cr, uid, [val], context=context)
@@ -638,7 +642,10 @@ class Attendee(CalDAV, osv.osv_memory):
'language': None, # Use: 0-1 Specify the language for text values in a property or property parameter.
}
def import_cal(self, cr, uid, ical_data):
def import_cal(self, cr, uid, ical_data, context=None):
ctx = context.copy()
ctx.update({'model': context.get('model', None)})
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, ctx)
for para in ical_data.params:
if para.lower() == 'cn':
self.ical_set(para.lower(), ical_data.params[para][0]+':'+ \
@@ -652,7 +659,9 @@ class Attendee(CalDAV, osv.osv_memory):
def export_cal(self, cr, uid, model, attendee_ids, vevent, context={}):
attendee_object = self.pool.get(model)
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, context)
ctx = context.copy()
ctx.update({'model': model})
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, ctx)
for attendee in attendee_object.read(cr, uid, attendee_ids, []):
attendee_add = vevent.add('attendee')
cn_val = ''
@@ -662,9 +671,10 @@ class Attendee(CalDAV, osv.osv_memory):
attendee_add.params[a_key] = [str(attendee[a_val['field']])]
elif a_val['type'] == 'boolean':
attendee_add.params[a_key] = [str(attendee[a_val['field']])]
if a_val['field'] == 'cn':
if a_val['field'] == 'cn' and attendee[a_val['field']]:
cn_val = [str(attendee[a_val['field']])]
attendee_add.params['CN'] = cn_val
if cn_val:
attendee_add.params['CN'] = cn_val
return vevent
Attendee()
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_merge
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_merge
+9
View File
@@ -215,6 +215,15 @@ request was delegated to"),
def do_decline(self, cr, uid, ids, context=None, *args):
self.write(cr, uid, ids, {'state': 'declined'}, context)
def create(self, cr, uid, vals, context={}):
if not vals.get("email") and vals.get("cn"):
cnval = vals.get("cn").split(':')
email = filter(lambda x:x.__contains__('@'), cnval)
vals['email'] = email[0]
vals['cn'] = vals.get("cn")
res = super(calendar_attendee, self).create(cr, uid, vals, context)
return res
calendar_attendee()
class res_alarm(osv.osv):
+4
View File
@@ -260,5 +260,9 @@
<field name="target">new</field>
</record>
<menuitem id="menu_attendee_invitations"
name="My Invitations" parent="base_calendar.menu_calendar_configuration"
sequence="10" action="action_view_attendee_form" />
</data>
</openerp>
+399 -176
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -733,8 +733,10 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">document.change.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_document_change_report_graph"/>
</record>
<record id="board_document_change_form" model="ir.ui.view">
<field name="name">board.document.change.form</field>
<field name="model">board.board</field>
+31
View File
@@ -0,0 +1,31 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-05-30 15:14+0000\n"
"PO-Revision-Date: 2010-01-27 14:26+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_webdav_old
#: model:ir.module.module,description:document_webdav_old.module_meta_information
msgid ""
"This is a complete document management system:\n"
"\t* WebDav Interface\n"
"\t* User Authentification\n"
"\t* Document Indexation\n"
msgstr ""
"To je popolni sistem za upravljanje dokumentov:\n"
"\t* vmesnik WebDav \n"
"\t* Avtentikacija uporabnikov\n"
"\t* Indeksacija dokumentov\n"
+11 -11
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-06 18:01+0000\n"
"Last-Translator: Kuvaly <kuvaly@seznam.cz>\n"
"PO-Revision-Date: 2010-01-27 14:55+0000\n"
"Last-Translator: Kuvaly [LCT] <kuvaly@seznam.cz>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-12-16 05:07+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: event
@@ -145,7 +145,7 @@ msgstr "Registrace"
#: field:event.type,name:0
#: model:ir.model,name:event.model_event_type
msgid "Event type"
msgstr ""
msgstr "Typ události"
#. module: event
#: view:event.event:0
@@ -158,7 +158,7 @@ msgstr "Událost"
#. module: event
#: selection:event.event,state:0
msgid "Confirmed"
msgstr ""
msgstr "Potvrzeno"
#. module: event
#: wizard_view:event.confirm_registration,split:0
@@ -205,7 +205,7 @@ msgstr "Všechny události"
#. module: event
#: model:ir.ui.menu,name:event.menu_report_event
msgid "Reporting"
msgstr ""
msgstr "Hlášení"
#. module: event
#: view:event.registration:0
@@ -215,7 +215,7 @@ msgstr "Ukončit registraci"
#. module: event
#: model:ir.ui.menu,name:event.menu_action_event_categories
msgid "Events by Categories"
msgstr ""
msgstr "Události dle kategorií"
#. module: event
#: wizard_view:event.confirm_registration,split:0
@@ -230,7 +230,7 @@ msgstr ""
#. module: event
#: view:event.registration:0
msgid "References"
msgstr ""
msgstr "Reference"
#. module: event
#: model:ir.actions.act_window,name:event.action_event_type_registration
@@ -351,7 +351,7 @@ msgstr "Statistiky"
#. module: event
#: selection:event.event,state:0
msgid "Draft"
msgstr ""
msgstr "Koncept"
#. module: event
#: view:event.event:0
@@ -397,7 +397,7 @@ msgstr "Status"
#. module: event
#: model:ir.actions.act_window,name:event.action_event_categories
msgid "Events by section"
msgstr ""
msgstr "Události dle sekce"
#. module: event
#: model:ir.ui.menu,name:event.menu_action_registration
@@ -482,7 +482,7 @@ msgstr "Ukončení"
#. module: event
#: wizard_button:event.reg_make_invoice,init,open:0
msgid "Open"
msgstr ""
msgstr "Otevřít"
#. module: event
#: field:event.registration,badge_title:0
+5 -5
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 07:01+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-27 14:46+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-12-16 05:17+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_timesheet_invoice
@@ -136,12 +136,12 @@ msgstr "Končni račun"
#. module: hr_timesheet_invoice
#: wizard_view:hr.timesheet.final.invoice.create,init:0
msgid "Do you want details for each line of the invoices ?"
msgstr ""
msgstr "Ali želite podrobnosti o vsaki poziciji računa?"
#. module: hr_timesheet_invoice
#: rml:hr.timesheet.invoice.account.analytic.account.cost_ledger:0
msgid "Date or Code"
msgstr ""
msgstr "Datum ali šifra"
#. module: hr_timesheet_invoice
#: model:ir.actions.act_window,name:hr_timesheet_invoice.action_hr_analytic_timesheet_open_tree
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
+1 -1
View File
@@ -14,7 +14,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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
File diff suppressed because it is too large Load Diff
+34
View File
@@ -0,0 +1,34 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
"PO-Revision-Date: 2010-01-27 14:20+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_crm
#: model:ir.module.module,description:olap_crm.module_meta_information
msgid ""
"\n"
" Sale module will load the data in olap tables\n"
" "
msgstr ""
"\n"
" Modul Prodaja bo naložil podatke v tabele OLAP\n"
" "
#. module: olap_crm
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
msgid "olap_crm"
msgstr "olap_crm"
+56
View File
@@ -0,0 +1,56 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
"PO-Revision-Date: 2010-01-27 14:21+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_extract
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
msgid "olap_extract"
msgstr "olap_extract"
#. module: olap_extract
#: wizard_button:olap.extract.schema,init,ok:0
msgid "OK"
msgstr "V redu"
#. module: olap_extract
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
msgid "Olap Extract"
msgstr ""
#. module: olap_extract
#: model:ir.module.module,description:olap_extract.module_meta_information
msgid ""
"\n"
" Extracts the schema structure.\n"
" "
msgstr ""
#. module: olap_extract
#: wizard_field:olap.extract.schema,init,module_name:0
msgid "Module Name"
msgstr "Ime modula"
#. module: olap_extract
#: wizard_button:olap.extract.schema,init,end:0
msgid "Cancel"
msgstr "Prekliči"
#. module: olap_extract
#: wizard_view:olap.extract.schema,init:0
msgid "New Module Name"
msgstr "Novo ime modula"
+34
View File
@@ -0,0 +1,34 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
"PO-Revision-Date: 2010-01-27 14:22+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_sale
#: model:ir.module.module,description:olap_sale.module_meta_information
msgid ""
"\n"
" Sale module will load the data in olap tables\n"
" "
msgstr ""
"\n"
" Modul Prodaja bo naložil podatke v tabele OLAP\n"
" "
#. module: olap_sale
#: model:ir.module.module,shortdesc:olap_sale.module_meta_information
msgid "olap_sale"
msgstr "olap_sale"
+6 -6
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-10 21:50+0000\n"
"PO-Revision-Date: 2010-01-27 14:28+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2009-12-16 05:07+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: point_of_sale
@@ -340,7 +340,7 @@ msgstr "Datum plačila"
#. module: point_of_sale
#: wizard_field:pos.payment,ask_pay,payment_name:0
msgid "Payment name"
msgstr ""
msgstr "Ime plačila"
#. module: point_of_sale
#: field:pos.order,lines:0
@@ -427,7 +427,7 @@ msgstr "Dnevne POS postavke"
#. module: point_of_sale
#: field:pos.order,nb_print:0
msgid "Number of Print"
msgstr ""
msgstr "Številka izpisa"
#. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_wizard_default_journal
@@ -581,7 +581,7 @@ msgstr "Datum plačila"
#. module: point_of_sale
#: field:pos.payment,payment_name:0
msgid "Payment Name"
msgstr ""
msgstr "Ime plačila"
#. module: point_of_sale
#: rml:pos.details:0
@@ -844,7 +844,7 @@ msgstr "Tel.:"
#. module: point_of_sale
#: field:pos.payment,payment_nb:0
msgid "Piece Number"
msgstr ""
msgstr "Številka dela"
#. module: point_of_sale
#: wizard_field:pos.config.journal,init,default_journal_gift:0
+1 -1
View File
@@ -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-01-27 04:45+0000\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: purchase
+695
View File
@@ -0,0 +1,695 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 06:01+0000\n"
"PO-Revision-Date: 2010-01-27 14:22+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: survey
#: model:ir.ui.menu,name:survey.menu_survey_form
msgid "Surveys"
msgstr "Ankete"
#. module: survey
#: model:ir.actions.report.xml,name:survey.survey
msgid "Survey Analysis Report"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.act_survey_page_question
#: model:ir.ui.menu,name:survey.menu_survey_question_form1
msgid "Survey Questions"
msgstr ""
#. module: survey
#: view:survey:0
#: view:survey.response:0
msgid "Set to draft"
msgstr ""
#. module: survey
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: survey
#: field:survey.history,date:0
msgid "Date started"
msgstr ""
#. module: survey
#: field:survey,history:0
msgid "History Lines"
msgstr ""
#. module: survey
#: wizard_field:wizard.send.invitation,init,mail:0
msgid "Body"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_view_survey_name
#: model:ir.ui.menu,name:survey.menu_run_survey_form
msgid "Give Survey Response"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.act_survey_question
msgid "All Questions"
msgstr ""
#. module: survey
#: field:survey,date_open:0
msgid "Survey Open Date"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey_name_wiz
msgid "survey.name.wiz"
msgstr ""
#. module: survey
#: view:survey:0
msgid "Users Details"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_view_survey_question_message
#: model:ir.model,name:survey.model_survey_question
#: view:survey:0
#: view:survey.page:0
#: view:survey.question:0
msgid "Survey Question"
msgstr ""
#. module: survey
#: help:survey,response_user:0
msgid "Set to one if you require only one response per user"
msgstr ""
#. module: survey
#: field:survey.page,title:0
msgid "Page Title"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey_history
msgid "Survey History"
msgstr ""
#. module: survey
#: field:survey.response,comment:0
#: field:survey.response.answer,comment:0
msgid "Notes"
msgstr ""
#. module: survey
#: field:survey.question,tot_resp:0
msgid "Total Response"
msgstr ""
#. module: survey
#: view:survey.question.wiz:0
msgid "Your Messages"
msgstr ""
#. module: survey
#: selection:survey,state:0
msgid "Cancelled"
msgstr ""
#. module: survey
#: field:survey.question,allow_comment:0
msgid "Allow Comment Field"
msgstr ""
#. module: survey
#: code:addons/survey/survey.py:0
#, python-format
msgid "Warning !"
msgstr ""
#. module: survey
#: wizard_view:wizard.send.invitation,init:0
#: wizard_field:wizard.send.invitation,init,send_mail_existing:0
msgid "Send reminder for existing user"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_new_survey_question_form
#: model:ir.ui.menu,name:survey.menu_new_survey_question_form1
msgid "New Survey Question"
msgstr ""
#. module: survey
#: view:survey.response:0
msgid "Skip"
msgstr ""
#. module: survey
#: wizard_field:wizard.send.invitation,init,partner_ids:0
msgid "Partner"
msgstr ""
#. module: survey
#: wizard_field:wizard.send.invitation,init,mail_subject:0
#: wizard_field:wizard.send.invitation,init,mail_subject_existing:0
msgid "Subject"
msgstr ""
#. module: survey
#: field:survey,max_response_limit:0
msgid "Maximum Response Limit"
msgstr ""
#. module: survey
#: wizard_field:wizard.send.invitation,init,mail_from:0
msgid "From"
msgstr ""
#. module: survey
#: field:survey.response,response_type:0
msgid "Response Type"
msgstr ""
#. module: survey
#: field:survey.name.wiz,transfer:0
msgid "Page Transfer"
msgstr ""
#. module: survey
#: field:survey.answer,question_id:0
#: field:survey.page,question_ids:0
#: field:survey.question,question:0
#: field:survey.response,question_id:0
msgid "Question"
msgstr ""
#. module: survey
#: wizard_button:wizard.send.invitation,init,send:0
msgid "Send"
msgstr ""
#. module: survey
#: field:survey.answer,response:0
msgid "#Response"
msgstr ""
#. module: survey
#: field:survey.response,response_answer_ids:0
msgid "Response Answer"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Response Summary"
msgstr ""
#. module: survey
#: wizard_view:wizard.send.invitation,init:0
#: wizard_field:wizard.send.invitation,init,send_mail:0
msgid "Send mail for new user"
msgstr ""
#. module: survey
#: code:addons/survey/survey.py:0
#, python-format
msgid "Error !"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Skipped Question"
msgstr ""
#. module: survey
#: wizard_button:wizard.send.invitation,send,end:0
msgid "_Ok"
msgstr ""
#. module: survey
#: selection:survey.response,response_type:0
msgid "Link"
msgstr ""
#. module: survey
#: model:ir.ui.menu,name:survey.menu_survey_config
msgid "Configuration"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey_question_wiz
msgid "survey.question.wiz"
msgstr ""
#. module: survey
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey_response_answer
#: view:survey.response.answer:0
msgid "Survey Response Answer"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Page :-"
msgstr ""
#. module: survey
#: field:survey,response_user:0
msgid "Maximum Response per User"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Total Started Survey :-"
msgstr ""
#. module: survey
#: view:survey.response:0
msgid "Comment"
msgstr ""
#. module: survey
#: field:survey.response,date_modify:0
msgid "Modify Date"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Answered Question"
msgstr ""
#. module: survey
#: code:addons/survey/survey.py:0
#, python-format
msgid "You can not give response for this survey more than %s times"
msgstr ""
#. module: survey
#: selection:survey.response,response_type:0
msgid "Manually"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_survey_form1
msgid "All Surveys"
msgstr ""
#. module: survey
#: view:survey:0
#: field:survey,users:0
msgid "Users"
msgstr ""
#. module: survey
#: wizard_view:wizard.send.invitation,init:0
msgid "Message"
msgstr ""
#. module: survey
#: field:survey.name.wiz,page_no:0
msgid "Page Number"
msgstr ""
#. module: survey
#: wizard_field:wizard.send.invitation,send,note:0
msgid "Log"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_survey_question_form
msgid "All Survey Questions"
msgstr ""
#. module: survey
#: field:survey,date_close:0
msgid "Survey Close Date"
msgstr ""
#. module: survey
#: view:survey.name.wiz:0
msgid "Start"
msgstr ""
#. module: survey
#: selection:survey,state:0
#: selection:survey.response,state:0
msgid "Draft"
msgstr ""
#. module: survey
#: selection:survey,state:0
msgid "Closed"
msgstr ""
#. module: survey
#: view:survey:0
#: field:survey.answer,answer:0
#: view:survey.page:0
#: view:survey.question:0
#: field:survey.question,answer_choice_ids:0
#: field:survey.response.answer,answer_id:0
msgid "Answer"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_survey_page_form
msgid "All Survey Pages"
msgstr ""
#. module: survey
#: field:survey.name.wiz,store_ans:0
msgid "Store Answer"
msgstr ""
#. module: survey
#: field:survey,state:0
#: field:survey.response,state:0
msgid "Status"
msgstr ""
#. module: survey
#: model:ir.module.module,shortdesc:survey.module_meta_information
msgid "Survey Module"
msgstr ""
#. module: survey
#: model:ir.module.module,description:survey.module_meta_information
msgid ""
"\n"
" This module is used for surveing. It depends on the answers or reviews "
"of some questions by different users.\n"
" A survey may have multiple pages. Each page may contain multiple "
"questions and each question may have multiple answers.\n"
" Different users may give different answers of question and according to "
"that survey is done. \n"
" Partners are also sent mails with user name and password for the "
"invitation of the survey\n"
" "
msgstr ""
#. module: survey
#: view:survey:0
#: view:survey.name.wiz:0
msgid "Survey Details"
msgstr ""
#. module: survey
#: field:survey.question,is_require_answer:0
msgid "Required Answer"
msgstr ""
#. module: survey
#: field:survey.history,user_id:0
#: field:survey.response,response_id:0
msgid "User"
msgstr ""
#. module: survey
#: field:res.users,survey_id:0
msgid "Groups"
msgstr ""
#. module: survey
#: view:survey:0
#: view:survey.page:0
#: view:survey.question:0
#: field:survey.question,response_ids:0
#: view:survey.response:0
#: field:survey.response.answer,response_id:0
msgid "Response"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_new_survey_form1
#: model:ir.ui.menu,name:survey.menu_new_survey_form
msgid "New Survey"
msgstr ""
#. module: survey
#: model:ir.ui.menu,name:survey.main_menu_survey
msgid "Survey Management"
msgstr ""
#. module: survey
#: selection:survey.response,state:0
msgid "Skiped"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey_answer
#: view:survey.answer:0
msgid "Survey Answer"
msgstr ""
#. module: survey
#: code:addons/survey/wizard/wizard_survey.py:0
#, python-format
msgid "Attention!"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey
#: view:res.users:0
#: view:survey:0
#: field:survey.history,survey_id:0
#: view:survey.name.wiz:0
#: field:survey.name.wiz,survey_id:0
#: field:survey.page,survey_id:0
#: field:survey.question,survey:0
msgid "Survey"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Total Completed Survey :-"
msgstr ""
#. module: survey
#: view:survey:0
msgid "History"
msgstr ""
#. module: survey
#: view:survey:0
#: view:survey.answer:0
#: view:survey.page:0
#: view:survey.question:0
msgid "Seq"
msgstr ""
#. module: survey
#: field:survey,tot_comp_survey:0
msgid "Total Completed Survey"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Response Percentage"
msgstr ""
#. module: survey
#: field:survey.question.wiz,name:0
msgid "Number"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Survey Title :-"
msgstr ""
#. module: survey
#: view:survey.response:0
msgid "Done"
msgstr ""
#. module: survey
#: code:addons/survey/survey.py:0
#, python-format
msgid "'\" + que_rec[0]['question'] + \"' This question requires an answer."
msgstr ""
#. module: survey
#: view:survey:0
#: view:survey.name.wiz:0
#: wizard_button:wizard.send.invitation,init,end:0
msgid "Cancel"
msgstr ""
#. module: survey
#: view:survey:0
msgid "Close"
msgstr ""
#. module: survey
#: view:survey:0
#: selection:survey,state:0
msgid "Open"
msgstr ""
#. module: survey
#: field:survey,tot_start_survey:0
msgid "Total Started Survey"
msgstr ""
#. module: survey
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: survey
#: model:ir.model,name:survey.model_survey_response
#: view:survey.response:0
msgid "Survey Response"
msgstr ""
#. module: survey
#: field:survey.answer,average:0
msgid "#Avg"
msgstr ""
#. module: survey
#: field:survey,responsible_id:0
msgid "Responsible"
msgstr ""
#. module: survey
#: selection:survey.response,state:0
msgid "Answered"
msgstr ""
#. module: survey
#: view:survey:0
msgid "Other"
msgstr ""
#. module: survey
#: model:ir.actions.wizard,name:survey.wizard_send_invitation
#: wizard_view:wizard.send.invitation,init:0
msgid "Send Invitation"
msgstr ""
#. module: survey
#: field:survey,title:0
msgid "Survey Title"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "%"
msgstr ""
#. module: survey
#: view:survey:0
#: field:survey,note:0
#: field:survey.name.wiz,note:0
#: view:survey.page:0
#: field:survey.page,note:0
#: view:survey.response:0
msgid "Description"
msgstr ""
#. module: survey
#: view:survey.name.wiz:0
msgid "Select Survey"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.action_new_survey_page_form
#: model:ir.ui.menu,name:survey.menu_new_survey_page_form1
msgid "New Survey Page"
msgstr ""
#. module: survey
#: view:survey:0
#: view:survey.page:0
#: field:survey.question,page_id:0
msgid "Survey Page"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.act_survey_answer
msgid "Survey Answers"
msgstr ""
#. module: survey
#: view:survey.page:0
msgid "#Questions"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Que:"
msgstr ""
#. module: survey
#: field:survey,page_ids:0
msgid "Page"
msgstr ""
#. module: survey
#: wizard_view:wizard.send.invitation,send:0
msgid "User creation"
msgstr ""
#. module: survey
#: field:survey.answer,sequence:0
#: field:survey.page,sequence:0
#: field:survey.question,sequence:0
msgid "Sequence"
msgstr ""
#. module: survey
#: wizard_view:wizard.send.invitation,send:0
msgid "Results :"
msgstr ""
#. module: survey
#: code:addons/survey/wizard/wizard_survey.py:0
#, python-format
msgid "%sSurvey is not in open state"
msgstr ""
#. module: survey
#: wizard_view:wizard.send.invitation,init:0
msgid "Select Partner"
msgstr ""
#. module: survey
#: field:survey.response,date_create:0
msgid "Create Date"
msgstr ""
#. module: survey
#: model:ir.actions.act_window,name:survey.act_survey_pages
#: model:ir.model,name:survey.model_survey_page
#: model:ir.ui.menu,name:survey.menu_survey_page_form1
msgid "Survey Pages"
msgstr ""
#. module: survey
#: rml:survey_analysis_report:0
msgid "Response Count"
msgstr ""
#. module: survey
#: field:survey.name.wiz,page:0
msgid "Page Position"
msgstr ""
@@ -100,10 +100,6 @@ class survey_analysis(report_rml):
</para>"""
surv_obj = pooler.get_pool(cr.dbname).get('survey')
for survey in surv_obj.browse(cr, uid, ids):
if survey.question_prefix:
prefix = survey.question_prefix + " : "
else:
prefix = ''
rml += """<blockTable colWidths="280.0,100.0,120.0" style="Table_heading">
<tr>
<td>
@@ -139,7 +135,7 @@ class survey_analysis(report_rml):
for que in page.question_ids:
rml +="""<blockTable colWidths="500" style="Table5">
<tr>
<td><para style="question">""" + to_xml(tools.ustr(prefix)) + to_xml(tools.ustr(que.question)) + """</para></td>
<td><para style="question">Que : """ + to_xml(tools.ustr(que.question)) + """</para></td>
</tr>
</blockTable>"""
cols_widhts = []
@@ -179,7 +175,7 @@ class survey_analysis(report_rml):
rml+="""<td><para style="response">""" + tools.ustr(tot_res) + """</para></td>
</tr>"""
rml+="""</blockTable>"""
if que.comment_field_type:
if que.is_comment_require:
cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
tot_res = cr.fetchone()[0]
rml+="""<blockTable colWidths=" """+ str(500 - last_col) +"," + str(last_col) + """ " style="Table1"><tr><td><para style="answer_right">""" + to_xml(tools.ustr(que.comment_label)) + """</para></td>
@@ -197,7 +193,7 @@ class survey_analysis(report_rml):
<td><para style="answer">""" + tools.ustr(ans.average) + """%</para></td>
<td><para style="answer">""" + tools.ustr(ans.response) + """</para></td></tr>"""
rml+="""</blockTable>"""
if que.comment_field_type:
if que.is_comment_require:
if que.make_comment_field:
cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
tot_res = cr.fetchone()[0]
@@ -300,7 +296,7 @@ class survey_analysis(report_rml):
where sra.answer='%s' group by sra.value_choice ,sra.answer_id, sra.answer" % (column.title))
calc_percantage = cr.dictfetchall()
for ans in que.answer_choice_ids:
rml+="""<tr><td><para style="answer_right">""" + tto_xml(tools.ustr(ans.answer)) + """</para></td>"""
rml+="""<tr><td><para style="answer_right">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
for mat_col in range(0, len(menu_choices)):
calc = 0
response = 0
+216 -209
View File
@@ -131,224 +131,231 @@ class survey_browse_response(report_rml):
</para>
"""
surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response')
if datas.has_key('form') and datas['form'].has_key('response_ids'):
response_id = datas['form']['response_ids'][0][2]
elif context.has_key('response_id'):
response_id = [int(context['response_id'])]
else:
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')
for id in ids:
for survey in surv_obj.browse(cr, uid, [id]):
if context.has_key('response_id'):
s_id = [int(context['response_id'])]
else:
s_id = surv_resp_obj.search(cr,uid, [('survey_id','=',[survey.id])])
for response in surv_resp_obj.browse(cr,uid,s_id): #surv_resp_obj.search(cr,uid, [('survey_id','=',ids[0])])
if survey.question_prefix:
prefix = survey.question_prefix + " : "
else:
prefix = ''
rml += """<blockTable colWidths="230.0,150.0,120.0" style="Table_heading">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Survey Title </para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Response Create Date </para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Respose By </para>
</td>
</tr>
</blockTable>
<blockTable colWidths="230.0,150.0,120.0" style="Table_head_2">
<tr>
<td>
<para style="terp_default_Centre_8">""" + to_xml(tools.ustr(survey.title)) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + to_xml(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + to_xml(response.user_id.name) + """</para>
</td>
</tr>
</blockTable>"""
for page in survey.page_ids:
for response in surv_resp_obj.browse(cr,uid, response_id):
for survey in surv_obj.browse(cr, uid, [response.survey_id.id]):
status = "Skip"
if response.state == "done":
status = "Complete"
rml += """<blockTable colWidths="230.0,120.0,100.0,50" style="Table_heading">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Survey Title </para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Response Create Date </para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Respose By </para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Status</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="230.0,120.0,100.0,50" style="Table_head_2">
<tr>
<td>
<para style="terp_default_Centre_8">""" + to_xml(tools.ustr(survey.title)) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + to_xml(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + to_xml(response.user_id.name) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + status + """</para>
</td>
</tr>
</blockTable>"""
for page in survey.page_ids:
rml += """<para style="P2"></para>
<blockTable colWidths="500" style="Table4">
<tr>
<td><para style="page">Page :- """ + to_xml(tools.ustr(page.title)) + """</para></td>
</tr>
</blockTable>"""
for que in page.question_ids:
rml += """<para style="P2"></para>
<blockTable colWidths="500" style="Table4">
<tr>
<td><para style="page">Page :- """ + to_xml(tools.ustr(page.title)) + """</para></td>
</tr>
</blockTable>"""
for que in page.question_ids:
rml += """<para style="P2"></para>
<blockTable colWidths="500" style="Table5">
<tr>
<td><para style="question">""" + to_xml(tools.ustr(prefix)) + to_xml(to_xml(que.question)) + """</para></td>
</tr>
</blockTable>"""
answer = surv_resp_line_obj.browse(cr,uid, surv_resp_line_obj.search(cr, uid, [('question_id','=',que.id),('response_id','=',response.id)]))
if que.type in ['descriptive_text']:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(que.descriptive_text)) + """</para></td> </tr>
</blockTable>"""
elif que.type in ['table']:
if len(answer) and answer[0].state == "done":
col_heading = pooler.get_pool(cr.dbname).get('survey.tbl.column.heading')
cols_widhts = []
for col in range(0, len(que.column_heading_ids)):
cols_widhts.append(float(500 / (len(que.column_heading_ids))))
colWidths = ",".join(map(tools.ustr, cols_widhts))
matrix_ans = []
rml +="""<para style="P2"></para><blockTable colWidths=" """ + str(colWidths) + """ " style="Table41"><tr>"""
for col in que.column_heading_ids:
if col.title not in matrix_ans:
matrix_ans.append(col.title)
rml +="""<td> <para style="terp_tblheader_Details">""" + to_xml(tools.ustr(col.title)) +"""</para></td>"""
<blockTable colWidths="500" style="Table5">
<tr>
<td><para style="question">Que : """ + to_xml(to_xml(que.question)) + """</para></td>
</tr>
</blockTable>"""
answer = surv_resp_line_obj.browse(cr,uid, surv_resp_line_obj.search(cr, uid, [('question_id','=',que.id),('response_id','=',response.id)]))
if que.type in ['descriptive_text']:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(que.descriptive_text)) + """</para></td> </tr>
</blockTable>"""
elif que.type in ['table']:
if len(answer) and answer[0].state == "done":
col_heading = pooler.get_pool(cr.dbname).get('survey.tbl.column.heading')
cols_widhts = []
for col in range(0, len(que.column_heading_ids)):
cols_widhts.append(float(500 / (len(que.column_heading_ids))))
colWidths = ",".join(map(tools.ustr, cols_widhts))
matrix_ans = []
rml +="""<para style="P2"></para><blockTable colWidths=" """ + str(colWidths) + """ " style="Table41"><tr>"""
for col in que.column_heading_ids:
if col.title not in matrix_ans:
matrix_ans.append(col.title)
rml +="""<td> <para style="terp_tblheader_Details">""" + to_xml(tools.ustr(col.title)) +"""</para></td>"""
rml += """</tr></blockTable>"""
for row in range(0, que.no_of_rows):
rml +="""<blockTable colWidths=" """ + str(colWidths) + """ " style="Table51"><tr>"""
table_data = col_heading.browse(cr, uid, col_heading.search(cr, uid, [('response_table_id', '=', answer[0].id),('name','=',row)]))
for column in matrix_ans:
value = """<font color="white"> </font>"""
for col in table_data:
if column == col.column_id.title:
value = col.value
rml += """<td> <para style="terp_default_9">""" + to_xml(tools.ustr(value)) +"""</para></td>"""
rml += """</tr></blockTable>"""
for row in range(0, que.no_of_rows):
rml +="""<blockTable colWidths=" """ + str(colWidths) + """ " style="Table51"><tr>"""
table_data = col_heading.browse(cr, uid, col_heading.search(cr, uid, [('response_table_id', '=', answer[0].id),('name','=',row)]))
for column in matrix_ans:
value = """<font color="white"> </font>"""
for col in table_data:
if column == col.column_id.title:
value = col.value
rml += """<td> <para style="terp_default_9">""" + to_xml(tools.ustr(value)) +"""</para></td>"""
rml += """</tr></blockTable>"""
else:
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['multiple_choice_only_one_ans','multiple_choice_multiple_ans']:
if len(answer) and answer[0].state == "done":
for ans in answer[0].response_answer_ids:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['multiple_choice_only_one_ans','multiple_choice_multiple_ans']:
if len(answer) and answer[0].state == "done":
for ans in answer[0].response_answer_ids:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(ans.answer_id.answer)) + """</para></td></tr>
</blockTable>"""
if que.comment_field_type:
if answer[0].comment:
rml+="""<blockTable colWidths="500" style="Table1"><tr>
<td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr></blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['multiple_textboxes','date','date_and_time','numerical_textboxes']:
if len(answer) and answer[0].state == "done":
for ans in answer[0].response_answer_ids:
rml +="""<blockTable colWidths="200,300" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(ans.answer_id.answer)) + """</para></td>
<td> <para style="response">""" + to_xml(tools.ustr(ans.answer)) + """</para></td></tr>
</blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['single_textbox']:
if len(answer) and answer[0].state == "done":
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].single_text)) + """</para></td></tr>
<tr> <td> <para style="response">""" + to_xml(tools.ustr(ans.answer_id.answer)) + """</para></td></tr>
</blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['comment']:
if len(answer) and answer[0].state == "done":
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr>
</blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','rating_scale','matrix_of_drop_down_menus']:
if len(answer) and answer[0].state == "done":
if que.comment_column:
pass
cols_widhts = []
cols_widhts.append(200)
len_col_heading = len(que.column_heading_ids)
for col in range(0, len_col_heading):
cols_widhts.append(float(300 / len_col_heading))
tmp=0.0
sum = 0.0
i = 0
if que.comment_column:
for col in cols_widhts:
if i==0:
cols_widhts[i] = cols_widhts[i]/2.0
tmp = cols_widhts[i]
sum += col
i+=1
cols_widhts.append(round(tmp,2))
colWidths = ",".join(map(tools.ustr, cols_widhts))
matrix_ans = ['',]
for col in que.column_heading_ids:
if col.title not in matrix_ans:
matrix_ans.append(col.title)
len_matrix = len(matrix_ans)
if que.comment_column:
matrix_ans.append(que.column_name)
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
for mat_col in matrix_ans:
rml+="""<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml +="""</tr>"""
rml+="""</blockTable>"""
i=0
for ans in que.answer_choice_ids:
if i%2!=0:
style='ans_tbl_white'
else:
style='ans_tbl_gainsboro'
i+=1
rml+="""<blockTable colWidths=" """ + colWidths + """ " style='"""+style+"""'>
<tr><td><para style="response">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
comment_value = ""
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]:
comment_value = to_xml(tools.ustr(res_ans.comment_field))
if que.type in ['matrix_of_drop_down_menus']:
value = """<para style="response">""" + to_xml(tools.ustr(res_ans.value_choice)) + """</para>"""
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
value = """<illustration><fill color="white"/>
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes"/>
<fill color="gray"/>
<circle x="0.3cm" y="-0.18cm" radius="0.10 cm" fill="yes" stroke="no"/>
</illustration>"""
elif que.type in ['matrix_of_choices_only_multi_ans']:
value = """<illustration>
<fill color="white"/>
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
<fill color="gray"/>
<rect x="0.2cm" y="-0.35cm" width="0.3 cm" height="0.3cm" fill="yes" stroke="no" round="0.1cm"/>
</illustration>"""
break
else:
if que.type in ['matrix_of_drop_down_menus']:
value = """"""
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
value = """<illustration><fill color="white"/>
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes" round="0.1cm"/>
</illustration>"""
elif que.type in ['matrix_of_choices_only_multi_ans']:
value = """<illustration><fill color="white"/>
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
</illustration>"""
rml+= """<td>""" + value + """</td>"""
if que.comment_column:
if comment_value=='False':
comment_value = ''
rml+= """<td><para style="response">"""+ to_xml(tools.ustr(comment_value)) + """</para></td>"""
rml+=""" </tr></blockTable>"""
if que.comment_field_type:
if que.comment_field_type:
if answer[0].comment:
rml+="""<blockTable colWidths="500" style="Table1"><tr>
<td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr></blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['multiple_textboxes','date','date_and_time','numerical_textboxes']:
if len(answer) and answer[0].state == "done":
for ans in answer[0].response_answer_ids:
rml +="""<blockTable colWidths="200,300" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(ans.answer_id.answer)) + """</para></td>
<td> <para style="response">""" + to_xml(tools.ustr(ans.answer)) + """</para></td></tr>
</blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['single_textbox']:
if len(answer) and answer[0].state == "done":
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].single_text)) + """</para></td></tr>
</blockTable>"""
rml += """<pageBreak/>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['comment']:
if len(answer) and answer[0].state == "done":
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr>
</blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
elif que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','rating_scale','matrix_of_drop_down_menus']:
if len(answer) and answer[0].state == "done":
if que.comment_column:
pass
cols_widhts = []
cols_widhts.append(200)
len_col_heading = len(que.column_heading_ids)
for col in range(0, len_col_heading):
cols_widhts.append(float(300 / len_col_heading))
tmp=0.0
sum = 0.0
i = 0
if que.comment_column:
for col in cols_widhts:
if i==0:
cols_widhts[i] = cols_widhts[i]/2.0
tmp = cols_widhts[i]
sum += col
i+=1
cols_widhts.append(round(tmp,2))
colWidths = ",".join(map(tools.ustr, cols_widhts))
matrix_ans = ['',]
for col in que.column_heading_ids:
if col.title not in matrix_ans:
matrix_ans.append(col.title)
len_matrix = len(matrix_ans)
if que.comment_column:
matrix_ans.append(que.column_name)
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
for mat_col in matrix_ans:
rml+="""<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml +="""</tr>"""
rml+="""</blockTable>"""
i=0
for ans in que.answer_choice_ids:
if i%2!=0:
style='ans_tbl_white'
else:
style='ans_tbl_gainsboro'
i+=1
rml+="""<blockTable colWidths=" """ + colWidths + """ " style='"""+style+"""'>
<tr><td><para style="response">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
comment_value = ""
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]:
comment_value = to_xml(tools.ustr(res_ans.comment_field))
if que.type in ['matrix_of_drop_down_menus']:
value = """<para style="response">""" + to_xml(tools.ustr(res_ans.value_choice)) + """</para>"""
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
value = """<illustration><fill color="white"/>
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes"/>
<fill color="gray"/>
<circle x="0.3cm" y="-0.18cm" radius="0.10 cm" fill="yes" stroke="no"/>
</illustration>"""
elif que.type in ['matrix_of_choices_only_multi_ans']:
value = """<illustration>
<fill color="white"/>
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
<fill color="gray"/>
<rect x="0.2cm" y="-0.35cm" width="0.3 cm" height="0.3cm" fill="yes" stroke="no" round="0.1cm"/>
</illustration>"""
break
else:
if que.type in ['matrix_of_drop_down_menus']:
value = """"""
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
value = """<illustration><fill color="white"/>
<circle x="0.3cm" y="-0.18cm" radius="0.22 cm" fill="yes" stroke="yes" round="0.1cm"/>
</illustration>"""
elif que.type in ['matrix_of_choices_only_multi_ans']:
value = """<illustration><fill color="white"/>
<rect x="0.1cm" y="-0.45cm" width="0.5 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>
</illustration>"""
rml+= """<td>""" + value + """</td>"""
if que.comment_column:
if comment_value=='False':
comment_value = ''
rml+= """<td><para style="response">"""+ to_xml(tools.ustr(comment_value)) + """</para></td>"""
rml+=""" </tr></blockTable>"""
if que.comment_field_type:
rml+="""<blockTable colWidths="500" style="Table1"><tr>
<td><para style="answer">""" + to_xml(tools.ustr(answer[0].comment)) + """</para></td></tr></blockTable>"""
else:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">No Response</para></td> </tr>
</blockTable>"""
rml += """<pageBreak/>"""
rml += """</story></document>"""
report_type = datas.get('report_type', 'pdf')
create_doc = self.generators[report_type]
+5 -12
View File
@@ -135,10 +135,6 @@ class survey_form(report_rml):
<story>"""
surv_obj = pooler.get_pool(cr.dbname).get('survey')
for survey in surv_obj.browse(cr,uid,ids):
if survey.question_prefix:
prefix = survey.question_prefix + " : "
else:
prefix = ''
if datas.has_key('form') and datas['form']['survey_title']:
rml += """
<blockTable colWidths='"""+_tbl_widths+"""' style="title_tbl">
@@ -156,7 +152,7 @@ class survey_form(report_rml):
rml +="""
<para style="P2"><font></font></para>
<blockTable colWidths='"""+_tbl_widths+"""' style="question_tbl">
<tr><td><para style="question">""" + to_xml(tools.ustr(prefix)) + to_xml(tools.ustr(que.question)) + """</para></td></tr>
<tr><td><para style="question">Que : """ + to_xml(tools.ustr(que.question)) + """</para></td></tr>
</blockTable>
<para style="P2"><font></font></para>"""
if que.type in ['descriptive_text']:
@@ -221,7 +217,7 @@ class survey_form(report_rml):
<td></td>"""
rml+="""
</tr></blockTable>"""
elif que.type in ['matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus']:
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus']:
if len(que.column_heading_ids):
cols_widhts.append(float(_tbl_widths.replace('cm',''))/float(2.0))
for col in que.column_heading_ids:
@@ -247,13 +243,10 @@ class survey_form(report_rml):
matrix_ans.append(col.title)
if que.comment_column:
matrix_ans.append(to_xml(tools.ustr(que.column_name)))
rml+="""
<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
<tr>"""
for mat_col in matrix_ans:
rml+="""
<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml+="""<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml+="""</tr></blockTable>"""
i=0
for ans in que.answer_choice_ids:
@@ -270,7 +263,7 @@ class survey_form(report_rml):
if que.type in ['matrix_of_drop_down_menus']:
value = """ <fill color="white"/>
<rect x="-0.1cm" y="-0.45cm" width='""" + tools.ustr(cols_widhts[-1] - 0.5) +"cm" + """' height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/>"""
elif que.type in ['matrix_of_choices_only_one_ans']:
elif que.type in ['matrix_of_choices_only_one_ans','rating_scale']:
value = """ <fill color="white"/>
<!--rect x="0.25cm" y="-0.5cm" width="0.8 cm" height="0.5cm" fill="yes" stroke="yes" round="0.1cm"/-->
<circle x="0.35cm" y="-0.18cm" radius="0.25 cm" fill="yes" stroke="yes"/>"""
+101 -58
View File
@@ -32,10 +32,25 @@ import tools
from mx.DateTime import *
import netsvc
class survey_type(osv.osv):
_name = 'survey.type'
_description = 'Survey Type'
_columns = {
'name' : fields.char("Name", size=128, required=1),
'code' : fields.char("Code", size=64),
}
survey_type()
class survey(osv.osv):
_name = 'survey'
_description = 'Survey'
_rec_name = 'title'
def default_get(self, cr, uid, fields, context={}):
data = super(survey, self).default_get(cr, uid, fields, context)
data['responsible_id'] = uid
return data
_columns = {
'title' : fields.char('Survey Title', size=128, required=1),
'page_ids' : fields.one2many('survey.page', 'survey_id', 'Page'),
@@ -51,14 +66,15 @@ class survey(osv.osv):
'note' : fields.text('Description', size=128),
'history' : fields.one2many('survey.history', 'survey_id', 'History Lines', readonly=True),
'users': fields.many2many('res.users', 'survey_users_rel', 'sid', 'uid', 'Users'),
'question_prefix' : fields.char('Question Prefix', size=128),
'send_response' : fields.boolean('E-mail Notification on Response'),
'type' : fields.many2one('survey.type', 'Type')
}
_defaults = {
'state' : lambda * a: "draft",
'tot_start_survey' : lambda * a: 0,
'tot_comp_survey' : lambda * a: 0,
'send_response' : lambda * a: 1,
'response_user' : lambda * a:1,
}
def survey_draft(self, cr, uid, ids, arg):
@@ -160,8 +176,8 @@ class survey_question(osv.osv):
'question' : fields.char('Question', size=128, required=1),
'answer_choice_ids' : fields.one2many('survey.answer', 'question_id', 'Answer'),
'response_ids' : fields.one2many('survey.response.line', 'question_id', 'Response', readonly=1),
'is_require_answer' : fields.boolean('Required Answer'),
'required_type' : fields.selection([('',''), ('all','All'), ('at least','At Least'), ('at most','At Most'), ('exactly','Exactly'), ('a range','A Range')], 'Respondent must answer'),
'is_require_answer' : fields.boolean('Require Answer to Question (optional)'),
'required_type' : fields.selection([('all','All'), ('at least','At Least'), ('at most','At Most'), ('exactly','Exactly'), ('a range','A Range')], 'Respondent must answer'),
'req_ans' : fields.integer('#Required Answer'),
'maximum_req_ans' : fields.integer('Maximum Required Answer'),
'minimum_req_ans' : fields.integer('Minimum Required Answer'),
@@ -183,8 +199,9 @@ class survey_question(osv.osv):
('date_and_time','Date and Time'),('descriptive_text','Descriptive Text'),
('table','Table'),
], 'Question Type', required=1,),
'is_comment_require' : fields.boolean('Add Comment Field (optional)'),
'comment_label' : fields.char('Field Label', size = 255),
'comment_field_type' : fields.selection([('',''),('char', 'Single Line Of Text'), ('text', 'Paragraph of Text')], 'Comment Field Type'),
'comment_field_type' : fields.selection([('char', 'Single Line Of Text'), ('text', 'Paragraph of Text')], 'Comment Field Type'),
'comment_valid_type' : fields.selection([('do_not_validate', '''Don't Validate Comment Text.'''),
('must_be_specific_length', 'Must Be Specific Length'),
('must_be_whole_number', 'Must Be A Whole Number'),
@@ -201,6 +218,7 @@ class survey_question(osv.osv):
'comment_valid_err_msg' : fields.text('Error message'),
'make_comment_field' : fields.boolean('Make Comment Field an Answer Choice'),
'make_comment_field_err_msg' : fields.text('Error message'),
'is_validation_require' : fields.boolean('Validate Text (optional)'),
'validation_type' : fields.selection([('do_not_validate', '''Don't Validate Comment Text.'''),\
('must_be_specific_length', 'Must Be Specific Length'),\
('must_be_whole_number', 'Must Be A Whole Number'),\
@@ -228,8 +246,10 @@ class survey_question(osv.osv):
'sequence' : lambda * a: 1,
'type' : lambda * a: 'multiple_choice_multiple_ans',
'req_error_msg' : lambda * a: 'This question requires an answer.',
'required_type' : lambda * a: '',
'comment_label' : lambda * a: 'Other',
'required_type' : lambda * a: 'at least',
'req_ans' : lambda * a: 1,
'comment_field_type' : lambda * a: 'char',
'comment_label' : lambda * a: 'Other (please specify)',
'comment_valid_type' : lambda * a: 'do_not_validate',
'comment_valid_err_msg' : lambda * a : 'The comment you entered is in an invalid format.',
'validation_type' : lambda * a: 'do_not_validate',
@@ -280,34 +300,35 @@ class survey_question(osv.osv):
req_type = vals['required_type']
else:
req_type = question['required_type']
if req_type in ['at least', 'at most', 'exactly']:
if vals.has_key('req_ans'):
if not vals['req_ans'] or vals['req_ans'] > ans_len:
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.") % (ans_len + 1))
else:
if not question['req_ans'] or question['req_ans'] > ans_len:
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.") % (ans_len + 1))
if req_type == 'a range':
minimum_ans = 0
maximum_ans = 0
if vals.has_key('minimum_req_ans'):
minimum_ans = vals['minimum_req_ans']
if not vals['minimum_req_ans'] or vals['minimum_req_ans'] > ans_len:
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.") % (ans_len + 1))
else:
minimum_ans = question['minimum_req_ans']
if not question['minimum_req_ans'] or question['minimum_req_ans'] > ans_len:
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.") % (ans_len + 1))
if vals.has_key('maximum_req_ans'):
maximum_ans = vals['maximum_req_ans']
if not vals['maximum_req_ans'] or vals['maximum_req_ans'] > ans_len:
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.") % (ans_len + 1))
else:
maximum_ans = question['maximum_req_ans']
if not question['maximum_req_ans'] or question['maximum_req_ans'] > ans_len:
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.") % (ans_len + 1))
if maximum_ans <= minimum_ans:
raise osv.except_osv(_('Error !'),_("Maximum Required Answer is greater than Minimum Required Answer"))
if que_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 req_type in ['at least', 'at most', 'exactly']:
if vals.has_key('req_ans'):
if not vals['req_ans'] or vals['req_ans'] > ans_len:
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.") % (ans_len + 1))
else:
if not question['req_ans'] or question['req_ans'] > ans_len:
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.") % (ans_len + 1))
if req_type == 'a range':
minimum_ans = 0
maximum_ans = 0
if vals.has_key('minimum_req_ans'):
minimum_ans = vals['minimum_req_ans']
if not vals['minimum_req_ans'] or vals['minimum_req_ans'] > ans_len:
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.") % (ans_len + 1))
else:
minimum_ans = question['minimum_req_ans']
if not question['minimum_req_ans'] or question['minimum_req_ans'] > ans_len:
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.") % (ans_len + 1))
if vals.has_key('maximum_req_ans'):
maximum_ans = vals['maximum_req_ans']
if not vals['maximum_req_ans'] or vals['maximum_req_ans'] > ans_len:
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.") % (ans_len + 1))
else:
maximum_ans = question['maximum_req_ans']
if not question['maximum_req_ans'] or question['maximum_req_ans'] > ans_len:
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.") % (ans_len + 1))
if maximum_ans <= minimum_ans:
raise osv.except_osv(_('Error !'),_("Maximum Required Answer is greater than Minimum Required Answer"))
if question['type'] == 'matrix_of_drop_down_menus' and vals.has_key('column_heading_ids'):
for col in vals['column_heading_ids']:
if col[2].has_key('menu_choice') and not col[2]['menu_choice']:
@@ -325,18 +346,19 @@ class survey_question(osv.osv):
if vals.has_key('column_heading_ids') and not len(vals['column_heading_ids']):
if vals.has_key('type') and vals['type'] in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale']:
raise osv.except_osv(_('Error !'),_("You must enter one or more column heading."))
if 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']:
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('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']:
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']:
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"))
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']:
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']:
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']:
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"))
if vals['type'] == 'matrix_of_drop_down_menus':
for col in vals['column_heading_ids']:
if not col[2]['menu_choice']:
@@ -457,7 +479,18 @@ class survey_response(osv.osv):
'user_id' : fields.many2one('res.users', 'User'),
'response_type' : fields.selection([('manually', 'Manually'), ('link', 'Link')], 'Response Type', required=1),
'question_ids' : fields.one2many('survey.response.line', 'response_id', 'Response Answer'),
'state' : fields.selection([('done', 'Completed '),('skip', 'Skiped')], 'Status', readonly=True),
}
_defaults = {
'state' : lambda * a: "skip",
}
def response_done(self, cr, uid, ids, arg):
self.write(cr, uid, ids, { 'state' : 'done' })
return True
def response_skip(self, cr, uid, ids, arg):
self.write(cr, uid, ids, { 'state' : 'skip' })
return True
survey_response()
@@ -524,6 +557,12 @@ survey_response_answer()
class survey_name_wiz(osv.osv_memory):
_name = 'survey.name.wiz'
def default_get(self, cr, uid, fields, context={}):
data = super(survey_name_wiz, self).default_get(cr, uid, fields, context)
if context.has_key('survey_id'):
data['survey_id'] = context['survey_id']
return data
def _get_survey(self, cr, uid, context=None):
surv_obj = self.pool.get("survey")
result = []
@@ -573,7 +612,9 @@ class survey_name_wiz(osv.osv_memory):
'date': strftime('%Y-%m-%d %H:%M:%S'), 'survey_id': survey_id})
survey_obj = self.pool.get('survey')
sur_rec = survey_obj.read(cr,uid,self.read(cr,uid,ids)[0]['survey_id'])
survey_obj.write(cr, uid, survey_id, {'tot_start_survey' : sur_rec['tot_start_survey'] + 1})
if sur_rec['max_response_limit'] and sur_rec['max_response_limit'] <= sur_rec['tot_start_survey']:
raise osv.except_osv(_('Warning !'),_("You can not give more response. Please contact the author of this survey for further assistance."))
survey_obj.write(cr, uid, survey_id, {'tot_start_survey' : sur_rec['tot_start_survey'] + 1})
search_obj = self.pool.get('ir.ui.view')
search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
return {
@@ -651,7 +692,7 @@ class survey_question_wiz(osv.osv_memory):
que_rec = que_obj.read(cr, uid, que)
descriptive_text = ""
separator_string = tools.ustr(qu_no) + "." + tools.ustr(que_rec['question'])
if not context.has_key('active') and (que_rec['is_require_answer'] or que_rec['required_type'] != ''):
if not context.has_key('active') and que_rec['is_require_answer']:
star='*'
else:
star=''
@@ -755,7 +796,7 @@ 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':{}}
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']:
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"})
fields[tools.ustr(que) + "_otherfield"] = {'type':'boolean', 'string':que_rec['comment_label'], 'views':{}}
@@ -798,9 +839,11 @@ class survey_question_wiz(osv.osv_memory):
else:
if not context.has_key('active'):
survey_obj.write(cr, uid, survey_id, {'tot_comp_survey' : sur_rec['tot_comp_survey'] + 1})
sur_response_obj = self.pool.get('survey.response')
sur_response_obj.write(cr, uid, [sur_name_read['response']], {'state' : 'done'})
if sur_rec['send_response']:
user_obj = self.pool.get('res.users')
survey_data = survey_obj.browse(cr, uid, int(survey_id))
survey_data = survey_obj.browse(cr, uid, int(survey_id))
response_id = surv_name_wiz.read(cr,uid,context['sur_name_id'])['response']
context.update({'response_id':response_id})
report = self.create_report(cr, uid, [int(survey_id)], 'report.survey.browse.response', survey_data.title,context)
@@ -823,9 +866,9 @@ class survey_question_wiz(osv.osv_memory):
cr.execute("select email from res_partner_address where id =%d" % resp_id.id)
resp_email = cr.fetchone()[0]
if user_email and resp_email:
mail = "Hello " + survey_data.responsible_id.name + ",\n\n " + str(user_obj.browse(cr, uid, uid).name) + " Give Response Of " + survey_data.title + " Survey.\n\n Thanks,"
mail = "Hello " + survey_data.responsible_id.name + ",\n\n " + str(user_obj.browse(cr, uid, uid).name) + " Give Response Of " + survey_data.title + " Survey.\n\n Thanks,"
tools.email_send(user_email, [resp_email], "Survey Response Of " + str(user_obj.browse(cr, uid, uid).name) , mail, attach = attachments)
xml_form = etree.Element('form', {'string': _('Complete Survey Response')})
etree.SubElement(xml_form, 'separator', {'string': 'Complete Survey', 'colspan': "4"})
etree.SubElement(xml_form, 'label', {'string': 'Thanks for your response'})
@@ -905,7 +948,7 @@ class survey_question_wiz(osv.osv_memory):
que_id = key.split('_')[0]
if que_id not in que_li:
que_li.append(que_id)
que_rec = que_obj.read(cr, uid, [que_id], [])[0]
que_rec = que_obj.read(cr, uid, [int(que_id)], [])[0]
resp_id = resp_obj.create(cr, uid, {'question_id':que_id, 'date_create':datetime.datetime.now(), \
'state':'done','response_id' : response_id })
resp_id_list.append(resp_id)
@@ -944,14 +987,14 @@ class survey_question_wiz(osv.osv_memory):
else:
error = False
if que_rec['comment_valid_type'] == 'must_be_specific_length':
if (not val1 and que_rec['validation_minimum_no']) or len(val1) < que_rec['validation_maximum_no'] or len(val1) > que_rec['comment_maximum_no']:
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']:
error = False
try:
if que_rec['comment_valid_type'] == 'must_be_whole_number':
value = int(val1)
if value < que_rec['validation_minimum_no'] or value > que_rec['validation_maximum_no']:
if value < que_rec['comment_minimum_no'] or value > que_rec['comment_maximum_no']:
error = True
elif que_rec['comment_valid_type'] == 'must_be_decimal_number':
value = float(val1)
@@ -1057,7 +1100,7 @@ class survey_question_wiz(osv.osv_memory):
sur_name_read['store_ans'].pop(res)
surv_name_wiz.write(cr, uid, [context['sur_name_id']], {'response' :0})
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['required_type']:
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 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 \
@@ -1085,7 +1128,7 @@ class survey_question_wiz(osv.osv_memory):
else:
resp_id_list = []
for update in click_update:
que_rec = que_obj.read(cr, uid , [sur_name_read['store_ans'][update]['question_id']], [])[0]
que_rec = que_obj.read(cr, uid , [int(sur_name_read['store_ans'][update]['question_id'])], [])[0]
res_ans_obj.unlink(cr, uid,res_ans_obj.search(cr, uid, [('response_id', '=', update)]))
surv_tbl_column_obj.unlink(cr, uid,surv_tbl_column_obj.search(cr, uid, [('response_table_id', '=', update)]))
resp_id_list.append(update)
@@ -1228,7 +1271,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['required_type']:
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 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 \
+3
View File
@@ -215,6 +215,7 @@
<field name="comment_label">Why?</field>
<field name="in_visible_single_text">1</field>
<field eval="2" name="sequence"/>
<field name="is_comment_require">True</field>
</record>
<record id="survey_answer_very_integration" model="survey.answer">
<field name="answer">With each integration</field>
@@ -758,6 +759,7 @@
<field name="comment_label">No...Why?</field>
<field name="in_visible_single_text">1</field>
<field name="sequence" eval="3"/>
<field name="is_comment_require">True</field>
</record>
<record id="survey_answer_yes" model="survey.answer">
<field name="answer">Yes</field>
@@ -989,6 +991,7 @@
<field name="comment_label">Comment</field>
<field name="in_visible_single_text">1</field>
<field name="sequence" eval="2"/>
<field name="is_comment_require">True</field>
</record>
<record id="survey_answer_YES" model="survey.answer">
<field name="answer">Yes, I plan to use (GB)</field>
-1
View File
@@ -18,6 +18,5 @@
name="survey.browse.response"
rml=""
string="Browse Response"/>
</data>
</openerp>
File diff suppressed because it is too large Load Diff
+3
View File
@@ -8,5 +8,8 @@
<wizard string="Print Survey" id="wizard_print_survey"
model="survey" name="wizard.print.survey"/>
<wizard string="Browse Answer" id="wizard_browse_answer"
model="survey.response" name="wizard.browse.answer"/>
</data>
</openerp>
+1
View File
@@ -22,5 +22,6 @@
import wizard_survey
import wizard_print_survey
import wizard_browse_answer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,52 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import time
import pooler
from random import choice
import string
import tools
from tools.translate import _
_survey_form = '''<?xml version="1.0"?>
<form string="Browse Answer">
<field name="response_ids" colspan="4" nolabel="1"/>
</form>'''
_survey_fields = {
'response_ids': {'string': 'Survey', 'type': 'many2many', 'relation': 'survey.response'},
}
class browse_answer_wizard(wizard.interface):
states = {
'init' : {
'actions' : [],
'result' : {'type' : 'form', 'arch' :_survey_form, 'fields' :_survey_fields,\
'state' : [('end', 'Cancel', 'gtk-cancel'), ('print', 'Print', 'gtk-print')]}
},
'print': {
'actions': [],
'result': {'type':'print', 'report':'survey.browse.response', 'state':'end'}
}
}
browse_answer_wizard('wizard.browse.answer')
+86
View File
@@ -0,0 +1,86 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 06:05+0000\n"
"PO-Revision-Date: 2010-01-27 14:25+0000\n"
"Last-Translator: Simon Vidmar <Unknown>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-28 04:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: thunderbird
#: field:tinythunderbird.partner,copy_to:0
msgid "Copy To"
msgstr "Kopiraj v"
#. module: thunderbird
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Naziv objekta se mora začeti z 'x_' in ne sme vsebovati posebnih znakov!"
#. module: thunderbird
#: field:tinythunderbird.partner,description:0
msgid "Description"
msgstr "Opis"
#. module: thunderbird
#: field:tinythunderbird.partner,reference:0
msgid "Reference"
msgstr "Sklic"
#. module: thunderbird
#: model:ir.model,name:thunderbird.model_tinythunderbird_partner
msgid "Thunderbid mails"
msgstr "Sporočila Thunderbird"
#. module: thunderbird
#: field:tinythunderbird.partner,attachments:0
msgid "Attached Files"
msgstr "Pripete datoteke"
#. module: thunderbird
#: field:tinythunderbird.partner,res_user_id:0
msgid "User"
msgstr "Uporabnik"
#. module: thunderbird
#: field:tinythunderbird.partner,receiver:0
msgid "Receiver"
msgstr "Prejemnik"
#. module: thunderbird
#: field:tinythunderbird.partner,date:0
msgid "Date"
msgstr "Datum"
#. module: thunderbird
#: field:tinythunderbird.partner,title:0
msgid "Subject"
msgstr "Zadeva"
#. module: thunderbird
#: code:addons/thunderbird/partner/partner.py:0
#, python-format
msgid "Archive"
msgstr "Arhiv"
#. module: thunderbird
#: model:ir.module.module,shortdesc:thunderbird.module_meta_information
msgid "Thunderbird Interface"
msgstr "Vmesnik Thunderbird"
#. module: thunderbird
#: field:tinythunderbird.partner,sender:0
msgid "Sender"
msgstr "Pošiljatelj"