bzr revid: sbh@tinyerp.com-20100125051410-akoeusvwbjbx0fm6
This commit is contained in:
sbh (Open ERP)
2010-01-25 10:44:10 +05:30
46 changed files with 3287 additions and 1735 deletions
+302 -298
View File
File diff suppressed because it is too large Load Diff
+28 -10
View File
@@ -9,13 +9,13 @@ msgstr ""
"Project-Id-Version: account-balance-es\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 13:38+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-22 19:50+0000\n"
"Last-Translator: Miguel Anxo Bouzada <mbouzada@gmail.com>\n"
"Language-Team: Galego <g11n@mancomun.org>\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:14+0000\n"
"X-Launchpad-Export-Date: 2010-01-23 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_balance
@@ -60,7 +60,7 @@ msgstr "Nome da conta"
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Debit"
msgstr ""
msgstr "Débito"
#. module: account_balance
#: wizard_button:account.balance.account.balance.report,init,checkyear:0
@@ -118,6 +118,24 @@ msgid ""
" 5. You have an option to print the desired report in Landscape format.\n"
" "
msgstr ""
"O módulo de balance de contas é unha funcionalidade engadida ao módulo de "
"xestión financieira.\n"
"\n"
" Este módulo ofrece diversas opcións de impresión de balances.\n"
"\n"
" 1. Podese comparar o balance de distintos anos.\n"
"\n"
" 2. Pode establecer a comparación en importe ou porcentual entre dous "
"anos.\n"
"\n"
" 3. Pode establecer a conta de referencia para a comparación porcentual "
"para anos en particular.\n"
"\n"
" 4. Pode seleccionar períodos como unha data real ou períodos como data "
"de creación.\n"
"\n"
" 5. Pode imprimir o informe que desexe en formato apaisado.\n"
" "
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
@@ -143,13 +161,13 @@ msgstr "Con balance se non é igual a 0"
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Total :"
msgstr ""
msgstr "Total :"
#. module: account_balance
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Account Balance -"
msgstr ""
msgstr "Balance de conta -"
#. module: account_balance
#: wizard_field:account.balance.account.balance.report,init,format_perc:0
@@ -196,7 +214,7 @@ msgstr "Mostrar contas"
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Credit"
msgstr ""
msgstr "Crédito"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
@@ -206,13 +224,13 @@ msgstr "1. Debe seleccionar máis de 3 exercicios en calquera caso."
#. module: account_balance
#: model:ir.module.module,shortdesc:account_balance.module_meta_information
msgid "Accounting and financial management-Compare Accounts"
msgstr ""
msgstr "Xestión contable e financieira - Comparación de contas"
#. module: account_balance
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Year :"
msgstr ""
msgstr "Ano :"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
@@ -224,7 +242,7 @@ msgstr ""
#: rml:account.account.balance.landscape:0
#: rml:account.balance.account.balance:0
msgid "Balance"
msgstr ""
msgstr "Balance"
#. module: account_balance
#: wizard_view:account.balance.account.balance.report,backtoinit:0
+21 -21
View File
@@ -7,19 +7,19 @@ 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: 2010-01-18 23:06+0000\n"
"Last-Translator: Holverat <holverat@gmail.com>\n"
"PO-Revision-Date: 2010-01-23 02:16+0000\n"
"Last-Translator: Holverat Bortolossi <holverat@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
"X-Launchpad-Export-Date: 2010-01-24 04:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: auction
#: field:report.deposit.border,total_marge:0
msgid "Total margin"
msgstr ""
msgstr "Margem total"
#. module: auction
#: wizard_view:auction.lots.sms_send,init:0
@@ -29,7 +29,7 @@ msgstr ""
#. module: auction
#: view:auction.lots:0
msgid "Set to draft"
msgstr ""
msgstr "Definir como rascunho"
#. module: auction
#: field:auction.deposit,partner_id:0
@@ -39,12 +39,12 @@ msgstr ""
#: field:report.seller.auction,seller:0
#: field:report.seller.auction2,seller:0
msgid "Seller"
msgstr ""
msgstr "Loja"
#. module: auction
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nome de modelo inválido na definição da ação."
#. module: auction
#: selection:auction.lots.send.aie,date_ask,numerotation:0
@@ -56,38 +56,38 @@ msgstr "Provisório"
#: selection:auction.lots.send.aie,date_ask,numerotation:0
#: selection:auction.lots.send.aie,init,numerotation:0
msgid "Definitive (ordre catalogue)"
msgstr ""
msgstr "Definitivo (catálogo do ordre)"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_report_auction_object_date_tree1_my
msgid "My Encoded Objects Per Day"
msgstr ""
msgstr "Meus objetos codificados por dia"
#. module: auction
#: model:ir.model,name:auction.model_auction_lot_history
msgid "Lot history"
msgstr ""
msgstr "Histórico de lote"
#. module: auction
#: field:report.seller.auction,avg_estimation:0
msgid "Avg estimation"
msgstr ""
msgstr "Média estimada"
#. module: auction
#: field:report.auction.object.date,obj_num:0
#: field:report.auction.view2,obj_number:0
msgid "# of Objects"
msgstr ""
msgstr "dos Objetos"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_action_bids_form
msgid "Bids line"
msgstr ""
msgstr "Linha de Lances"
#. module: auction
#: xsl:report.auction.deposit:0
msgid "Deposit Form"
msgstr ""
msgstr "Formulário de Depósitos"
#. module: auction
#: rml:auction.bids:0
@@ -108,22 +108,22 @@ msgstr "Comprador"
#: field:report.auction.view,nobjects:0
#: field:report.buyer.auction,object:0
msgid "No of objects"
msgstr ""
msgstr "Nenhum dos objetos"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_report_auction_adjudication_tree
msgid "Adjudication by Auction"
msgstr ""
msgstr "Concedido em Leilão"
#. module: auction
#: rml:auction.total.rml:0
msgid "# of paid items (based on invoices):"
msgstr ""
msgstr "# de itens pagos (com base na faturas):"
#. module: auction
#: model:ir.actions.wizard,name:auction.wizard_numerotate_lot
msgid "Numerotation (per lot)"
msgstr ""
msgstr "Numeração (por lote)"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
@@ -134,18 +134,18 @@ msgstr ""
#: view:auction.deposit:0
#: model:ir.model,name:auction.model_auction_deposit
msgid "Deposit Border"
msgstr ""
msgstr "Limite de Depósito"
#. module: auction
#: wizard_field:auction.lots.make_invoice,init,amount:0
#: wizard_field:auction.lots.make_invoice_buyer,init,amount:0
msgid "Invoiced Amount"
msgstr ""
msgstr "Valor Faturado"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Antique/Tin / Copper wares"
msgstr ""
msgstr "Antigo/pequeno produto de cobre ou estanho"
#. module: auction
#: field:auction.lots,paid_ach:0
+1 -1
View File
@@ -38,7 +38,7 @@
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',
"init_xml" : [],
"init_xml" : ["base_calendar_data.xml"],
"demo_xml" : [],
"update_xml" : [
'security/ir.model.access.csv',
+112 -46
View File
@@ -23,6 +23,7 @@ from datetime import datetime, timedelta
from dateutil import parser
from dateutil.rrule import *
from osv import osv, fields
import base64
import pooler
import re
import vobject
@@ -59,16 +60,18 @@ def openobjectid2uid(cr, uidval, oomodel):
value = 'OpenObject-%s_%s@%s' % (oomodel, uidval, cr.dbname)
return value
def get_attribute_mapping(cr, uid, model, context={}):
def get_attribute_mapping(cr, uid, calname, context={}):
pool = pooler.get_pool(cr.dbname)
field_obj = pool.get('basic.calendar.fields')
fids = field_obj.search(cr, uid, [('object_id.model', '=', model)])
fids = field_obj.search(cr, uid, [('type_id', '=', calname)])
res = {}
for field in field_obj.browse(cr, uid, fids):
attr = field.attribute
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:
@@ -154,12 +157,28 @@ class CalDAV(object):
if self.__attribute__[name]:
self.__attribute__[name][type] = None
return True
def parse_ics(self, cr, uid, child):
att_data = []
for cal_data in child.getChildren():
if cal_data.name.lower() == 'attendee':
attendee = self.pool.get('basic.calendar.attendee')
att_data.append(attendee.import_cal(cr, uid, cal_data))
self.ical_set(cal_data.name.lower(), att_data, 'value')
continue
if cal_data.name.lower() == 'valarm':
alarm = self.pool.get('basic.calendar.alarm')
vals = alarm.import_cal(cr, uid, cal_data)
self.ical_set(cal_data.name.lower(), vals, 'value')
continue
if cal_data.name.lower() in self.__attribute__:
self.ical_set(cal_data.name.lower(), cal_data.value, 'value')
vals = map_data(cr, uid, self)
return vals
def export_ical(self, cr, uid, datas, vobj=None, context={}):
self.__attribute__ = get_attribute_mapping(cr, uid, self._name, context)
ical = vobject.iCalendar()
def create_ics(self, cr, uid, datas, name, ical, context=None):
for data in datas:
vevent = ical.add(vobj)
vevent = ical.add(name)
for field in self.__attribute__.keys():
map_field = self.ical_get(field, 'field')
map_type = self.ical_get(field, 'type')
@@ -171,11 +190,11 @@ class CalDAV(object):
uidval = openobjectid2uid(cr, data[map_field], model)
model_obj = self.pool.get(model)
cr.execute('select id from %s where recurrent_uid=%s'
% (model_obj._table, data[map_field]))
% (model_obj._table, data[map_field]))
r_ids = map(lambda x: x[0], cr.fetchall())
if r_ids:
rdata = self.pool.get(model).read(cr, uid, r_ids)
rcal = self.export_ical(cr, uid, rdata, context=context)
rcal = self.export_cal(cr, uid, rdata, context=context)
for revents in rcal.contents['vevent']:
ical.contents['vevent'].append(revents)
if data.get('recurrent_uid', None):
@@ -184,12 +203,12 @@ class CalDAV(object):
elif field == 'attendee' and data[map_field]:
model = self.__attribute__[field].get('object', False)
attendee_obj = self.pool.get('basic.calendar.attendee')
vevent = attendee_obj.export_ical(cr, uid, model, \
vevent = attendee_obj.export_cal(cr, uid, model, \
data[map_field], vevent, context=context)
elif field == 'valarm' and data[map_field]:
model = self.__attribute__[field].get('object', False)
alarm_obj = self.pool.get('basic.calendar.alarm')
vevent = alarm_obj.export_ical(cr, uid, model, \
vevent = alarm_obj.export_cal(cr, uid, model, \
data[map_field][0], vevent, context=context)
elif data[map_field]:
if map_type in ("char", "text"):
@@ -204,7 +223,7 @@ class CalDAV(object):
elif map_type == "many2one":
vevent.add(field).value = [data.get(map_field)[1]]
elif map_type in ("float", "integer"):
vevent.add(field).value = [data.get(map_field)]
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]).upper()
@@ -212,29 +231,23 @@ class CalDAV(object):
for key1, val1 in self.ical_get(field, 'mapping').items():
if val1 == data[map_field]:
vevent.add(field).value = key1
return vevent
def export_cal(self, cr, uid, datas, vobj=None, context={}):
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, context)
ical = vobject.iCalendar()
self.create_ics(cr, uid, datas, vobj, ical, context=context)
return ical
def import_ical(self, cr, uid, ical_data):
self.__attribute__ = get_attribute_mapping(cr, uid, self._name)
def import_cal(self, cr, uid, content, data_id=None, context=None):
ical_data = base64.decodestring(content)
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname)
parsedCal = vobject.readOne(ical_data)
att_data = []
res = []
for child in parsedCal.getChildren():
for cal_data in child.getChildren():
if cal_data.name.lower() == 'attendee':
attendee = self.pool.get('basic.calendar.attendee')
att_data.append(attendee.import_ical(cr, uid, cal_data))
self.ical_set(cal_data.name.lower(), att_data, 'value')
continue
if cal_data.name.lower() == 'valarm':
alarm = self.pool.get('basic.calendar.alarm')
vals = alarm.import_ical(cr, uid, cal_data)
self.ical_set(cal_data.name.lower(), vals, 'value')
continue
if cal_data.name.lower() in self.__attribute__:
self.ical_set(cal_data.name.lower(), cal_data.value, 'value')
if child.name.lower() in ('vevent', 'vtodo'):
vals = map_data(cr, uid, self)
vals = self.parse_ics(cr, uid, child)
else:
vals = {}
continue
@@ -245,6 +258,9 @@ class CalDAV(object):
class Calendar(CalDAV, osv.osv):
_name = 'basic.calendar'
_description = 'Calendar'
_calname = 'calendar'
__attribute__ = {
'prodid': None, # Use: R-1, Type: TEXT, Specifies the identifier for the product that created the iCalendar object.
'version': None, # Use: R-1, Type: TEXT, Specifies the identifier corresponding to the highest version number
@@ -259,26 +275,69 @@ class Calendar(CalDAV, osv.osv):
'vtimezone': None, # Use: O-n, Type: Collection of Timezone class
}
_columns = {
'name': fields.char("Name", size=64),
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines')
'name': fields.char("Name", size=64),
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
'active': fields.boolean('Active'),
}
Calendar()
_defaults = {
'active': lambda *a: True,
}
def export_cal(self, cr, uid, datas, vobj='vevent', context={}):
cal = self.browse(cr, uid, datas[0])
ical = vobject.iCalendar()
for line in cal.line_ids:
if line.name in ('alarm', 'attendee'):
continue
mod_obj = self.pool.get(line.object_id.model)
data_ids = mod_obj.search(cr, uid, eval(line.domain), context=context)
datas = mod_obj.read(cr, uid, data_ids, context=context)
context.update({'model': line.object_id.model})
self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context)
self.create_ics(cr, uid, datas, line.name, ical, context=context)
return ical.serialize()
def import_cal(self, cr, uid, content, data_id=None, context=None):
ical_data = base64.decodestring(content)
parsedCal = vobject.readOne(ical_data)
if not data_id:
data_id = self.search(cr, uid, [])[0]
cal = self.browse(cr, uid, data_id)
cal_children = {}
count = 0
for line in cal.line_ids:
cal_children[line.name] = line.object_id.model
for child in parsedCal.getChildren():
if child.name.lower() in cal_children:
self.__attribute__ = get_attribute_mapping(cr, uid, child.name.lower())
val = self.parse_ics(cr, uid, child)
obj = self.pool.get(cal_children[child.name.lower()])
if hasattr(obj, 'check_import'):
obj.check_import(cr, uid, [val], context={})
return {}
Calendar()
class basic_calendar_line(osv.osv):
_name = 'basic.calendar.lines'
_description = 'Calendar Lines'
_description = 'Calendar Lines'
_columns = {
'name': fields.selection([('event', 'Event'), ('todo', 'TODO'), \
'name': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO'), \
('alarm', 'Alarm'), \
('attendee', 'Attendee')], \
string="Type", size=64),
'object_id': fields.many2one('ir.model', 'Object'),
'calendar_id': fields.many2one('basic.calendar', 'Calendar', required=True),
'calendar_id': fields.many2one('basic.calendar', 'Calendar', \
required=True, ondelete='cascade'),
'domain': fields.char('Domain', size=124),
'mapping_ids': fields.one2many('basic.calendar.fields', 'type_id', 'Fields Mapping')
}
_defaults = {
'domain': lambda *a: '[]',
}
basic_calendar_line()
class basic_calendar_attribute(osv.osv):
@@ -286,7 +345,7 @@ class basic_calendar_attribute(osv.osv):
_description = 'Calendar attributes'
_columns = {
'name': fields.char("Name", size=64, required=True),
'type': fields.selection([('event', 'Event'), ('todo', 'TODO'), \
'type': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO'), \
('alarm', 'Alarm'), \
('attendee', 'Attendee')], \
string="Type", size=64, required=True),
@@ -301,7 +360,8 @@ class basic_calendar_fields(osv.osv):
_columns = {
'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),
'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'),
@@ -313,11 +373,12 @@ class basic_calendar_fields(osv.osv):
_defaults = {
'fn': lambda *a: 'field',
}
basic_calendar_fields()
class Event(CalDAV, osv.osv_memory):
_name = 'basic.calendar.event'
_calname = 'vevent'
__attribute__ = {
'class': None, # Use: O-1, Type: TEXT, Defines the access classification for a calendar component like "PUBLIC" / "PRIVATE" / "CONFIDENTIAL"
'created': None, # Use: O-1, Type: DATE-TIME, Specifies the date and time that the calendar information was created by the calendar user agent in the calendar store.
@@ -353,13 +414,14 @@ class Event(CalDAV, osv.osv_memory):
'duration': None, # Use: O-1, Type: DURATION, Specifies a positive duration of time.
'dtend': None, # Use: O-1, Type: DATE-TIME, Specifies the date and time that a calendar component ends.
}
def export_ical(self, cr, uid, datas, vobj='vevent', context={}):
return super(Event, self).export_ical(cr, uid, datas, 'vevent', context=context)
def export_cal(self, cr, uid, datas, vobj='vevent', context={}):
return super(Event, self).export_cal(cr, uid, datas, 'vevent', context=context)
Event()
class ToDo(CalDAV, osv.osv_memory):
_name = 'basic.calendar.todo'
_calname = 'vtodo'
__attribute__ = {
'class': None,
@@ -396,8 +458,8 @@ class ToDo(CalDAV, osv.osv_memory):
'rrule': None,
}
def export_ical(self, cr, uid, datas, vobj='vevent', context={}):
return super(ToDo, self).export_ical(cr, uid, datas, 'vtodo', context=context)
def export_cal(self, cr, uid, datas, vobj='vevent', context={}):
return super(ToDo, self).export_cal(cr, uid, datas, 'vtodo', context=context)
ToDo()
@@ -436,6 +498,8 @@ class Timezone(CalDAV):
class Alarm(CalDAV, osv.osv_memory):
_name = 'basic.calendar.alarm'
_calname = 'alarm'
__attribute__ = {
'action': None, # Use: R-1, Type: Text, defines the action to be invoked when an alarm is triggered LIKE "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE"
'description': None, # Type: Text, Provides a more complete description of the calendar component, than that provided by the "SUMMARY" property. Use:- R-1 for DISPLAY,Use:- R-1 for EMAIL,Use:- R-1 for PROCEDURE
@@ -448,7 +512,7 @@ class Alarm(CalDAV, osv.osv_memory):
'x-prop': None,
}
def export_ical(self, cr, uid, model, alarm_id, vevent, context={}):
def export_cal(self, cr, uid, model, alarm_id, vevent, context={}):
valarm = vevent.add('valarm')
alarm_object = self.pool.get(model)
alarm_data = alarm_object.read(cr, uid, alarm_id, [])
@@ -474,7 +538,7 @@ class Alarm(CalDAV, osv.osv_memory):
valarm.add('ACTION').value = alarm_data['action']
return vevent
def import_ical(self, cr, uid, ical_data):
def import_cal(self, cr, uid, ical_data):
for child in ical_data.getChildren():
if child.name.lower() == 'trigger':
seconds = child.value.seconds
@@ -508,6 +572,8 @@ Alarm()
class Attendee(CalDAV, osv.osv_memory):
_name = 'basic.calendar.attendee'
_calname = 'attendee'
__attribute__ = {
'cutype': None, # Use: 0-1 Specify the type of calendar user specified by the property like "INDIVIDUAL"/"GROUP"/"RESOURCE"/"ROOM"/"UNKNOWN".
'member': None, # Use: 0-1 Specify the group or list membership of the calendar user specified by the property.
@@ -522,7 +588,7 @@ 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_ical(self, cr, uid, ical_data):
def import_cal(self, cr, uid, ical_data):
for para in ical_data.params:
if para.lower() == 'cn':
self.ical_set(para.lower(), ical_data.params[para][0]+':'+ \
@@ -534,9 +600,9 @@ class Attendee(CalDAV, osv.osv_memory):
vals = map_data(cr, uid, self)
return vals
def export_ical(self, cr, uid, model, attendee_ids, vevent, context={}):
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._name, context)
self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, context)
for attendee in attendee_object.read(cr, uid, attendee_ids, []):
attendee_add = vevent.add('attendee')
cn_val = ''
+369
View File
@@ -0,0 +1,369 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="basic.calendar" id="basic_calendar1">
<field name="name">OpenERP</field>
</record>
<!-- Event attributes-->
<record model="basic.calendar.attributes" id="field_event_comment">
<field name="name">comment</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_uid">
<field name="name">uid</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_seq">
<field name="name">seq</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_recurrence-id">
<field name="name">recurrence-id</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_transp">
<field name="name">transp</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_attendee">
<field name="name">attendee</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_related">
<field name="name">related</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_rrule">
<field name="name">rrule</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_dtend">
<field name="name">dtend</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_valarm">
<field name="name">valarm</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_priority">
<field name="name">priority</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_location">
<field name="name">location</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_exrule">
<field name="name">exrule</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_resources">
<field name="name">resources</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_rstatus">
<field name="name">rstatus</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_status">
<field name="name">status</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_exdate">
<field name="name">exdate</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_dtstamp">
<field name="name">dtstamp</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_description">
<field name="name">description</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_rdate">
<field name="name">rdate</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_dtstart">
<field name="name">dtstart</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_class">
<field name="name">class</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_x-openobject-model">
<field name="name">x-openobject-model</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_created">
<field name="name">created</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_url">
<field name="name">url</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_summary">
<field name="name">summary</field>
<field name="type">vevent</field>
</record>
<record model="basic.calendar.attributes" id="field_event_contact">
<field name="name">contact</field>
<field name="type">vevent</field>
</record>
<!-- Todo attributes-->
<record model="basic.calendar.attributes" id="field_todo_status">
<field name="name">status</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_comment">
<field name="name">comment</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_attendee">
<field name="name">attendee</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_valarm">
<field name="name">valarm</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_description">
<field name="name">description</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_seq">
<field name="name">seq</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_url">
<field name="name">url</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_completed">
<field name="name">completed</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_percent">
<field name="name">percent</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_due">
<field name="name">due</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_summary">
<field name="name">summary</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_priority">
<field name="name">priority</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_exdate">
<field name="name">exdate</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_location">
<field name="name">location</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_exrule">
<field name="name">exrule</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_duration">
<field name="name">duration</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_organizer">
<field name="name">organizer</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_dtstart">
<field name="name">dtstart</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_rrule">
<field name="name">rrule</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_class">
<field name="name">class</field>
<field name="type">vtodo</field>
</record>
<record model="basic.calendar.attributes" id="field_todo_uid">
<field name="name">uid</field>
<field name="type">vtodo</field>
</record>
<!-- Attendee's attributes-->
<record model="basic.calendar.attributes" id="field_attendee_cn">
<field name="name">cn</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_sent-by">
<field name="name">sent-by</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_language">
<field name="name">language</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_delegated-from">
<field name="name">delegated-from</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_member">
<field name="name">member</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_cutype">
<field name="name">cutype</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_role">
<field name="name">role</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_partstat">
<field name="name">partstat</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_delegated-to">
<field name="name">delegated-to</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_dir">
<field name="name">dir</field>
<field name="type">attendee</field>
</record>
<record model="basic.calendar.attributes" id="field_attendee_rsvp">
<field name="name">rsvp</field>
<field name="type">attendee</field>
</record>
<!-- Alarm attributes-->
<record model="basic.calendar.attributes" id="field_alarm_attendee">
<field name="name">attendee</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_trigger_duration">
<field name="name">trigger_duration</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_description">
<field name="name">description</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_attach">
<field name="name">attach</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_trigger_occurs">
<field name="name">trigger_occurs</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_trigger_interval">
<field name="name">trigger_interval</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_summary">
<field name="name">summary</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_duration">
<field name="name">duration</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_repeat">
<field name="name">repeat</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_action">
<field name="name">action</field>
<field name="type">alarm</field>
</record>
<record model="basic.calendar.attributes" id="field_alarm_trigger_related">
<field name="name">trigger_related</field>
<field name="type">alarm</field>
</record>
</data>
</openerp>
+12 -10
View File
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_calendar_form" model="ir.ui.view">
<field name="name">Basic Calendar</field>
<field name="model">basic.calendar</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Basic Calendar">
<field name="name" required="1" />
<form string="Basic Calendar">
<field name="name" required="1" select="1" />
<field name="active" select="1" />
<field name="line_ids" mode="form,tree" colspan="4" nolabel="1">
<form string="Calendar Lines">
<field name="name" required="1" select="1" />
<field name="object_id" required="1" select="1" />
<field name="object_id" required="1" select="1" />
<field name="domain" select="1" />
<field name="mapping_ids" select="1" colspan="4" nolabel="1">
<tree string="Attributes Mapping" editable="bottom">
<field name="name" required="1" domain="[('type', '=', parent.name)]"/>
@@ -25,21 +27,21 @@
<field name="field_id" select="1" domain="[('model_id', '=', parent.object_id)]"
required="1" />
<field name="fn" select="1" required="1" />
<field name="expr" />
<field name="expr" />
<separator string="Value Mapping" colspan="4" />
<field name="mapping" select="1" colspan="4" nolabel="1" />
</form>
</field>
</form>
</form>
<tree string="Attributes Mapping" editable="bottom">
<field name="name" select="1" />
<field name="object_id" select="1" />
<field name="object_id" select="1" />
</tree>
</field>
</form>
</field>
</record>
<record id="action_view_calendar" model="ir.actions.act_window">
<field name="name">Calendar</field>
<field name="type">ir.actions.act_window</field>
@@ -50,7 +52,7 @@
<menuitem id="menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
<menuitem id="menu_calendar"
name="Calendar" parent="menu_calendar_configuration"
sequence="5" action="action_view_calendar" />
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard string="Import .ics File" model="basic.calendar.event"
name="calendar.event.import" id="wizard_cal_event_import" multi="True" />
<wizard string="Import .ics File" model="basic.calendar"
name="calendar.event.import" id="wizard_cal_event_import" />
<wizard string="Subscribe to a Remote calendar"
model="basic.calendar.event" name="calendar.event.subscribe"
model="basic.calendar" name="calendar.event.subscribe"
id="wizard_cal_event_subscribe" multi="True" />
<wizard string="Export .ics File" model="basic.calendar.event"
name="calendar.event.export" id="wizard_cal_event_export" multi="True" />
<wizard string="Export .ics File" model="basic.calendar"
name="calendar.event.export" id="wizard_cal_event_export" />
<wizard string="Edit this event" model="basic.calendar.event"
name="calendar.event.edit.this" id="wizard_edit_this_event"
menu="False" />
</data>
</openerp>
</openerp>
@@ -52,7 +52,7 @@ class cal_event_export_wizard(wizard.interface):
calendar = model_obj.export_cal(cr, uid, data['ids'], context)
return {'file_path': base64.encodestring(calendar), \
'name': 'OpenERP %s.ics' % (model_obj._description)}
states = {
'init': {
'actions': [_process_export_ics],
@@ -54,7 +54,7 @@ class cal_event_import_wizard(wizard.interface):
def _process_imp_ics(self, cr, uid, data, context=None):
model = data.get('model')
model_obj = pooler.get_pool(cr.dbname).get(model)
vals = model_obj.import_cal(cr, uid, data['form']['file_path'], context)
vals = model_obj.import_cal(cr, uid, data['form']['file_path'], data['id'], context)
global cnt
cnt = 0
if vals:
+9 -9
View File
@@ -7,30 +7,30 @@ 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-02-03 17:44+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-24 18:48+0000\n"
"Last-Translator: Oktay Altunergil <oktaya@gmail.com>\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:08+0000\n"
"X-Launchpad-Export-Date: 2010-01-25 04:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_contact
#: field:res.partner.job,sequence_contact:0
msgid "Contact Seq."
msgstr ""
msgstr "Bağlantı Sırası"
#. module: base_contact
#: model:ir.model,name:base_contact.model_res_partner_contact
msgid "res.partner.contact"
msgstr ""
msgstr "res.partner.contact"
#. module: base_contact
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
msgstr "Nesne adı x_ ile başlamalı ve özel karakterler içermemelidir!"
#. module: base_contact
#: field:res.partner.job,function_id:0
@@ -45,7 +45,7 @@ msgstr ""
#: view:res.partner.address:0
#: field:res.partner.address,job_ids:0
msgid "Contacts"
msgstr "Kişiler"
msgstr "Bağlantılar"
#. module: base_contact
#: field:res.partner.job,sequence_partner:0
@@ -55,7 +55,7 @@ msgstr ""
#. module: base_contact
#: selection:res.partner.job,state:0
msgid "Current"
msgstr ""
msgstr "Güncel"
#. module: base_contact
#: field:res.partner.contact,first_name:0
@@ -70,7 +70,7 @@ msgstr ""
#. module: base_contact
#: field:res.partner.job,other:0
msgid "Other"
msgstr ""
msgstr "Diğer"
#. module: base_contact
#: model:process.transition,name:base_contact.process_transition_contacttofunction0
+4 -4
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-02-03 06:25+0000\n"
"Last-Translator: <>\n"
"PO-Revision-Date: 2010-01-24 18:52+0000\n"
"Last-Translator: Oktay Altunergil <oktaya@gmail.com>\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:10+0000\n"
"X-Launchpad-Export-Date: 2010-01-25 04:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_setup
@@ -84,7 +84,7 @@ msgstr ""
#: wizard_field:base_setup.base_setup,init,state_id:0
#: wizard_field:base_setup.base_setup,update,state_id:0
msgid "State"
msgstr ""
msgstr "Eyalet"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
+20 -11
View File
@@ -444,9 +444,11 @@ class calendar_event(osv.osv):
_columns = {
'id': fields.integer('ID'),
'sequence': fields.integer('Sequence'),
'name': fields.char('Description', size=64, required=True),
'date': fields.datetime('Date'),
'date_deadline': fields.datetime('Deadline'),
'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'),
@@ -480,15 +482,17 @@ rule or repeating pattern for anexception to a recurrence set"),
ids = map(lambda x: caldav_id2real_id(x), ids)
event_data = self.read(cr, uid, ids)
event_obj = self.pool.get('basic.calendar.event')
ical = event_obj.export_ical(cr, uid, event_data, context={'model': self._name})
ical = event_obj.export_cal(cr, uid, event_data, context={'model': self._name})
cal_val = ical.serialize()
cal_val = cal_val.replace('"', '').strip()
return cal_val
def import_cal(self, cr, uid, data, context={}):
file_content = base64.decodestring(data)
def import_cal(self, cr, uid, data, data_id=None, context={}):
event_obj = self.pool.get('basic.calendar.event')
vals = event_obj.import_ical(cr, uid, file_content)
vals = event_obj.import_cal(cr, uid, data)
return self.check_import(cr, uid, vals, context=context)
def check_import(self, cr, uid, vals, context={}):
ids = []
for val in vals:
exists, r_id = base_calendar.uid2openobjectid(cr, val['id'], self._name, \
@@ -507,7 +511,7 @@ rule or repeating pattern for anexception to a recurrence set"),
event_id = self.create(cr, uid, val)
ids.append(event_id)
return ids
def modify_this(self, cr, uid, ids, defaults, context=None, *args):
datas = self.read(cr, uid, ids[0], context=context)
date = datas.get('date')
@@ -725,10 +729,13 @@ class calendar_todo(osv.osv):
__attribute__ = {}
def import_cal(self, cr, uid, data, context={}):
file_content = base64.decodestring(data)
def import_cal(self, cr, uid, data, data_id=None, context={}):
todo_obj = self.pool.get('basic.calendar.todo')
vals = todo_obj.import_ical(cr, uid, file_content)
vals = todo_obj.import_cal(cr, uid, data)
return self.check_import(cr, uid, vals, context=context)
def check_import(self, cr, uid, vals, context={}):
ids = []
for val in vals:
obj_tm = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.project_time_mode_id
if not val.has_key('planned_hours'):
@@ -747,10 +754,12 @@ class calendar_todo(osv.osv):
val.pop('id')
if exists:
self.write(cr, uid, [exists], val)
ids.append(exists)
else:
task_id = self.create(cr, uid, val)
return {'count': len(vals)}
ids.append(task_id)
return ids
def export_cal(self, cr, uid, ids, context={}):
task_datas = self.read(cr, uid, ids, [], context ={'read': True})
tasks = []
@@ -759,7 +768,7 @@ class calendar_todo(osv.osv):
task.pop('planned_hours')
tasks.append(task)
todo_obj = self.pool.get('basic.calendar.todo')
ical = todo_obj.export_ical(cr, uid, tasks, context={'model': self._name})
ical = todo_obj.export_cal(cr, uid, tasks, context={'model': self._name})
calendar_val = ical.serialize()
calendar_val = calendar_val.replace('"', '').strip()
return calendar_val
+438
View File
@@ -130,5 +130,443 @@
<field eval="'(False,)'" name="args" />
</record>
<record model="basic.calendar.lines" id="calendar_lines_event">
<field name="name">vevent</field>
<field name="calendar_id" ref="base_calendar.basic_calendar1" />
<field name="object_id" search="[('model','=','calendar.event')]" />
</record>
<record model="basic.calendar.lines" id="calendar_lines_todo">
<field name="name">vtodo</field>
<field name="calendar_id" ref="base_calendar.basic_calendar1" />
<field name="object_id" search="[('model','=','calendar.todo')]" />
</record>
<record model="basic.calendar.lines" id="calendar_lines_alarm">
<field name="name">alarm</field>
<field name="calendar_id" ref="base_calendar.basic_calendar1" />
<field name="object_id" search="[('model','=','calendar.alarm')]" />
</record>
<record model="basic.calendar.lines" id="calendar_lines_attendee">
<field name="name">attendee</field>
<field name="calendar_id" ref="base_calendar.basic_calendar1" />
<field name="object_id" search="[('model','=','calendar.attendee')]" />
</record>
<record model="basic.calendar.fields" id="map_event_1">
<field name="name" ref="base_calendar.field_event_uid"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','id'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_2">
<field name="name" ref="base_calendar.field_event_recurrence-id"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','recurrent_id'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_4">
<field name="name" ref="base_calendar.field_event_attendee"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','attendee_ids'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_5">
<field name="name" ref="base_calendar.field_event_rrule"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','rrule'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_6">
<field name="name" ref="base_calendar.field_event_dtend"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','date_deadline'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_7">
<field name="name" ref="base_calendar.field_event_valarm"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','caldav_alarm_id'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_8">
<field name="name" ref="base_calendar.field_event_priority"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','priority'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_9">
<field name="name" ref="base_calendar.field_event_location"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','location'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_10">
<field name="name" ref="base_calendar.field_event_exrule"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','exrule'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_11">
<field name="name" ref="base_calendar.field_event_status"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','state'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_12">
<field name="name" ref="base_calendar.field_event_exdate"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','exdate'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_13">
<field name="name" ref="base_calendar.field_event_dtstamp"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','date'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_14">
<field name="name" ref="base_calendar.field_event_description"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','description'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_15">
<field name="name" ref="base_calendar.field_event_dtstart"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','date'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_16">
<field name="name" ref="base_calendar.field_event_class"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','class'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_18">
<field name="name" ref="base_calendar.field_event_created"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','create_date'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_19">
<field name="name" ref="base_calendar.field_event_url"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','caldav_url'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_event_20">
<field name="name" ref="base_calendar.field_event_summary"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','name'),('model_id.model','=','calendar.event')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_1">
<field name="name" ref="base_calendar.field_todo_status"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','state'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_2">
<field name="name" ref="base_calendar.field_todo_exdate"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','exdate'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_3">
<field name="name" ref="base_calendar.field_todo_attendee"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','attendee_ids'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_4">
<field name="name" ref="base_calendar.field_todo_valarm"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','caldav_alarm_id'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_5">
<field name="name" ref="base_calendar.field_todo_description"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','description'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_6">
<field name="name" ref="base_calendar.field_todo_seq"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','sequence'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_7">
<field name="name" ref="base_calendar.field_todo_url"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','caldav_url'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_9">
<field name="name" ref="base_calendar.field_todo_percent"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','progress_rate'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_10">
<field name="name" ref="base_calendar.field_todo_due"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','date_deadline'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_11">
<field name="name" ref="base_calendar.field_todo_summary"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','name'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_12">
<field name="name" ref="base_calendar.field_todo_priority"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','priority'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_13">
<field name="name" ref="base_calendar.field_todo_location"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','location'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_14">
<field name="name" ref="base_calendar.field_todo_exrule"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','exrule'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_15">
<field name="name" ref="base_calendar.field_todo_duration"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','planned_hours'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_16">
<field name="name" ref="base_calendar.field_todo_dtstart"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','date'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_17">
<field name="name" ref="base_calendar.field_todo_rrule"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','rrule'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_18">
<field name="name" ref="base_calendar.field_todo_class"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','class'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_todo_19">
<field name="name" ref="base_calendar.field_todo_uid"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','id'),('model_id.model','=','calendar.todo')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_1">
<field name="name" ref="base_calendar.field_alarm_attendee"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','attendee_ids'),('model_id.model','=','calendar.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_2">
<field name="name" ref="base_calendar.field_alarm_trigger_duration"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','trigger_duration'),('model_id.model','=','res.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_3">
<field name="name" ref="base_calendar.field_alarm_description"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','name'),('model_id.model','=','calendar.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_4">
<field name="name" ref="base_calendar.field_alarm_attach"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','attach'),('model_id.model','=','calendar.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_5">
<field name="name" ref="base_calendar.field_alarm_trigger_occurs"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','trigger_occurs'),('model_id.model','=','res.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_6">
<field name="name" ref="base_calendar.field_alarm_trigger_interval"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','trigger_interval'),('model_id.model','=','res.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_7">
<field name="name" ref="base_calendar.field_alarm_summary"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','description'),('model_id.model','=','calendar.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_8">
<field name="name" ref="base_calendar.field_alarm_duration"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','duration'),('model_id.model','=','res.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_9">
<field name="name" ref="base_calendar.field_alarm_repeat"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','repeat'),('model_id.model','=','res.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_10">
<field name="name" ref="base_calendar.field_alarm_action"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','action'),('model_id.model','=','calendar.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_alarm_11">
<field name="name" ref="base_calendar.field_alarm_trigger_related"/>
<field name="type_id" ref="caldav.calendar_lines_alarm" />
<field name="field_id" search="[('name','=','trigger_related'),('model_id.model','=','res.alarm')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_1">
<field name="name" ref="base_calendar.field_attendee_cn"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','cn'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_2">
<field name="name" ref="base_calendar.field_attendee_sent-by"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','sent_by'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_3">
<field name="name" ref="base_calendar.field_attendee_language"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','language'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_4">
<field name="name" ref="base_calendar.field_attendee_delegated-from"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','delegated_from'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_5">
<field name="name" ref="base_calendar.field_attendee_member"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','member'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_6">
<field name="name" ref="base_calendar.field_attendee_cutype"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','cutype'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_7">
<field name="name" ref="base_calendar.field_attendee_role"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','role'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_8">
<field name="name" ref="base_calendar.field_attendee_partstat"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','state'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_9">
<field name="name" ref="base_calendar.field_attendee_delegated-to"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','delegated_to'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_10">
<field name="name" ref="base_calendar.field_attendee_dir"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','dir'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="map_attendee_11">
<field name="name" ref="base_calendar.field_attendee_rsvp"/>
<field name="type_id" ref="caldav.calendar_lines_attendee" />
<field name="field_id" search="[('name','=','rsvp'),('model_id.model','=','calendar.attendee')]" />
<field name="fn">field</field>
</record>
</data>
</openerp>
+4 -3
View File
@@ -58,8 +58,7 @@ class crm_cases(osv.osv):
mailgate_obj = self.pool.get('mail.gateway')
msg_actions, body_data = mailgate_obj.msg_act_get(msg)
data.update({
'description': body_data,
'history_line': [(0, 0, {'description': body_data, 'email': msg['From']})],
'description': body_data,
})
act = 'case_'+default_act
if 'state' in msg_actions:
@@ -79,7 +78,9 @@ class crm_cases(osv.osv):
if 'partner' in msg_actions:
data['email_from'] = msg_actions['partner'][:128]
res = self.write(cr, uid, ids, data)
res = self.write(cr, uid, ids, data)
cases = self.browse(cr, uid, [res])
self.__history(cr, uid, cases, _('Receive'), history=True, email=msg['From'])
getattr(self,act)(cr, uid, ids)
return res
+25
View File
@@ -27,5 +27,30 @@
<field name="object">crm.meeting</field>
</record>
<!-- Event Attribute mapping-->
<record model="basic.calendar.fields" id="caldav.map_event_4">
<field name="name" ref="base_calendar.field_event_attendee" />
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','attendee_ids'),('model_id.model','=','crm.meeting')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="caldav.map_event_8">
<field name="name" ref="base_calendar.field_event_priority"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','priority'),('model_id.model','=','crm.meeting')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="caldav.map_event_11">
<field name="name" ref="base_calendar.field_event_status"/>
<field name="type_id" ref="caldav.calendar_lines_event" />
<field name="field_id" search="[('name','=','state'),('model_id.model','=','crm.meeting')]" />
<field name="fn">field</field>
</record>
</data>
</openerp>
+362 -333
View File
File diff suppressed because it is too large Load Diff
+657 -402
View File
File diff suppressed because it is too large Load Diff
+10 -10
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: 2010-01-05 05:59+0000\n"
"PO-Revision-Date: 2010-01-21 00:53+0000\n"
"PO-Revision-Date: 2010-01-23 18:58+0000\n"
"Last-Translator: pedrobom <pedrobomlimeira@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-01-22 04:34+0000\n"
"X-Launchpad-Export-Date: 2010-01-24 04:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -987,7 +987,7 @@ msgstr ""
#: model:ir.ui.menu,name:crm.menu_crm_case_opp
#: model:process.node,name:crm.process_node_opportunities0
msgid "Opportunities"
msgstr ""
msgstr "Oportunidades"
#. module: crm
#: help:crm.segmentation,name:0
@@ -1051,13 +1051,13 @@ msgstr ""
#. module: crm
#: wizard_field:crm.new.send.mail,init,state:0
msgid "Set State to"
msgstr ""
msgstr "Define Estado para"
#. module: crm
#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid "There is no mail to reply!"
msgstr ""
msgstr "Não há email para resposta!"
#. module: crm
#: wizard_button:crm.job.partner_create,init,confirm:0
@@ -1082,7 +1082,7 @@ msgstr "%(case_description)s = Descrição de Caso"
#. module: crm
#: view:crm.fundraising:0
msgid "My Funds"
msgstr ""
msgstr "Meus Fundos"
#. module: crm
#: field:crm.case,partner_mobile:0
@@ -1108,12 +1108,12 @@ msgstr "Processo Histórico"
#. module: crm
#: model:crm.case.categ,name:crm.categ_job2
msgid "Junior Developer"
msgstr ""
msgstr "Desenvolvedor júnior"
#. module: crm
#: view:crm.meeting:0
msgid "My Meetings"
msgstr ""
msgstr "Minhas Reuniões"
#. module: crm
#: field:crm.case.categ,name:0
@@ -1123,7 +1123,7 @@ msgstr "Nome da Categoria do Case"
#. module: crm
#: model:crm.case.category2,name:crm.category_claim2
msgid "Preventive"
msgstr ""
msgstr "Preventivo"
#. module: crm
#: field:crm.case.rule,act_email_cc:0
@@ -1161,7 +1161,7 @@ msgstr ""
#: view:crm.meeting:0
#, python-format
msgid "Meetings"
msgstr ""
msgstr "Reuniões"
#. module: crm
#: view:crm.case.rule:0
+2 -1
View File
@@ -36,8 +36,9 @@ class document_directory_content(osv.osv):
return super(document_directory_content, self).process_write(cr, uid, node, data, context)
content = self.browse(cr, uid, node.cnt_id, context)
fobj = self.pool.get(content.object_id.model)
if not context:
context = {}
fobj.import_cal(cr, uid, base64.encodestring(data), context=context)
return True
def process_read(self, cr, uid, node, context=None):
+1
View File
@@ -20,5 +20,6 @@
##############################################################################
import document_change
import document_change_mailgate
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+102 -51
View File
@@ -35,7 +35,7 @@ class document_change_type(osv.osv):
_columns = {
'name': fields.char("Document Change Type", size=64,required=True),
'phase_type_ids': fields.many2many('document.change.process.phase.type','document_process__rel','type_id','change_id','Phase Type'),
'phase_type_ids': fields.many2many('document.change.process.phase.type','document_type_phase_type_rel','document_type_id','phase_type_id','Phase Type'),
'template_document_id':fields.many2one('ir.attachment','Document')
}
document_change_type()
@@ -48,7 +48,7 @@ class doucment_change_process_phase_type(osv.osv):
'name': fields.char("Document Changed Process Type", size=64),
'sequence': fields.integer('Sequence'),
'active': fields.boolean('Active'),
'document_type_ids': fields.many2many('document.change.type','document_phase_process__rel','phase_id','document_id','Document'),
'document_type_ids': fields.many2many('document.change.type','phase_type_document_type_rel','phase_type_id','document_type_id','Document Type'),
}
doucment_change_process_phase_type()
@@ -67,8 +67,8 @@ class doucment_change_process_phase(osv.osv):
'update_document': fields.selection([('at_endPhase', 'End Phase'),('at_endprocess', 'End Process')], 'Update Document', required=True),
'type': fields.selection([('control_required', 'Control Required'),('no_control', 'No Control')], 'Type'),
'date_control': fields.date('Control Date', select=True),
'phase_ids':fields.many2one('document.change.process.phase','Phase Type'),
'state': fields.selection([('draft', 'Draft'),('in_process', 'Started'),('validate', 'To Validate'),('pending', 'Pending'), ('done', 'Done')], 'Status',readonly=True),
'phase_type_id':fields.many2one('document.change.process.phase.type','Phase Type'),
'state': fields.selection([('draft', 'Draft'),('in_process', 'Started'),('to_validate', 'To Validate'),('done', 'Done')], 'State',readonly=True),
'phase_document_ids':fields.many2many('ir.attachment','phase_document_rel','phase_id','document_id','Document'),
}
_defaults = {
@@ -76,19 +76,19 @@ class doucment_change_process_phase(osv.osv):
'update_document': lambda *a:'at_endPhase',
'type':lambda *a: 'no_control',
}
def state_draft_set(self, cr, uid, ids, *args):
def do_draft(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'draft'})
return True
def state_validate_set(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'validate'})
def do_confirm(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'to_validate'})
return True
def state_started_set(self, cr, uid, ids, *args):
def do_start(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'in_process'})
return True
def state_pending_set(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'pending'})
return True
def state_done_set(self, cr, uid, ids, *args):
return True
def do_done(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'done'})
return True
@@ -101,43 +101,10 @@ class document_change_process_model(osv.osv):
_columns = {
'name': fields.char("Changed Process Model", size=64,required=True),
'sequence': fields.integer('Sequence'),
'phase_type_ids':fields.many2many('document.change.process.phase.type','phase_type_rel','phase_id','phase_model_id','Process Type'),
'phase_type_ids':fields.many2many('document.change.process.phase.type','process_model_phase_type_rel','process_model_id','phase_type_id','Phase Type'),
}
document_change_process_model()
class document_file(osv.osv):
_inherit = 'ir.attachment'
_columns = {
'type_id':fields.many2one('document.change.type','Document Type'),
'state': fields.selection([('change_request', 'Change Request'),('change_proposed', 'Change Proposed'), ('in_production', 'In Production'), ('to_update', 'To Update'), ('validate', 'To Validate'), ('cancel', 'Cancel')], 'Status'),
'target_document_id': fields.many2one('document.directory', 'Target Document'),
'target':fields.binary('Target'),
}
_defaults = {
'state': lambda *a: 'change_request',
}
def state_set_request(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'change_request'},context=context)
return True
def state_set_proposed(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'change_proposed'},context=context)
return True
def state_set_in_production(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'in_production'})
return True
def state_set_update(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'to_update'})
return True
def state_set_validated(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'validate'},context=context)
return True
def state_set_cancel(self, cr, uid, ids, context={}):
return self.write(cr, uid, ids, {'state':'cancel'},context=context)
document_file()
class document_change_process_type(osv.osv):
_name = "document.change.process.type"
_description = "Document Change Process Type"
@@ -157,6 +124,7 @@ class document_change_process_email(osv.osv):
'process_id':fields.many2one('document.change.process','Process Change'),
}
document_change_process_email()
class doucment_change_process(osv.osv):
_name = "document.change.process"
@@ -178,15 +146,98 @@ class doucment_change_process(osv.osv):
'create_date':fields.datetime('Creation',readonly=True),
'latest_modified_date':fields.function(_latestmodification, method=True, type='date', string="Lastest Modification"), #TODO no year!
'date_expected':fields.datetime('Expected Production'),
'state':fields.selection([('draft', 'Draft'),('progress', 'Progress'),('confirmed', 'To Validate'), ('done', 'Done'),('cancel','Cancelled')], 'Status', readonly=True),
'process_phase_ids':fields.one2many('document.change.process.phase','process_id','Phase'),
'state':fields.selection([('draft', 'Draft'),('in_progress', 'In Progress'),('to_validate', 'To Validate'), ('pending', 'Pending'), ('done', 'Done'),('cancel','Cancelled')], 'state', readonly=True),
'process_phase_ids':fields.one2many('document.change.process.phase','process_id','Phase'),
'pending_directory_id' :fields.many2one('document.directory','Pending Directory ID'),
'date_control': fields.date('Control Date'), #TODO: make relate field with current_phase_id.date_control
'progress': fields.float('Progress'), #TODO : functio field: calculate progress
'current_phase_id': fields.many2one('document.change.process.phase','Current Phase'), # TODO: function field. find out in process phase
'process_document_ids': fields.many2many('ir.attachment','document_changed_process_rel','process_id','change_id','Document To Change'),
'pending_directory_id' :fields.many2one('document.directory','Pending Directory ID'),
'email_notification_ids':fields.one2many('document.change.process.mail','process_id','Notifications'),
}
_defaults = {
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'document.change.process'),
'state': lambda *a: 'draft',
}
def do_start(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'in_progress'},context=context)
return True
def do_pending(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'pending'},context=context)
return True
def do_confirm(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'to_validate'},context=context)
return True
def do_done(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'done'},context=context)
return True
def do_cancel(self, cr, uid, ids, context={}):
return self.write(cr, uid, ids, {'state':'cancel'},context=context)
def generate_phases(self, cr, uid, ids, *args):
phase_obj = self.pool.get('document.change.process.phase')
phase_type_obj = self.pool.get('document.change.process.phase.type')
document_type_obj = self.pool.get('document.change.type')
document_obj = self.pool.get('ir.attachment')
for process in self.browse(cr, uid, ids):
if process.process_model_id:
for phase_type_id in process.process_model_id.phase_type_ids:
phase_type = phase_type_obj.browse(cr, uid, phase_type_id)
phase_value = {
'name' : '%s-%s' %(phase_type, process.name),
'phase_type_id': phase_type_id,
'process_id': process.id
}
phase_id = phase_obj.create(cr, uid, phase_value)
cr.execute('select document_type_id from document_type_phase_type_rel where phase_type_id = %s' ,phase_type_id)
document_type_ids = map(lambda x: x[0], cr.fetchall())
document_ids = document_obj.search(cr, uid, [
('parent_id','=',process.structure_id and process.structure_id.id),
('change_type_id','in',document_type_ids)])
for document_id in document_ids:
vals = {'process_phase_id':phase_id}
if process.pending_directory_id:
vals.update({'parent_id':process.pending_directory_id.id})
document_obj.copy(cr, uid, document_id, vals)
doucment_change_process()
class document_file(osv.osv):
_inherit = 'ir.attachment'
_columns = {
'change_type_id':fields.many2one('document.change.type','Document Type'),
'state': fields.selection([('in_production', 'In Production'), ('change_request', 'Change Request'),('change_propose', 'Change Proposed'), ('to_update', 'To Update'), ('cancel', 'Cancel')], 'State'),
'target_directory_id': fields.many2one('document.directory', 'Target Document'),
'target_document_id':fields.binary('Target'),
'process_phase_id' :fields.many2one('document.change.process.phase','Process Phase'),
'progress': fields.float('Progress'), #TODO : functio field: calculate progress
'change_process_id': fields.related('process_phase_id', 'process_id', type='many2one', relation='document.change.process', string='Change Process'),
}
_defaults = {
'state': lambda *a: 'in_production',
}
def do_change_request(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'change_request'},context=context)
return True
def do_change_propose(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'change_propose'},context=context)
return True
def do_to_update(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'to_update'},context=context)
return True
def do_production(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'in_production'},context=context)
return True
def do_cancel(self, cr, uid, ids, context={}):
return self.write(cr, uid, ids, {'state':'cancel'},context=context)
document_file()
@@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import re
import os
import mx.DateTime
import base64
from tools.translate import _
import tools
from osv import fields,osv,orm
from osv.orm import except_orm
class document_file(osv.osv):
_inherit = "ir.attachment"
_columns = {
'email_notification_ids':fields.one2many('document.email.notes','document_id','Phase', readonly=True),
}
def msg_new(self, cr, uid, msg):
raise Exception(_('Sorry, Not Allowed to create document'))
return False
def msg_update(self, cr, uid, id, msg, data={}, default_act='pending'):
mailgate_obj = self.pool.get('mail.gateway')
msg_actions, body_data = mailgate_obj.msg_act_get(msg)
email_notify_data = {
'name' : msg['Subject'],
'description' : body_data,
'email' : msg['From'],
}
data.update({
'email_notification_ids': [(0, 0, email_notify_data)],
})
res = self.write(cr, uid, [id], data)
return res
def emails_get(self, cr, uid, ids, context={}):
res = []
if isinstance(ids, (str, int, long)):
select = [ids]
else:
select = ids
for document in self.browse(cr, uid, select):
user_email = (document.user_id and document.user_id.address_id and document.user_id.address_id.email) or False
res += [(user_email, False, False, False)]
if isinstance(ids, (str, int, long)):
return len(res) and res[0] or False
return res
def msg_send(self, cr, uid, id, *args, **argv):
return True
document_file()
class document_email_notes(osv.osv):
_name = "document.email.notes"
_description = "EMail Conversation Detail"
def _note_get(self, cursor, user, ids, name, arg, context=None):
res = {}
for hist in self.browse(cursor, user, ids, context or {}):
res[hist.id] = (hist.email or '/') + ' (' + str(hist.create_date) + ')\n'
res[hist.id] += (hist.description or '')
return res
_columns = {
'name': fields.char("Name", size=64, required=True, select=True),
'description': fields.text('Description'),
'note': fields.function(_note_get, method=True, string="Description", type="text"),
'email': fields.char('Email', size=84),
'create_date': fields.datetime('Created Date'),
'action': fields.char('Action', size=64),
'document_id': fields.many2one('ir.attachment','Document', required=True),
}
document_email_notes()
+65 -66
View File
@@ -74,7 +74,8 @@
<field name="arch" type="xml">
<form string="Document Types">
<field name="name" select="1"/>
<field name="phase_type_ids" colspan="4"/>
<separator string="Associated Phase Types" colspan="4"/>
<field name="phase_type_ids" colspan="4" nolabel="1"/>
</form>
</field>
</record>
@@ -85,8 +86,7 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Document Types">
<field name="name"/>
<field name="phase_type_ids"/>
<field name="name"/>
</tree>
</field>
</record>
@@ -189,7 +189,8 @@
<form string="Model of Changes">
<field name="name" select="1"/>
<field name="sequence"/>
<field name="phase_type_ids" colspan="4"/>
<separator string="Phase Type" colspan="4"/>
<field name="phase_type_ids" colspan="4" nolabel="1"/>
</form>
</field>
</record>
@@ -199,10 +200,9 @@
<field name="model">document.change.process.model</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Model of Changes">
<field name="name"/>
<tree string="Model of Changes">
<field name="sequence"/>
<field name="phase_type_ids"/>
<field name="name"/>
</tree>
</field>
</record>
@@ -232,20 +232,20 @@
<newline/>
<field name="datas_fname"/>
<field name="datas" filename="datas_fname" string="Content"/>
<field name="type_id"/>
<field name="change_type_id"/>
</group>
<separator string="Change Control" colspan="4"/>
<group col="7" colspan="4">
<field name="state"/>
<button name="button_change_proposed" states="cancel,to_update" string="Request Change" icon="gtk-apply"/>
<button name="button_change_validated" states="change_request,validate,cancel" string="Propose Change" icon="gtk-apply"/>
<button name="button_update" states="change_proposed,in_production" string="To Update" icon="gtk-ok" />
<button name="button_change_request" states="to_update" string="In Production" icon="gtk-media-play"/>
<button name="button_cancel" states="change_request,change_proposed" string="Cancel" icon="gtk-cancel"/>
<field name="state" readonly="1"/>
<button name="button_propose" states="change_request" string="Propose Change" icon="gtk-apply"/>
<button name="button_confirm" states="change_propose" string="To Validate" icon="gtk-apply"/>
<button name="button_validate" states="to_update" string="In Production" icon="gtk-apply"/>
<button name="button_request" states="cancel,in_production" string="Request Change" icon="gtk-media-play"/>
<button name="button_cancel" states="change_request,change_propose" string="Cancel" icon="gtk-cancel"/>
</group>
<newline/>
<field name="target_document_id"/>
<field name="target"/>
<field name="target_directory_id"/>
<field name="target_document_id"/>
<newline/>
<separator string="Change Note" colspan="4"/>
<field colspan="4" name="description" nolabel="1"/>
@@ -259,6 +259,21 @@
<field name="write_date" readonly="1"/>
<field name="write_uid" readonly="1"/>
</group>
<field name="email_notification_ids" colspan="4" mode="tree, form" readonly="1" widget="one2many_list" nolabel="1">
<tree string="Notifications">
<field name="email"/>
<field name="create_date"/>
</tree>
<form string="Notifications">
<field name="email"/>
<field name="create_date"/>
<field name="name" string="Subject" colspan="4"/>
<separator string="Description" colspan="4"/>
<field colspan="4" name="description" nolabel="1"/>
</form>
</field>
</form>
</field>
</record>
@@ -269,12 +284,11 @@
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<tree string="Documents">
<field name="name" string="Document Name"/>
<field name="partner_id"/>
<field name="datas_fname"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="parent_id" string="Directory"/>
<field name="change_type_id" string="Type"/>
<field name="state"/>
<field name="change_process_id" string="Proc Chg #"/>
<field name="user_id" string="Owner"/>
</tree>
</field>
</record>
@@ -284,7 +298,7 @@
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Documents by type" type="bar" orientation="vertical">
<field name="type_id"/>
<field name="change_type_id"/>
<field name="name" operator="+"/>
</graph>
</field>
@@ -297,9 +311,9 @@
<field name="arch" type="xml">
<search string="Documents">
<group col="7" colspan="4">
<filter domain="[('state','=','change_request')]" string="To Change" icon="gtk-apply" help="Documents in state Change Requested"/>
<filter domain="[('state','=','change_proposed')]" string="To Validate" icon="gtk-execute" help="Documents in state Change Proposed"/>
<field name="type_id" string="Type of Documents" select="1"/>
<filter domain="[('state','=','change_request')]" string="To Change" icon="gtk-apply"/>
<filter domain="[('state','=','to_update')]" string="To Validate" icon="gtk-execute"/>
<field name="change_type_id" string="Type of Documents" select="1"/>
<field name="parent_id" select="1"/>
<field name="create_uid" string="Owner" select="1"/>
</group>
@@ -359,7 +373,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_document_tree"/>
<field name="domain">[('state','=','change_proposed')]</field>
<field name="domain">[('state','=','to_update')]</field>
</record>
<menuitem action="action_document_to_update_form" id="menu_documents_to_update_form" parent="menu_change_control"/>
@@ -380,7 +394,7 @@
<field name="update_document" string="Update documents"/>
<field name="type" string="Type"/>
<field name="date_control" string="Control date" attrs="{'required':[('type','=','control_required')], 'invisible': [('type','!=','control_required')]}"/>
<field name="phase_ids" string="Phase Type"/>
<field name="phase_type_id" string="Phase Type"/>
</group>
<separator colspan="4" string="Documents"/>
<field name="phase_document_ids" colspan="4" nolabel="1"/>
@@ -388,10 +402,8 @@
<group col="5" colspan="4">
<field name="state"/>
<button name="button_start" states="draft" string="Start" icon="gtk-go-forward"/>
<button name="button_validate" states="started" string="Validate" icon="gtk-execute"/>
<button name="button_pending" states="pending" string="Pending" icon="gtk-execute"/>
<button name="button_done" states="done" string="Done" icon="gtk-jump-to"/>
<button name="button_progress" states="validate" string="Done" icon="gtk-jump-to"/>
<button name="button_confirm" states="in_process" string="To Validate" icon="gtk-execute"/>
<button name="button_end" states="to_validate" string="Done" icon="gtk-jump-to"/>
</group>
</form>
</field>
@@ -449,7 +461,10 @@
<field name="structure_id" select="1"/>
<newline/>
<field name="description"/>
<field name="process_model_id" widget="selection"/>
<group colspan="2" col="3">
<field name="process_model_id" widget="selection"/>
<button name="generate_phases" string="Generate Phases" type="object" icon="gtk-convert"/>
</group>
<field name="pending_directory_id"/>
</group>
<notebook colspan="4">
@@ -470,10 +485,10 @@
<newline/>
<group col="6" colspan="4">
<field name="state"/>
<button name="button_in_progress" states="draft" string="Start" icon="gtk-go-forward"/>
<button name="button_validate" states="progress" string="Validate" icon="gtk-execute"/>
<button name="button_pending" states="progress,confirmed" string="Pending" icon="gtk-media-pause"/>
<button name="button_done" states="confirmed" string="Done" icon="gtk-jump-to"/>
<button name="button_start" states="draft,pending" string="Start" icon="gtk-go-forward"/>
<button name="button_confirm" states="in_progress" string="Validate" icon="gtk-execute"/>
<button name="button_pending" states="in_progress" string="Pending" icon="gtk-media-pause"/>
<button name="button_done" states="to_validate" string="Done" icon="gtk-jump-to"/>
</group>
</page>
<page string="Phases">
@@ -491,31 +506,12 @@
<field name="state"/>
</form>
</field>
</page>
<page string="Documents">
<field name="process_document_ids" mode="tree,form" colspan="4" nolabel="1">
<tree string="Documents">
<field name="name" string="Document Name"/>
<field name="state"/>
</tree>
<form string="Documents">
<field name="name" string="Document Name"/>
<field name="state"/>
</form>
</page>
<page string="Documents">
<field name="process_document_ids">
</field>
</page>
<page string="Notifications">
<field name="email_notification_ids" mode="tree,form" widget="one2many_list" nolabel="1">
<tree string="Notifications" editable="True">
<field name="name"/>
<field name="type"/>
</tree>
<form string="Notifications">
<field name="name"/>
<field name="type"/>
</form>
</field>
</page>
</notebook>
</form>
</field>
@@ -527,12 +523,15 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Process Change">
<field name="name"/>
<field name="process_type_id"/>
<field name="structure_id"/>
<field name="description"/>
<field name="name" string="Proc Chg #"/>
<field name="description" string="Proc Chg Title"/>
<field name="user_id" string="Owner"/>
<field name="current_phase_id" string="Current Phase"/>
<field name="date_control" string="Date Control Point"/>
<field name="process_model_id"/>
<field name="state"/>
<field name="progress" string="Progress"/>
<field name="process_document_ids" string="# Documents"/>
</tree>
</field>
</record>
@@ -546,7 +545,7 @@
<field name="process_document_ids" operator="+"/>
</graph>
</field>
</record>
</record>
<record model="ir.ui.view" id="view_process_serach">
<field name="name">document.change.process.search</field>
<field name="model">document.change.process</field>
@@ -556,7 +555,7 @@
<search string="Process Changes">
<group col="8" colspan="4">
<filter domain="[('user_id','=',uid)]" string="My Process Changes" icon="gtk-execute" help="My Process Changes"/>
<filter domain="[('state','=','validate')]" string="To Validate" icon="gtk-apply" help="Process Changes to be validated"/>
<filter domain="[('state','=','to_validate')]" string="To Validate" icon="gtk-apply" help="Process Changes to be validated"/>
<filter domain="[('state','=','in_progress')]" string="Late" icon="gtk-execute" help="Process changes having the next Phase to validate that is late"/>
<field name="name" string="Process Change Title" select="1"/>
<field name="process_type_id" select="1"/>
@@ -604,4 +603,4 @@
src_model="document.change.process"/>
</data>
</openerp>
</openerp>
@@ -8,72 +8,74 @@
</record>
<!-- States -->
<record id="act_request" model="workflow.activity">
<record id="act_document_production" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="flow_start">True</field>
<field name="name">state_set_request</field>
<field name="name">in_production</field>
<field name="action">do_production()</field>
<field name="kind">function</field>
</record>
<record id="act_propose" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="name">change_proposed</field>
<field name="action">state_set_proposed()</field>
<record id="act_document_request" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="name">change_request</field>
<field name="action">do_change_request()</field>
<field name="kind">function</field>
</record>
<record id="act_update" model="workflow.activity">
<record id="act_document_propose" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="name">change_propose</field>
<field name="action">do_change_propose()</field>
<field name="kind">function</field>
</record>
<record id="act_document_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="name">to_update</field>
<field name="action">state_set_update()</field>
<field name="action">do_to_update()</field>
<field name="kind">function</field>
</record>
<record id="act_production" model="workflow.activity">
</record>
<record id="act_document_cancel" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="name">in_production</field>
<field name="action">state_set_in_production()</field>
<field name="kind">function</field>
</record>
<record id="act_cancel" model="workflow.activity">
<field name="wkf_id" ref="wkf_attachment"/>
<field name="name">cancel</field>
<field name="action">state_set_cancel()</field>
<field name="kind">function</field>
</record>
<field name="name">cancel</field>
<field name="action">do_cancel()</field>
<field name="kind">function</field>
</record>
<!-- Transitions -->
<record id="request_to_propose" model="workflow.transition">
<field name="act_from" ref="act_request"/>
<field name="act_to" ref="act_propose"/>
<field name="signal">button_change_proposed</field>
<record id="tran_document_production_to_request" model="workflow.transition">
<field name="act_from" ref="act_document_production"/>
<field name="act_to" ref="act_document_request"/>
<field name="signal">button_request</field>
</record>
<record id="tran_document_request_to_propose" model="workflow.transition">
<field name="act_from" ref="act_document_request"/>
<field name="act_to" ref="act_document_propose"/>
<field name="signal">button_propose</field>
<field name="condition">(target_document_id != False)</field>
</record>
<record id="request_to_cancel" model="workflow.transition">
<field name="act_from" ref="act_request"/>
<field name="act_to" ref="act_cancel"/>
<record id="tran_document_request_to_cancel" model="workflow.transition">
<field name="act_from" ref="act_document_request"/>
<field name="act_to" ref="act_document_cancel"/>
<field name="signal">button_cancel</field>
</record>
<record id="propose_to_update" model="workflow.transition">
<field name="act_from" ref="act_propose"/>
<field name="act_to" ref="act_update"/>
<field name="signal">button_change_validated</field>
<record id="tran_document_propose_to_confirm" model="workflow.transition">
<field name="act_from" ref="act_document_propose"/>
<field name="act_to" ref="act_document_confirm"/>
<field name="signal">button_confirm</field>
</record>
<record id="propose_to_cancel" model="workflow.transition">
<field name="act_from" ref="act_propose"/>
<field name="act_to" ref="act_cancel"/>
<record id="tran_document_propose_to_cancel" model="workflow.transition">
<field name="act_from" ref="act_document_propose"/>
<field name="act_to" ref="act_document_cancel"/>
<field name="signal">button_cancel</field>
</record>
<record id="cancel_to_request" model="workflow.transition">
<field name="act_from" ref="act_cancel"/>
<field name="act_to" ref="act_request"/>
<field name="signal">button_change_request</field>
</record>
<record id="update_to_production" model="workflow.transition">
<field name="act_from" ref="act_update"/>
<field name="act_to" ref="act_production"/>
<field name="signal">button_update</field>
</record>
<record id="production_to_request" model="workflow.transition">
<field name="act_from" ref="act_production"/>
<field name="act_to" ref="act_request"/>
<field name="signal">button_change_request</field>
<record id="tran_document_cancel_to_request" model="workflow.transition">
<field name="act_from" ref="act_document_cancel"/>
<field name="act_to" ref="act_document_request"/>
<field name="signal">button_request</field>
</record>
<record id="tran_document_confirm_to_production" model="workflow.transition">
<field name="act_from" ref="act_document_confirm"/>
<field name="act_to" ref="act_document_production"/>
<field name="signal">button_validate</field>
</record>
</data>
</openerp>
</openerp>
@@ -8,45 +8,45 @@
</record>
<!-- States -->
<record id="act_draft" model="workflow.activity">
<record id="act_phase_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process_phase"/>
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<record id="act_start" model="workflow.activity">
<record id="act_phase_start" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process_phase"/>
<field name="name">started</field>
<field name="action">state_started_set()</field>
<field name="name">in_process</field>
<field name="action">do_start()</field>
<field name="kind">function</field>
</record>
<record id="act_validate" model="workflow.activity">
<record id="act_phase_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process_phase"/>
<field name="name">validate</field>
<field name="action">state_validate_set()</field>
<field name="name">to_validate</field>
<field name="action">do_confirm()</field>
<field name="kind">function</field>
</record>
<record id="act_end" model="workflow.activity">
<record id="act_phase_end" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process_phase"/>
<field name="name">end</field>
<field name="action">state_done_set()</field>
<field name="name">done</field>
<field name="action">do_done()</field>
<field name="kind">function</field>
</record>
<!-- Transitions -->
<record id="draft_to_start" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_start"/>
<record id="tran_phase_draft_to_start" model="workflow.transition">
<field name="act_from" ref="act_phase_draft"/>
<field name="act_to" ref="act_phase_start"/>
<field name="signal">button_start</field>
</record>
<record id="start_to_validate" model="workflow.transition">
<field name="act_from" ref="act_start"/>
<field name="act_to" ref="act_validate"/>
<field name="signal">button_validate</field>
<record id="tran_phase_start_to_confirm" model="workflow.transition">
<field name="act_from" ref="act_phase_start"/>
<field name="act_to" ref="act_phase_confirm"/>
<field name="signal">button_confirm</field>
</record>
<record id="validate_to_end" model="workflow.transition">
<field name="act_from" ref="act_validate"/>
<field name="act_to" ref="act_end"/>
<record id="tran_phase_confirm_to_end" model="workflow.transition">
<field name="act_from" ref="act_phase_confirm"/>
<field name="act_to" ref="act_phase_end"/>
<field name="signal">button_end</field>
</record>
</data>
</openerp>
</openerp>
@@ -2,67 +2,67 @@
<openerp>
<data>
<record id="wkf_change_process" model="workflow">
<field name="name">document.change.process.phase.basic</field>
<field name="osv">document.change.process.phase</field>
<field name="name">document.change.process.basic</field>
<field name="osv">document.change.process</field>
<field name="on_create">True</field>
</record>
<!-- States -->
<record id="act_draft" model="workflow.activity">
<record id="act_process_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<record id="act_in_progress" model="workflow.activity">
<record id="act_process_in_progress" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">in_progress</field>
<field name="action">state_started_set()</field>
<field name="action">do_start()</field>
<field name="kind">function</field>
</record>
<record id="act_pending" model="workflow.activity">
<record id="act_process_pending" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">pending</field>
<field name="action">state_pending_set()</field>
<field name="action">do_pending()</field>
<field name="kind">function</field>
</record>
<record id="act_validate" model="workflow.activity">
<record id="act_process_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">validate</field>
<field name="action">state_validate_set()</field>
<field name="name">to_validate</field>
<field name="action">do_confirm()</field>
<field name="kind">function</field>
</record>
<record id="act_done" model="workflow.activity">
<record id="act_process_done" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">done</field>
<field name="action">state_done_set()</field>
<field name="action">do_done()</field>
<field name="kind">function</field>
</record>
<!-- Transitions -->
<record id="draft_to_progress" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_in_progress"/>
<record id="tran_process_draft_to_progress" model="workflow.transition">
<field name="act_from" ref="act_process_draft"/>
<field name="act_to" ref="act_process_in_progress"/>
<field name="signal">button_start</field>
</record>
<record id="progress_to_pending" model="workflow.transition">
<field name="act_from" ref="act_in_progress"/>
<field name="act_to" ref="act_pending"/>
<record id="tran_process_progress_to_pending" model="workflow.transition">
<field name="act_from" ref="act_process_in_progress"/>
<field name="act_to" ref="act_process_pending"/>
<field name="signal">button_pending</field>
</record>
<record id="pending_to_progress" model="workflow.transition">
<field name="act_from" ref="act_pending"/>
<field name="act_to" ref="act_in_progress"/>
<field name="signal">button_progress</field>
<record id="tran_process_pending_to_progress" model="workflow.transition">
<field name="act_from" ref="act_process_pending"/>
<field name="act_to" ref="act_process_in_progress"/>
<field name="signal">button_start</field>
</record>
<record id="progress_to_validate" model="workflow.transition">
<field name="act_from" ref="act_in_progress"/>
<field name="act_to" ref="act_validate"/>
<field name="signal">button_validate</field>
<record id="tran_process_progress_to_confirm" model="workflow.transition">
<field name="act_from" ref="act_process_in_progress"/>
<field name="act_to" ref="act_process_confirm"/>
<field name="signal">button_confirm</field>
</record>
<record id="validate_to_end" model="workflow.transition">
<field name="act_from" ref="act_validate"/>
<field name="act_to" ref="act_end"/>
<record id="tran_process_confirm_to_end" model="workflow.transition">
<field name="act_from" ref="act_process_confirm"/>
<field name="act_to" ref="act_process_done"/>
<field name="signal">button_done</field>
</record>
</data>
</openerp>
</openerp>
+19 -19
View File
@@ -7,95 +7,95 @@ 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-09 13:39+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-22 15:14+0000\n"
"Last-Translator: Carlo <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-23 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: event
#: field:event.event,date_end:0
#: field:report.event.registration,date_end:0
msgid "Ending date"
msgstr ""
msgstr "Data di Fine"
#. module: event
#: field:event.event,register_min:0
msgid "Minimum Registrations"
msgstr ""
msgstr "Registrazioni Minime"
#. module: event
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nome del modulo non valido nella definizione dell'azione."
#. module: event
#: field:event.event,mail_registr:0
msgid "Registration Email"
msgstr ""
msgstr "Email di registrazione"
#. module: event
#: model:crm.case.section,name:event.event_0_crm_case_section
msgid "Concert of Bon Jovi"
msgstr ""
msgstr "Concerto di Bon Jovi"
#. module: event
#: field:event.event,mail_confirm:0
msgid "Confirmation Email"
msgstr ""
msgstr "Email di conferma"
#. module: event
#: constraint:crm.case.section:0
msgid "Error ! You cannot create recursive sections."
msgstr ""
msgstr "Errore! Non è possibile creare sezioni ricorsive."
#. module: event
#: model:ir.model,name:event.model_event_registration
msgid "Event Registration"
msgstr ""
msgstr "Registrazione Evento"
#. module: event
#: model:ir.actions.wizard,name:event.event_reg_invoice
msgid "Make Invoice"
msgstr ""
msgstr "Crea Fattura"
#. module: event
#: field:report.event.type.registration,draft_state:0
msgid "Draft Registrations"
msgstr ""
msgstr "Bozza Registrazione"
#. module: event
#: view:report.event.registration:0
msgid "Event on Registration"
msgstr ""
msgstr "Evento su Registrazione"
#. module: event
#: wizard_button:event.reg_make_invoice,init,end:0
msgid "Ok"
msgstr ""
msgstr "OK"
#. module: event
#: field:event.event,mail_auto_confirm:0
msgid "Mail Auto Confirm"
msgstr ""
msgstr "Mail di Auto Conferma"
#. module: event
#: model:product.template,name:event.event_product_1_product_template
msgid "Ticket for Opera"
msgstr ""
msgstr "Biglietti per l'Opera"
#. module: event
#: wizard_field:event.reg_make_invoice,init,inv_rejected:0
msgid "Invoice Rejected"
msgstr ""
msgstr "Fattura Rifiutata"
#. module: event
#: view:event.event:0
msgid "Confirm Event"
msgstr ""
msgstr "Conferma Evento"
#. module: event
#: model:crm.case.section,name:event.event_1_crm_case_section
+6 -6
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.1\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 11:11+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-23 16:46+0000\n"
"Last-Translator: Sebastien LANGE - http://www.Syleam.fr <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:15+0000\n"
"X-Launchpad-Export-Date: 2010-01-24 04:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
@@ -105,11 +105,11 @@ msgstr "Intervention senior sur site"
#. module: product
#: help:product.supplierinfo,qty:0
msgid ""
"The minimal quantity to purchase for this supplier, expressed in the purchase "
"The minimal quantity to purchase for this supplier, expressed in the default "
"unit of measure."
msgstr ""
"La quantité minimum d'achat pour ce fournisseur, exprimée dans l'unité de "
"mesure d'achat"
"mesure par défaut"
#. module: product
#: field:product.template,weight_net:0
@@ -213,7 +213,7 @@ msgstr "Société"
#. module: product
#: field:product.template,rental:0
msgid "Rentable Product"
msgstr "Produit Rentable"
msgstr "Peut être loué"
#. module: product
#: field:product.product,lst_price:0
+17 -14
View File
@@ -7,24 +7,24 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-16 16:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-23 00:08+0000\n"
"Last-Translator: Balint (eSolve) <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:15+0000\n"
"X-Launchpad-Export-Date: 2010-01-24 04:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
#: view:product.pricelist.item:0
msgid "Max. Margin"
msgstr "Maximum margó"
msgstr "Max. árrés"
#. module: product
#: view:product.pricelist.item:0
msgid "Base Price"
msgstr ""
msgstr "Alapár"
#. module: product
#: help:product.template,standard_price:0
@@ -36,7 +36,7 @@ msgstr ""
#. module: product
#: selection:product.template,type:0
msgid "Service"
msgstr ""
msgstr "Szolgáltatás"
#. module: product
#: help:product.template,purchase_ok:0
@@ -44,11 +44,12 @@ msgid ""
"Determine if the product is visible in the list of products within a "
"selection from a purchase order line."
msgstr ""
"Meghatározza, hogy a termék választható-e beszerzési rendelések készítésénél."
#. module: product
#: help:product.supplierinfo,name:0
msgid "Supplier of this product"
msgstr ""
msgstr "Termék szállítója"
#. module: product
#: model:product.template,name:product.product_product_ram512_product_template
@@ -65,12 +66,12 @@ msgstr ""
msgid ""
"The minimal quantity to purchase for this supplier, expressed in the default "
"unit of measure."
msgstr ""
msgstr "Minimális beszerzési mennyiség, alap mértékegységben kifejezve"
#. module: product
#: field:product.template,weight_net:0
msgid "Net weight"
msgstr ""
msgstr "Nettó súly"
#. module: product
#: help:product.product,incoming_qty:0
@@ -90,7 +91,7 @@ msgstr ""
#. module: product
#: field:product.packaging,width:0
msgid "Width"
msgstr ""
msgstr "Szélesség"
#. module: product
#: help:product.pricelist.item,product_tmpl_id:0
@@ -98,11 +99,13 @@ msgid ""
"Set a template if this rule only apply to a template of product. Keep empty "
"for all products"
msgstr ""
"Ha kiválaszt egy sablont, a szabály csak arra fog vonatkozni. Hagyja üresen "
"ha nem kívánja korlátozni."
#. module: product
#: field:product.template,procure_method:0
msgid "Procure Method"
msgstr ""
msgstr "Ellátás módja"
#. module: product
#: constraint:ir.actions.act_window:0
@@ -127,7 +130,7 @@ msgstr ""
#. module: product
#: help:product.packaging,height:0
msgid "The height of the package"
msgstr ""
msgstr "Csomag magassága"
#. module: product
#: view:product.pricelist:0
@@ -137,7 +140,7 @@ msgstr ""
#. module: product
#: model:product.category,name:product.cat1
msgid "Sellable"
msgstr ""
msgstr "Értékesíthető"
#. module: product
#: model:product.template,name:product.product_product_26_product_template
@@ -147,7 +150,7 @@ msgstr ""
#. module: product
#: field:product.price.type,name:0
msgid "Price Name"
msgstr ""
msgstr "Ár neve"
#. module: product
#: field:product.product,price: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-22 04:34+0000\n"
"X-Launchpad-Export-Date: 2010-01-23 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
+30 -24
View File
@@ -164,7 +164,7 @@ class project(osv.osv):
return res
def set_done(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'done'}, context=context)
self.write(cr, uid, ids, {'state':'close'}, context=context)
return True
def set_cancel(self, cr, uid, ids, context={}):
@@ -192,27 +192,29 @@ class project(osv.osv):
default['name'] = proj.name+_(' (copy)')
res = super(project, self).copy(cr, uid, id, default, context)
ids = self.search(cr, uid, [('parent_id','child_of', [res])])
cr.execute('update project_task set active=True where project_id in ('+','.join(map(str, ids))+')')
if ids:
cr.execute('update project_task set active=True where project_id in ('+','.join(map(str, ids))+')')
return res
def duplicate_template(self, cr, uid, ids,context={}):
result = []
for proj in self.browse(cr, uid, ids):
parent_id=context.get('parent_id',False)
new_id=self.pool.get('project.project').copy(cr, uid, proj.id,default={'name':proj.name+_(' (copy)'),'state':'open','parent_id':parent_id})
parent_id = context.get('parent_id',False)
new_id = self.pool.get('project.project').copy(cr, uid, proj.id, default = {
'name': proj.name +_(' (copy)'),
'state':'open',
'parent_id':parent_id})
result.append(new_id)
cr.execute('select id from project_task where project_id=%s', (proj.id,))
res = cr.fetchall()
for (tasks_id,) in res:
self.pool.get('project.task').copy(cr, uid, tasks_id,default={'project_id':new_id,'active':True}, context=context)
cr.execute('select id from project_project where parent_id=%s', (proj.id,))
res = cr.fetchall()
project_ids = [x[0] for x in res]
for child in project_ids:
self.duplicate_template(cr, uid, [child],context={'parent_id':new_id})
# TODO : Improve this to open the new project (using a wizard)
cr.commit()
raise osv.except_osv(_('Operation Done'), _('A new project has been created !\nWe suggest you to close this one and work on this new project.'))
self.pool.get('project.task').copy(cr, uid, tasks_id, default = {
'project_id': new_id,
'active':True}, context=context)
child_ids = self.search(cr, uid, [('parent_id','=', proj.id)])
if child_ids:
self.duplicate_template(cr, uid, child_ids, context={'parent_id':new_id})
return result
# set active value for a project, its sub projects and its tasks
def setActive(self, cr, uid, ids, value=True, context={}):
@@ -222,10 +224,9 @@ class project(osv.osv):
tasks_id = [x[0] for x in cr.fetchall()]
if tasks_id:
self.pool.get('project.task').write(cr, uid, tasks_id, {'active': value}, context)
cr.execute('select id from project_project where parent_id=%s', (proj.id,))
project_ids = [x[0] for x in cr.fetchall()]
for child in project_ids:
self.setActive(cr, uid, [child], value, context)
child_ids = self.search(cr, uid, [('parent_id','=', proj.id)])
if child_ids:
self.setActive(cr, uid, child_ids, value, context)
return True
project()
@@ -589,10 +590,16 @@ def _project_get(self, cr, uid, context={}):
if uid==1:
ids = self.pool.get('project.project').search(cr, uid, [])
res = self.pool.get('project.project').read(cr, uid, ids, ['id','name'], context)
return [(str(r['id']),r['name']) for r in res]
cr.execute("""SELECT to_char(id, '99999'),name FROM project_project where manager=%s OR
id IN (SELECT project_id from project_user_rel where uid=%s)""" % (uid, uid))
return cr.fetchall()
res = [(str(r['id']),r['name']) for r in res]
else:
cr.execute("""SELECT project.id,account.name FROM project_project project
LEFT JOIN account_analytic_account account ON account.id = project.category_id
WHERE (account.user_id = %s) OR project.id IN (SELECT project_id FROM project_resource_rel
WHERE resource_id IN (SELECT id FROM resource_resource
WHERE (user_id= %s)))"""%(uid, uid))
res = cr.fetchall()
res = [(str(r[0]),r[1]) for r in res]
return res
class users(osv.osv):
_inherit = 'res.users'
@@ -600,7 +607,6 @@ class users(osv.osv):
_columns = {
'context_project_id': fields.selection(_project_get, 'Project'),
}
users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -58,9 +58,9 @@
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
<button name="set_done" string="Done" type="object" states="open,pending" icon="gtk-jump-to"/>
<button name="reset_project" string="Reset as Project" type="object" states="template" icon="gtk-convert"/>
<button name="duplicate_template"
<button
string="New Project Based on Template"
type="object"
name="%(wizard_duplicate_template)d" type="action"
states="template" icon="gtk-new"/>
</group>
</page>
+5
View File
@@ -3,5 +3,10 @@
<data>
<wizard id="wizard_close_task" menu="False" model="project.task" name="project.task.close" string="Close Task"/>
<wizard id="wizard_delegate_task" menu="False" model="project.task" name="project.task.delegate" string="Delegate Task"/>
<wizard
id="wizard_duplicate_template"
menu="False"
model="project.project"
name="project.duplicate.template" string="Duplicate Template"/>
</data>
</openerp>
+1
View File
@@ -21,6 +21,7 @@
import close_task
import task_delegate
import duplicate_template_wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx.DateTime import now
import wizard
import netsvc
import ir
import pooler
import time
from tools.translate import _
class project_duplicate_template(wizard.interface):
def duplicate_template(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
project_obj = pool.get('project.project')
res = project_obj.duplicate_template(cr, uid, data['ids'])
if res and len(res):
res_id = res[0]
data_obj = pool.get('ir.model.data')
form_view_id = data_obj._get_id(cr, uid, 'project', 'edit_project')
form_view = data_obj.read(cr, uid, form_view_id, ['res_id'])
tree_view_id = data_obj._get_id(cr, uid, 'project', 'view_project_list')
tree_view = data_obj.read(cr, uid, tree_view_id, ['res_id'])
search_view_id = data_obj._get_id(cr, uid, 'project', 'view_project_project_filter')
search_view = data_obj.read(cr, uid, search_view_id, ['res_id'])
return {
'name': _('Projects'),
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'project.project',
'view_id': False,
'res_id' : res_id,
'views': [(form_view['res_id'],'form'),(tree_view['res_id'],'tree')],
'type': 'ir.actions.act_window',
'search_view_id': search_view['res_id']
}
return {}
states = {
'init': {
'actions': [],
'result': {'type': 'action', 'action': duplicate_template, 'state': 'order'}
},
'order': {
'actions': [],
'result': {'type': 'state', 'state': 'end'}
}
}
project_duplicate_template('project.duplicate.template')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -26,7 +26,7 @@
"category" : "Generic Modules/Others",
"description": """ Synchronize between Project task and Caldav Vtodo.""",
"depends" : ["project", "caldav"],
"init_xml" : [],
"init_xml" : ["project_calendar_data.xml"],
"demo_xml" : [],
"update_xml" : ["project_calendar_view.xml",
"project_calendar_wizard.xml"],
@@ -0,0 +1,42 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="basic.calendar.fields" id="caldav.map_todo_1">
<field name="name" ref="base_calendar.field_todo_status" />
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','state'),('model_id.model','=','project.task')]" />
<field name="mapping">{'needs-action': 'draft', 'completed': 'done', 'in-process': 'open', 'cancelled': 'cancelled'}</field>
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="caldav.map_todo_3">
<field name="name" ref="base_calendar.field_todo_attendee" />
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','attendee_ids'),('model_id.model','=','project.task')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="caldav.map_todo_9">
<field name="name" ref="base_calendar.field_todo_percent"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','progress'),('model_id.model','=','project.task')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="caldav.map_todo_12">
<field name="name" ref="base_calendar.field_event_priority"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','priority'),('model_id.model','=','project.task')]" />
<field name="fn">field</field>
</record>
<record model="basic.calendar.fields" id="caldav.map_todo_15">
<field name="name" ref="base_calendar.field_todo_duration"/>
<field name="type_id" ref="caldav.calendar_lines_todo" />
<field name="field_id" search="[('name','=','planned_hours'),('model_id.model','=','project.task')]" />
<field name="fn">field</field>
</record>
</data>
</openerp>
+39 -39
View File
@@ -7,39 +7,39 @@ 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-02-03 20:54+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-01-24 18:09+0000\n"
"Last-Translator: Oktay Altunergil <oktaya@gmail.com>\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:09+0000\n"
"X-Launchpad-Export-Date: 2010-01-25 04:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_crm
#: model:process.transition,name:sale_crm.process_transition_crmopportunityquotation
msgid "Crm opportunity quotation"
msgstr ""
msgstr "CRM Fırsat Teklifi"
#. module: sale_crm
#: model:process.transition,name:sale_crm.process_transition_opportunityanalytic0
msgid "Opportunity Analytic"
msgstr ""
msgstr "Fırsat Analitiği"
#. module: sale_crm
#: help:crm.case.make_order,init,partner_id:0
msgid "Use this partner if there is no partner on the case"
msgstr ""
msgstr "Olaya bağlı ortak yoksa bu ortağı kullan"
#. module: sale_crm
#: wizard_button:sale_crm.make_case,init,create:0
msgid "Create"
msgstr ""
msgstr "Oluştur"
#. module: sale_crm
#: selection:crm.case.make_order,init,picking_policy:0
msgid "All at once"
msgstr ""
msgstr "Hepsi birden"
#. module: sale_crm
#: constraint:ir.ui.view:0
@@ -49,158 +49,158 @@ msgstr "Görüntüleme mimarisi için Geçersiz XML"
#. module: sale_crm
#: model:process.transition,note:sale_crm.process_transition_crmopportunityquotation
msgid "Opportunity goes into the quotation"
msgstr ""
msgstr "Fırsat teklife gider"
#. module: sale_crm
#: model:process.node,name:sale_crm.process_node_contractanalytic0
msgid "Analytic account"
msgstr ""
msgstr "Analitik Hesap"
#. module: sale_crm
#: model:process.node,note:sale_crm.process_node_crmquotation0
msgid "Convert opportunity to quotation"
msgstr ""
msgstr "Fırsatı teklife dönüştür"
#. module: sale_crm
#: wizard_field:sale_crm.make_case,init,description:0
msgid "Your action"
msgstr ""
msgstr "Eyleminiz"
#. module: sale_crm
#: wizard_field:crm.case.make_order,init,picking_policy:0
msgid "Packing Policy"
msgstr ""
msgstr "Picking Policy"
#. module: sale_crm
#: wizard_button:crm.case.make_order,init,order:0
msgid "Create Quote"
msgstr ""
msgstr "Teklif Oluştur"
#. module: sale_crm
#: model:process.node,note:sale_crm.process_node_contractpricelist0
msgid "Contract Volume (pricelist)"
msgstr ""
msgstr "Sözleşme Miktarı (fiyat listesi)"
#. module: sale_crm
#: model:process.node,name:sale_crm.process_node_crmopportunity0
msgid "CRM Opportunity"
msgstr ""
msgstr "CRM Fırsatı"
#. module: sale_crm
#: model:ir.module.module,shortdesc:sale_crm.module_meta_information
msgid "Sale CRM Stuff"
msgstr ""
msgstr "Sale CRM Stuff"
#. module: sale_crm
#: model:process.transition,note:sale_crm.process_transition_opportunityquotation0
msgid "Opportunity convert into quotation"
msgstr ""
msgstr "Fırsatı teklife çevir"
#. module: sale_crm
#: selection:crm.case.make_order,init,picking_policy:0
msgid "Direct Delivery"
msgstr ""
msgstr "Direk Teslim"
#. module: sale_crm
#: model:process.transition,name:sale_crm.process_transition_opportunityquotation0
msgid "Opportunity Quotation"
msgstr ""
msgstr "Fırsat Teklifi"
#. module: sale_crm
#: model:process.node,name:sale_crm.process_node_crmquotation0
msgid "Quotation"
msgstr ""
msgstr "Teklif"
#. module: sale_crm
#: view:crm.case:0
#: wizard_view:crm.case.make_order,init:0
msgid "Convert to Quote"
msgstr ""
msgstr "Teklife Dönüştür"
#. module: sale_crm
#: help:crm.case.make_order,init,close:0
msgid "Check this to close the case after having created the sale order."
msgstr ""
msgstr "Satış emrini oluşturduktan sonra olayı kapatmak için seçiniz."
#. module: sale_crm
#: wizard_field:crm.case.make_order,init,partner_id:0
msgid "Customer"
msgstr ""
msgstr "Müşteri"
#. module: sale_crm
#: model:process.transition,note:sale_crm.process_transition_opportunitypricelist0
msgid "Opporunity convert to the Pricelist"
msgstr ""
msgstr "Fırsatı Fiyat Listesine çevir"
#. module: sale_crm
#: wizard_field:sale_crm.make_case,init,user:0
msgid "User Responsible"
msgstr ""
msgstr "Sorumlu Kullanıcı"
#. module: sale_crm
#: model:process.node,note:sale_crm.process_node_contractanalytic0
msgid "Reflect the contract made with customer"
msgstr ""
msgstr "Müşteri ile yapılan sözleşmeye göre göster"
#. module: sale_crm
#: wizard_field:crm.case.make_order,init,products:0
msgid "Products"
msgstr ""
msgstr "Ürünler"
#. module: sale_crm
#: wizard_field:crm.case.make_order,init,close:0
msgid "Close Case"
msgstr ""
msgstr "Olay Kapat"
#. module: sale_crm
#: model:ir.actions.wizard,name:sale_crm.sale_crm_make_case_wizard
#: wizard_view:sale_crm.make_case,init:0
msgid "Make Case"
msgstr ""
msgstr "Olay Yap"
#. module: sale_crm
#: wizard_field:crm.case.make_order,init,shop_id:0
msgid "Shop"
msgstr ""
msgstr "Mağaza"
#. module: sale_crm
#: model:process.node,note:sale_crm.process_node_crmopportunity0
msgid "The CRM Opportunity can lead to a quotation."
msgstr ""
msgstr "CRM Fırsatı teklifle sonuçlanabilir."
#. module: sale_crm
#: model:process.transition,name:sale_crm.process_transition_opportunitypricelist0
msgid "Opportunity Pricelist"
msgstr ""
msgstr "Fırsat Teklifi"
#. module: sale_crm
#: model:process.node,name:sale_crm.process_node_contractpricelist0
msgid "Contract Pricelist"
msgstr ""
msgstr "Sözleşme Fiyat Listesi"
#. module: sale_crm
#: wizard_field:sale_crm.make_case,init,name:0
msgid "Case Description"
msgstr ""
msgstr "Olay Tanımı"
#. module: sale_crm
#: wizard_field:crm.case.make_order,init,analytic_account:0
#: model:process.transition,note:sale_crm.process_transition_opportunityanalytic0
msgid "Analytic Account"
msgstr ""
msgstr "Analitik Hesap"
#. module: sale_crm
#: model:ir.actions.wizard,name:sale_crm.sale_crm_wizard
msgid "Make Quotation"
msgstr ""
msgstr "Teklif Ver"
#. module: sale_crm
#: wizard_button:crm.case.make_order,init,end:0
#: wizard_button:sale_crm.make_case,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Vazgeç"
#. module: sale_crm
#: wizard_field:sale_crm.make_case,init,section:0
msgid "Case Section"
msgstr ""
msgstr "Olay Bölümü"
+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-22 04:34+0000\n"
"X-Launchpad-Export-Date: 2010-01-23 04:45+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
+15 -15
View File
@@ -120,7 +120,7 @@ class survey_analysis(report_rml):
<blockTable colWidths="280.0,100.0,120.0" style="Table_head_2">
<tr>
<td>
<para style="terp_default_Centre_8">""" + to_xml(survey.title) + """</para>
<para style="terp_default_Centre_8">""" + to_xml(tools.ustr(survey.title)) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + str(survey.tot_start_survey) + """</para>
@@ -133,13 +133,13 @@ class survey_analysis(report_rml):
for page in survey.page_ids:
rml += """ <blockTable colWidths="500" style="Table4">
# <tr>
# <td><para style="page">Page :- """ + to_xml(page.title) + """</para></td>
# <td><para style="page">Page :- """ + to_xml(tools.ustr(page.title)) + """</para></td>
# </tr>
# </blockTable>"""
for que in page.question_ids:
rml +="""<blockTable colWidths="500" style="Table5">
<tr>
<td><para style="question">""" + tools.ustr(prefix) + to_xml(que.question) + """</para></td>
<td><para style="question">""" + to_xml(tools.ustr(prefix)) + to_xml(tools.ustr(que.question)) + """</para></td>
</tr>
</blockTable>"""
cols_widhts = []
@@ -154,12 +154,12 @@ class survey_analysis(report_rml):
matrix_ans.append(col.title)
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
for mat_col in matrix_ans:
rml+="""<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
rml+="""<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml+="""<td><para style="response">Response Count</para></td>
</tr>"""
last_col = cols_widhts[-1]
for ans in que.answer_choice_ids:
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>"""
rml+="""<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
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)
@@ -182,7 +182,7 @@ class survey_analysis(report_rml):
if que.comment_field_type:
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(que.comment_label) + """</para></td>
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>
<td><para style="answer">""" + tools.ustr(tot_res) + """</para></td></tr></blockTable>"""
elif que.type in['multiple_choice_only_one_ans', 'multiple_choice_multiple_ans', 'multiple_textboxes','date_and_time','date']:
@@ -193,7 +193,7 @@ class survey_analysis(report_rml):
<td> <para style="response">Response Count</para></td>
</tr>"""
for ans in que.answer_choice_ids:
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>
rml+="""<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>
<td><para style="answer">""" + tools.ustr(ans.average) + """%</para></td>
<td><para style="answer">""" + tools.ustr(ans.response) + """</para></td></tr>"""
rml+="""</blockTable>"""
@@ -204,13 +204,13 @@ class survey_analysis(report_rml):
tot_avg = 0.00
if que.tot_resp:
tot_avg = round(float(tot_res * 100)/ que.tot_resp,2)
rml+="""<blockTable colWidths="280.0,120,100.0" style="Table1"><tr><td><para style="answer">""" + to_xml(que.comment_label) + """</para></td>
rml+="""<blockTable colWidths="280.0,120,100.0" style="Table1"><tr><td><para style="answer">""" +to_xml(tools.ustr(que.comment_label)) + """</para></td>
<td><para style="answer">""" + str(tot_avg) + """%</para></td>
<td><para style="answer">""" + tools.ustr(tot_res) + """</para></td></tr></blockTable>"""
else:
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="400.0,100.0" style="Table1"><tr><td><para style="answer_right">""" + to_xml(que.comment_label) + """</para></td>
rml+="""<blockTable colWidths="400.0,100.0" style="Table1"><tr><td><para style="answer_right">""" + to_xml(tools.ustr(que.comment_label)) + """</para></td>
<td><para style="answer">""" + tools.ustr(tot_res) + """</para></td></tr></blockTable>"""
elif que.type in['single_textbox']:
@@ -244,12 +244,12 @@ class survey_analysis(report_rml):
matrix_ans.append(col.title)
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>"""
for mat_col in matrix_ans:
rml+="""<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
rml+="""<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml+="""<td><para style="response">Rating Average</para></td>
<td><para style="response">Response Count</para></td>
</tr>"""
for ans in que.answer_choice_ids:
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>"""
rml+="""<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>"""
res_count = 0
rating_weight_sum = 0
for mat_col in range(1, len(matrix_ans)):
@@ -281,7 +281,7 @@ class survey_analysis(report_rml):
elif que.type in['matrix_of_drop_down_menus']:
for column in que.column_heading_ids:
rml += """<blockTable colWidths="500" style="Table1"><tr>
<td><para style="answer">""" + to_xml(column.title) + """</para></td></tr></blockTable>"""
<td><para style="answer">""" + to_xml(tools.ustr(column.title)) + """</para></td></tr></blockTable>"""
menu_choices = column.menu_choice.split('\n')
cols_widhts = []
cols_widhts.append(200)
@@ -291,7 +291,7 @@ class survey_analysis(report_rml):
rml +="""<blockTable colWidths=" """ + colWidths + """ " style="Table1"><tr>
<td><para style="response"></para></td>"""
for menu in menu_choices:
rml += """<td><para style="response">""" + to_xml(menu) + """</para></td>"""
rml += """<td><para style="response">""" + to_xml(tools.ustr(menu)) + """</para></td>"""
rml += """<td><para style="response">Response Count</para></td></tr>"""
cr.execute("select count(id), sra.answer_id from survey_response_answer sra \
where sra.answer='%s' group by sra.answer_id " % (column.title))
@@ -300,7 +300,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">""" + to_xml(ans.answer) + """</para></td>"""
rml+="""<tr><td><para style="answer_right">""" + tto_xml(tools.ustr(ans.answer)) + """</para></td>"""
for mat_col in range(0, len(menu_choices)):
calc = 0
response = 0
@@ -339,7 +339,7 @@ class survey_analysis(report_rml):
per = 0.00
if len(tot_res):
per = round((float(total) / len(tot_res)),2)
rml+="""<tr><td><para style="answer">""" + to_xml(ans.answer) + """</para></td>
rml+="""<tr><td><para style="answer">""" + to_xml(tools.ustr(ans.answer)) + """</para></td>
<td> <para style="Standard"> </para></td>
<td> <para style="answer">""" + tools.ustr(per) +"""</para></td>
<td><para style="answer">""" + tools.ustr(total) + """</para></td>
+209 -203
View File
@@ -132,216 +132,222 @@ class survey_browse_response(report_rml):
surv_resp_obj = pooler.get_pool(cr.dbname).get('survey.response')
surv_resp_line_obj = pooler.get_pool(cr.dbname).get('survey.response.line')
surv_obj = pooler.get_pool(cr.dbname).get('survey')
for response in surv_resp_obj.browse(cr,uid, surv_resp_obj.search(cr,uid, [('survey_id','=',ids[0])])):
for survey in surv_obj.browse(cr, uid, ids):
if survey.question_prefix:
prefix = survey.question_prefix + " : "
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:
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(survey.title) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + to_xml(response.date_create) + """</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:
rml += """<para style="P2"></para>
<blockTable colWidths="500" style="Table4">
<tr>
<td><para style="page">Page :- """ + to_xml(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">""" + tools.ustr(prefix) + 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(que.descriptive_text) + """</para></td> </tr>
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(response.date_create) + """</para>
</td>
<td>
<para style="terp_default_Centre_8">""" + to_xml(response.user_id.name) + """</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">""" + 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">""" + value +"""</para></td>"""
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="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>"""
rml += """</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_choice_only_one_ans','multiple_choice_multiple_ans']:
if len(answer) and answer[0].state == "done":
for ans in answer[0].response_answer_ids:
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:
rml +="""<blockTable colWidths="500" style="Table1">
<tr> <td> <para style="response">""" + to_xml(ans.answer_id.answer) + """</para></td></tr>
</blockTable>"""
if que.comment_field_type:
rml+="""<blockTable colWidths="500" style="Table1"><tr>
<td><para style="answer">""" + 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(ans.answer_id.answer) + """</para></td>
<td> <para style="response">""" + to_xml(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(answer[0].single_text) + """</para></td></tr>
<tr> <td> <para style="response">No Response</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(answer[0].comment) + """</para></td></tr>
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>"""
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(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(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>"""
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>"""
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:
if comment_value=='False':
comment_value = ''
rml+= """<td><para style="response">"""+ comment_value + """</para></td>"""
rml+=""" </tr></blockTable>"""
if que.comment_field_type:
rml+="""<blockTable colWidths="500" style="Table1"><tr>
<td><para style="answer">""" + 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/>"""
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]
+6 -6
View File
@@ -142,21 +142,21 @@ class survey_form(report_rml):
if datas.has_key('form') and datas['form']['survey_title']:
rml += """
<blockTable colWidths='"""+_tbl_widths+"""' style="title_tbl">
<tr><td><para style="title">""" + to_xml(survey.title) + """</para><para style="P2"><font></font></para></td></tr>
<tr><td><para style="title">""" + to_xml(tools.ustr(survey.title)) + """</para><para style="P2"><font></font></para></td></tr>
</blockTable>"""
seq = 0
for page in survey.page_ids:
seq+=1
rml += """
<blockTable colWidths='"""+_tbl_widths+"""' style="page_tbl">
<tr><td><para style="page">"""+ tools.ustr(seq) + """. """ + tools.ustr(page.title) + """</para></td></tr>
<tr><td><para style="page">"""+ tools.ustr(seq) + """. """ + to_xml(tools.ustr(page.title)) + """</para></td></tr>
</blockTable>"""
for que in page.question_ids:
cols_widhts=[]
rml +="""
<para style="P2"><font></font></para>
<blockTable colWidths='"""+_tbl_widths+"""' style="question_tbl">
<tr><td><para style="question">""" + tools.ustr(prefix) + tools.ustr(que.question) + """</para></td></tr>
<tr><td><para style="question">""" + to_xml(tools.ustr(prefix)) + to_xml(tools.ustr(que.question)) + """</para></td></tr>
</blockTable>
<para style="P2"><font></font></para>"""
if que.type in ['descriptive_text']:
@@ -246,14 +246,14 @@ class survey_form(report_rml):
if col.title not in matrix_ans:
matrix_ans.append(col.title)
if que.comment_column:
matrix_ans.append(tools.ustr(que.column_name))
matrix_ans.append(to_xml(tools.ustr(que.column_name)))
rml+="""
<blockTable colWidths=" """ + colWidths + """ " style="ans_tbl">
<tr>"""
for mat_col in matrix_ans:
rml+="""
<td><para style="response">""" + to_xml(mat_col) + """</para></td>"""
<td><para style="response">""" + to_xml(tools.ustr(mat_col)) + """</para></td>"""
rml+="""</tr></blockTable>"""
i=0
for ans in que.answer_choice_ids:
@@ -346,7 +346,7 @@ class survey_form(report_rml):
colWidths = colWidths+'cm'
rml+="""<blockTable colWidths=" """ + colWidths + """ " style="Table4"><tr>"""
for col in que.column_heading_ids:
rml+="""<td><para style="terp_tblheader_Details">""" + tools.ustr(col.title) + """</para></td>"""
rml+="""<td><para style="terp_tblheader_Details">""" + to_xml(tools.ustr(col.title)) + """</para></td>"""
rml+="""</tr></blockTable>
<blockTable colWidths=" """ + colWidths + """ " style="Table5">"""
for r in range(0,que.no_of_rows):
+46
View File
@@ -30,6 +30,7 @@ from lxml import etree
from tools import to_xml
import tools
from mx.DateTime import *
import netsvc
class survey(osv.osv):
_name = 'survey'
@@ -51,11 +52,13 @@ class survey(osv.osv):
'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'),
}
_defaults = {
'state' : lambda * a: "draft",
'tot_start_survey' : lambda * a: 0,
'tot_comp_survey' : lambda * a: 0,
'send_response' : lambda * a: 1,
}
def survey_draft(self, cr, uid, ids, arg):
@@ -795,6 +798,34 @@ 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})
if sur_rec['send_response']:
user_obj = self.pool.get('res.users')
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)
attachments = []
file = open("/tmp/" + survey_data.title + ".pdf")
file_data = ""
while 1:
line = file.readline()
file_data += line
if not line:
break
attachments.append((survey_data.title + ".pdf",file_data))
user_email = False
resp_email = False
if user_obj.browse(cr, uid, uid).address_id.id:
cr.execute("select email from res_partner_address where id =%d" % user_obj.browse(cr, uid, uid).address_id.id)
user_email = cr.fetchone()[0]
resp_id = survey_data.responsible_id.address_id
if resp_id:
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,"
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'})
@@ -806,6 +837,21 @@ class survey_question_wiz(osv.osv_memory):
result['context'] = context
return result
def create_report(self, cr, uid, res_ids, report_name=False, file_name=False, context=None):
if not report_name or not res_ids:
return (False, Exception('Report name and Resources ids are required !!!'))
try:
ret_file_name = '/tmp/'+file_name+'.pdf'
service = netsvc.LocalService(report_name);
(result, format) = service.create(cr, uid, res_ids, {}, context)
fp = open(ret_file_name, 'wb+');
fp.write(result);
fp.close();
except Exception,e:
print 'Exception in create report:',e
return (False, str(e))
return (True, ret_file_name)
def default_get(self, cr, uid, fields_list, context=None):
value = {}
for field in fields_list:
+8 -10
View File
@@ -212,7 +212,7 @@
<field name="page_id" ref="survey_page_Contracts" />
<field name="type">multiple_choice_only_one_ans</field>
<field name="comment_field_type">text</field>
<field name="comment_label">Never... Why?</field>
<field name="comment_label">Why?</field>
<field name="in_visible_single_text">1</field>
<field eval="2" name="sequence"/>
</record>
@@ -226,9 +226,12 @@
<field name="question_id" ref="survey_question_contract_customers" />
<field name="sequence" eval="2"/>
</record>
<record id="survey_answer_never" model="survey.answer">
<field name="answer">Never... </field>
<field name="question_id" ref="survey_question_contract_customers" />
<field name="sequence" eval="2"/>
</record>
<record id="survey_question_contract_customers" model="survey.question">
<field name="make_comment_field">True</field>
<field name="make_comment_field_err_msg">Please enter a comment.</field>
<field eval="True" name="is_require_answer"/>
</record>
@@ -767,8 +770,6 @@
<field name="sequence" eval="2"/>
</record>
<record id="survey_question_odoo_continue_using_odoo" model="survey.question">
<field name="make_comment_field">True</field>
<field name="make_comment_field_err_msg">Please enter a comment.</field>
<field eval="True" name="is_require_answer"/>
</record>
@@ -985,12 +986,12 @@
<field name="page_id" ref="survey_page_odoo_the_offer" />
<field name="type">multiple_choice_only_one_ans</field>
<field name="comment_field_type">text</field>
<field name="comment_label">Yes, I plan to use (GB) :</field>
<field name="comment_label">Comment</field>
<field name="in_visible_single_text">1</field>
<field name="sequence" eval="2"/>
</record>
<record id="survey_answer_YES" model="survey.answer">
<field name="answer">YES</field>
<field name="answer">Yes, I plan to use (GB)</field>
<field name="question_id" ref="survey_question_odoo_dms" />
<field name="sequence" eval="1"/>
</record>
@@ -999,10 +1000,7 @@
<field name="question_id" ref="survey_question_odoo_dms" />
<field name="sequence" eval="2"/>
</record>
<record id="survey_question_odoo_dms" model="survey.question">
<field name="make_comment_field">True</field>
<field name="make_comment_field_err_msg">Please enter a comment.</field>
<field eval="True" name="is_require_answer"/>
</record>
+15 -10
View File
@@ -79,7 +79,7 @@
<field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
</group>
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<!-- group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<group colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
<field name="make_comment_field"/>
<group colspan="4" attrs="{'invisible':[('make_comment_field','!=',True)]}">
@@ -87,7 +87,7 @@
<field name="make_comment_field_err_msg" nolabel="1"/>
</group>
</group>
</group>
</group-->
<group attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
<field name="comment_column"/>
<group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
@@ -180,13 +180,18 @@
</group>
</page>
<page string="Other">
<group colspan="4" col='6'>
<group colspan="6" col='4'>
<field name="max_response_limit" select="1"
attrs="{'readonly':[('state','in',('open','close'))]}"/>
<field name="response_user" select="2"
attrs="{'readonly':[('state','in',('open','close'))]}"/>
<field name="question_prefix"/>
</group>
<field name="send_response"/>
</group>
<!--group colspan="4" col='4'>
<field name="question_prefix"/>
<field name="send_response"/>
</group-->
<separator colspan="4" string="Survey Details"/>
<field name="note" colspan="4" nolabel="1"/>
</page>
@@ -315,7 +320,7 @@
<field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
</group>
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<!--group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<group colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
<field name="make_comment_field"/>
<group colspan="4" attrs="{'invisible':[('make_comment_field','!=',True)]}">
@@ -323,7 +328,7 @@
<field name="make_comment_field_err_msg" nolabel="1"/>
</group>
</group>
</group>
</group-->
<group attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
<field name="comment_column"/>
<group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
@@ -499,7 +504,7 @@
<field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
</group>
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<!--group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<group colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
<field name="make_comment_field"/>
<group colspan="4" attrs="{'invisible':[('make_comment_field','!=',True)]}">
@@ -507,7 +512,7 @@
<field name="make_comment_field_err_msg" nolabel="1"/>
</group>
</group>
</group>
</group-->
<group attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
<field name="comment_column"/>
<group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
@@ -636,7 +641,7 @@
<field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
</group>
</group>
<group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<!--group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans')]}">
<group colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
<field name="make_comment_field"/>
<group colspan="4" attrs="{'invisible':[('make_comment_field','!=',True)]}">
@@ -644,7 +649,7 @@
<field name="make_comment_field_err_msg" nolabel="1"/>
</group>
</group>
</group>
</group-->
<group attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
<field name="comment_column"/>
<group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">