diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 8c3742d7f8d..2034583ed02 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -327,14 +327,14 @@ - + - - - - - + + + + + @@ -349,18 +349,6 @@ {'type':'out_invoice'} - - - Panding Invoice - account.invoice - form - tree,form,calendar,graph - - {'type':'out_invoice'} - [('state','=','draft')] - - - tree @@ -372,7 +360,7 @@ - + Customer Invoices diff --git a/addons/account/i18n/hu.po b/addons/account/i18n/hu.po index 629d46d10c3..21fbe4cf06d 100644 --- a/addons/account/i18n/hu.po +++ b/addons/account/i18n/hu.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-01-22 23:52+0000\n" -"Last-Translator: Balint (eSolve) \n" +"PO-Revision-Date: 2010-01-30 16:38+0000\n" +"Last-Translator: Dukai Gábor \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-24 04:50+0000\n" +"X-Launchpad-Export-Date: 2010-01-31 04:51+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -910,7 +910,7 @@ msgstr "" #. module: account #: wizard_field:account.open_closed_fiscalyear,init,fyear_id:0 msgid "Fiscal Year to Open" -msgstr "" +msgstr "Visszanyitandó üzleti év" #. module: account #: view:account.config.wizard:0 @@ -981,7 +981,7 @@ msgstr "" #: wizard_field:account.print.journal.report,init,period_id:0 #: field:account.subscription,period_nbr:0 msgid "Period" -msgstr "Időszak" +msgstr "Periódus" #. module: account #: rml:account.partner.balance:0 @@ -1172,7 +1172,7 @@ msgstr "" #. module: account #: wizard_view:account.fiscalyear.close.state,init:0 msgid "Are you sure you want to close the fiscal year ?" -msgstr "" +msgstr "Biztos benne, hogy le akarja zárni az üzleti évet?" #. module: account #: selection:account.move,type:0 @@ -1212,7 +1212,7 @@ msgstr "" #. module: account #: field:account.account,company_currency_id:0 msgid "Company Currency" -msgstr "" +msgstr "Cég pénzneme" #. module: account #: model:ir.model,name:account.model_account_fiscal_position_account_template @@ -1332,7 +1332,7 @@ msgstr "" #: selection:account.analytic.account,type:0 #: field:account.journal,view_id:0 msgid "View" -msgstr "" +msgstr "nézet" #. module: account #: selection:account.account.balance.report,checktype,display_account:0 @@ -1471,7 +1471,7 @@ msgstr "Kötelezettség összesen" #. module: account #: wizard_button:account.fiscalyear.close.state,init,close:0 msgid "Close states" -msgstr "" +msgstr "Állapotok zárása" #. module: account #: model:ir.model,name:account.model_wizard_company_setup @@ -1707,7 +1707,7 @@ msgstr "Visszanyitás" #. module: account #: wizard_view:account.fiscalyear.close,init:0 msgid "Are you sure you want to create entries?" -msgstr "" +msgstr "Biztos hogy létre akarja hozni ezeket a könyvelési tételeket?" #. module: account #: field:account.tax,include_base_amount:0 @@ -2071,7 +2071,7 @@ msgstr "" #. module: account #: wizard_field:account.fiscalyear.close,init,period_id:0 msgid "Opening Entries Period" -msgstr "" +msgstr "Nyitóegyenleg periódusa" #. module: account #: model:ir.actions.wizard,name:account.wizard_validate_account_moves @@ -2088,7 +2088,7 @@ msgstr "" #. module: account #: selection:account.aged.trial.balance,init,direction_selection:0 msgid "Past" -msgstr "" +msgstr "múlt" #. module: account #: field:account.analytic.account,company_currency_id:0 @@ -2193,7 +2193,7 @@ msgstr "Tételes" #: selection:account.account,type:0 #: selection:account.account.template,type:0 msgid "Consolidation" -msgstr "Konszolidáció" +msgstr "konszolidáció" #. module: account #: field:account.chart.template,account_root_id:0 @@ -2236,7 +2236,7 @@ msgstr "" #. module: account #: wizard_field:account.fiscalyear.close,init,journal_id:0 msgid "Opening Entries Journal" -msgstr "" +msgstr "Nyitóegyenleg naplója" #. module: account #: view:account.config.wizard:0 @@ -2711,7 +2711,7 @@ msgstr "Számla azonosító" #. module: account #: field:account.period,date_stop:0 msgid "End of Period" -msgstr "Időszak vége" +msgstr "Periódus vége" #. module: account #: wizard_button:populate_statement_from_inv,go,finish:0 @@ -2765,7 +2765,7 @@ msgstr "" #. module: account #: wizard_field:account.aged.trial.balance,init,direction_selection:0 msgid "Analysis Direction" -msgstr "" +msgstr "Elemzés iránya" #. module: account #: wizard_button:populate_statement_from_inv,init,go:0 @@ -3093,7 +3093,7 @@ msgstr "" #: selection:account.account.template,type:0 #: selection:account.aged.trial.balance,init,result_selection:0 msgid "Payable" -msgstr "" +msgstr "kötelezettségek" #. module: account #: rml:account.invoice:0 @@ -3110,7 +3110,7 @@ msgstr "" #: selection:account.account,type:0 #: selection:account.account.template,type:0 msgid "Others" -msgstr "" +msgstr "egyéb" #. module: account #: selection:account.automatic.reconcile,init,power:0 @@ -3250,7 +3250,7 @@ msgstr "" #: model:ir.actions.wizard,name:account.wizard_fiscalyear_close #: model:ir.ui.menu,name:account.menu_wizard_fy_close msgid "Generate Fiscal Year Opening Entries" -msgstr "" +msgstr "Nyitóegyenlegek készítése az üzleti évhez" #. module: account #: model:ir.actions.wizard,name:account.wizard_reconcile @@ -3277,7 +3277,7 @@ msgstr "Adónév" #. module: account #: wizard_view:account.fiscalyear.close.state,init:0 msgid " Close states of Fiscal year and periods" -msgstr "" +msgstr " Az üzleti év és a periódusok állapotainak zárása" #. module: account #: model:account.payment.term,name:account.account_payment_term @@ -3565,7 +3565,7 @@ msgstr "Naplókód" #: wizard_button:account.fiscalyear.close,init,close:0 #: view:account.model:0 msgid "Create entries" -msgstr "" +msgstr "Tételek létrehozása" #. module: account #: view:account.analytic.line:0 @@ -3780,7 +3780,7 @@ msgstr "" #: selection:account.account,type:0 #: selection:account.account.template,type:0 msgid "Closed" -msgstr "" +msgstr "lezárt" #. module: account #: model:process.node,name:account.process_node_paymententries0 @@ -3878,7 +3878,7 @@ msgstr "Maximális mennyiség" #. module: account #: field:account.period,name:0 msgid "Period Name" -msgstr "Időszak" +msgstr "Periódus" #. module: account #: help:account.analytic.journal,type:0 @@ -4294,7 +4294,7 @@ msgstr "" #: field:account.account,type:0 #: field:account.account.template,type:0 msgid "Internal Type" -msgstr "" +msgstr "Belső típus" #. module: account #: selection:account.automatic.reconcile,init,power:0 @@ -4333,7 +4333,7 @@ msgstr "Záró dátum" #: model:ir.actions.wizard,name:account.wizard_open_closed_fiscalyear #: model:ir.ui.menu,name:account.menu_wizard_open_closed_fy msgid "Cancel Opening Entries" -msgstr "" +msgstr "Nyitóegyenleg visszavonása" #. module: account #: model:process.transition,name:account.process_transition_invoicemanually0 @@ -4435,7 +4435,7 @@ msgstr "" #: view:account.fiscalyear:0 #: view:account.period:0 msgid "States" -msgstr "" +msgstr "Állapotok" #. module: account #: view:account.move:0 @@ -4560,7 +4560,7 @@ msgstr "" #. module: account #: wizard_field:account.aged.trial.balance,init,result_selection:0 msgid "Filter on Partners" -msgstr "" +msgstr "Partnerek szűrése" #. module: account #: field:account.tax,price_include:0 @@ -4772,7 +4772,7 @@ msgstr "" #: selection:account.account.template,type:0 #: selection:account.aged.trial.balance,init,result_selection:0 msgid "Receivable" -msgstr "" +msgstr "követelések" #. module: account #: model:ir.actions.report.xml,name:account.account_account_balance @@ -4909,12 +4909,12 @@ msgstr "Tételek" #. module: account #: field:account.period,date_start:0 msgid "Start of Period" -msgstr "" +msgstr "Periódus kezdete" #. module: account #: wizard_field:account.fiscalyear.close,init,report_name:0 msgid "Name of new entries" -msgstr "" +msgstr "Új tételek neve" #. module: account #: wizard_button:account_use_models,init_form,create:0 @@ -5252,7 +5252,7 @@ msgstr "" #. module: account #: wizard_view:account.period.close,init:0 msgid "Are you sure ?" -msgstr "" +msgstr "Biztos benne?" #. module: account #: rml:account.invoice:0 @@ -5320,7 +5320,7 @@ msgstr "" #. module: account #: selection:account.aged.trial.balance,init,result_selection:0 msgid "Receivable and Payable" -msgstr "" +msgstr "követelések és kötelezettségek" #. module: account #: rml:account.account.balance:0 @@ -5468,7 +5468,7 @@ msgstr "" #: view:account.move:0 #: view:account.move.line:0 msgid "General Information" -msgstr "" +msgstr "Általános adatok" #. module: account #: help:populate_statement_from_inv,init,journal_id:0 @@ -5566,7 +5566,7 @@ msgstr "" #: wizard_field:account.fiscalyear.close,init,fy_id:0 #: wizard_field:account.fiscalyear.close.state,init,fy_id:0 msgid "Fiscal Year to close" -msgstr "" +msgstr "Lezárandó üzleti év" #. module: account #: wizard_field:account.aged.trial.balance,init,date1:0 @@ -5670,7 +5670,7 @@ msgstr "Árbevétel számla" #. module: account #: field:account.period,special:0 msgid "Opening/Closing Period" -msgstr "" +msgstr "Nyitó/záró periódus" #. module: account #: rml:account.analytic.account.balance:0 @@ -5763,7 +5763,7 @@ msgstr "Pénzügyi év" #. module: account #: selection:account.aged.trial.balance,init,direction_selection:0 msgid "Future" -msgstr "" +msgstr "jövő" #. module: account #: help:account.account.balance.report,checktype,fiscalyear:0 @@ -5893,7 +5893,7 @@ msgstr "" #: wizard_field:account.fiscalyear.close.state,init,sure:0 #: wizard_field:account.period.close,init,sure:0 msgid "Check this box" -msgstr "" +msgstr "Jelölje meg ezt a négyzetet" #. module: account #: help:account.tax,price_include:0 diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po index a677f708ff2..58ad4f5346d 100644 --- a/addons/account/i18n/it.po +++ b/addons/account/i18n/it.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-01-17 16:07+0000\n" -"Last-Translator: Davide Corio \n" +"PO-Revision-Date: 2010-01-29 14:02+0000\n" +"Last-Translator: Carlo \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-18 04:44+0000\n" +"X-Launchpad-Export-Date: 2010-01-30 04:39+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account @@ -299,7 +299,7 @@ msgstr "Fisso" #: model:ir.actions.report.xml,name:account.account_overdue #: view:res.company:0 msgid "Overdue Payments" -msgstr "" +msgstr "Ritardo Pagamenti" #. module: account #: wizard_view:account.account.balance.report,checktype:0 @@ -336,7 +336,7 @@ msgstr "Computazione del canone" #. module: account #: rml:account.central.journal:0 msgid "Account Num." -msgstr "" +msgstr "Conto n." #. module: account #: rml:account.analytic.account.analytic.check:0 @@ -475,7 +475,7 @@ msgstr "Riconciliazione bancaria" #. module: account #: rml:account.invoice:0 msgid "Disc.(%)" -msgstr "" +msgstr "Sconto (%)" #. module: account #: rml:account.general.ledger:0 @@ -497,6 +497,8 @@ msgid "" "Set if the amount of tax must be included in the base amount before " "computing the next taxes." msgstr "" +"Selezionare se l'importo della tassa debba essere incluso nell'importo base " +"prima di calcolare le prossime tasse" #. module: account #: model:ir.ui.menu,name:account.menu_finance_periodical_processing @@ -506,7 +508,7 @@ msgstr "Elaborazioni periodiche" #. module: account #: view:report.hr.timesheet.invoice.journal:0 msgid "Analytic Entries Stats" -msgstr "" +msgstr "Statistiche delle registrazioni analitiche" #. module: account #: model:ir.actions.act_window,name:account.action_account_tax_code_template_form @@ -528,7 +530,7 @@ msgstr "Pagamento Riconciliato" #. module: account #: wizard_field:account.chart,init,target_move:0 msgid "Target Moves" -msgstr "" +msgstr "Registrazioni:" #. module: account #: model:ir.actions.act_window,name:account.action_account_tax_template_form @@ -549,7 +551,7 @@ msgstr "Metodo riapertura conti" #. module: account #: field:account.tax.template,include_base_amount:0 msgid "Include in Base Amount" -msgstr "" +msgstr "Incluso nell'imponibile" #. module: account #: field:account.tax,ref_base_code_id:0 @@ -579,6 +581,9 @@ msgid "" "Number of days to add before computation of the day of month.If Date=15/01, " "Number of Days=22, Day of Month=-1, then the due date is 28/02." msgstr "" +"Numero di giorni da aggiungere prima della computazione del giorno del mese. " +"Se Data=15/01, Numero di giorni=22, Giorno del mese=-1, allora la scadenza " +"sarà 28/02." #. module: account #: model:ir.model,name:account.model_account_tax @@ -588,12 +593,12 @@ msgstr "account.tax" #. module: account #: rml:account.central.journal:0 msgid "Printing Date" -msgstr "" +msgstr "Stampa Data" #. module: account #: rml:account.general.ledger:0 msgid "Mvt" -msgstr "" +msgstr "Reg. n." #. module: account #: model:ir.actions.wizard,name:account.wizard_aged_trial_balance @@ -659,7 +664,7 @@ msgstr "" #. module: account #: help:account.fiscalyear,company_id:0 msgid "Keep empty if the fiscal year belongs to several companies." -msgstr "" +msgstr "Lasciare vuoto se l'anno fiscale appartiene a più aziende" #. module: account #: model:ir.ui.menu,name:account.menu_analytic_accounting @@ -669,7 +674,7 @@ msgstr "Contabilità Analitica" #. module: account #: rml:account.overdue:0 msgid "Sub-Total :" -msgstr "" +msgstr "Sub-totale" #. module: account #: field:account.analytic.account,line_ids:0 @@ -687,12 +692,12 @@ msgstr "Mese" #. module: account #: field:account.analytic.account,partner_id:0 msgid "Associated Partner" -msgstr "" +msgstr "Partner associato" #. module: account #: field:account.invoice,comment:0 msgid "Additional Information" -msgstr "" +msgstr "Informazioni Aggiuntive" #. module: account #: selection:account.invoice,type:0 diff --git a/addons/account/sequence.py b/addons/account/sequence.py index 08e38dd14a4..498e997dc2b 100644 --- a/addons/account/sequence.py +++ b/addons/account/sequence.py @@ -37,13 +37,13 @@ class ir_sequence(osv.osv): _columns = { 'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', 'sequence_main_id', 'Sequences') } - def get_id(self, cr, uid, sequence_id, test='id=%s', context={}): - cr.execute('select id from ir_sequence where '+test+' and active=%s', (sequence_id, True,)) + def get_id(self, cr, uid, sequence_id, test='id', context={}): + cr.execute('select id from ir_sequence where '+test+'=%s and active=%s', (sequence_id, True,)) res = cr.dictfetchone() if res: for line in self.browse(cr, uid, res['id'], context=context).fiscal_ids: if line.fiscalyear_id.id==context.get('fiscalyear_id', False): - return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id=%s", context=context) + return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id", context=context) return super(ir_sequence, self).get_id(cr, uid, sequence_id, test, context) ir_sequence() diff --git a/addons/account_chart/i18n/it.po b/addons/account_chart/i18n/it.po index 0a18bba9493..265ed870a9b 100644 --- a/addons/account_chart/i18n/it.po +++ b/addons/account_chart/i18n/it.po @@ -7,16 +7,16 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-09-08 13:46+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-01-29 07:09+0000\n" +"Last-Translator: Stefano Prenna \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:27+0000\n" +"X-Launchpad-Export-Date: 2010-01-30 04:40+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account_chart #: model:ir.module.module,description:account_chart.module_meta_information msgid "Remove minimal account chart" -msgstr "" +msgstr "Rimuovi il grafico del conto minimo" diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 84d9a744fe8..0fb5378d03e 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -27,6 +27,7 @@ from tools.translate import _ import base64 import pooler import re +import tools import vobject # O-1 Optional and can come only once @@ -84,7 +85,7 @@ def get_attribute_mapping(cr, uid, calname, context={}): if not res.get('uid', None): res['uid'] = {} res['uid']['field'] = 'id' - res[attr]['type'] = "integer" + res['uid']['type'] = "integer" return res def map_data(cr, uid, obj): @@ -170,17 +171,23 @@ class CalDAV(object): self.__attribute__[name][type] = None return True - def parse_ics(self, cr, uid, child): + def parse_ics(self, cr, uid, child, cal_children=None, context=None): att_data = [] for cal_data in child.getChildren(): if cal_data.name.lower() == 'attendee': + ctx = context.copy() + if cal_children: + ctx.update({'model': cal_children[cal_data.name.lower()]}) attendee = self.pool.get('basic.calendar.attendee') - att_data.append(attendee.import_cal(cr, uid, cal_data)) + att_data.append(attendee.import_cal(cr, uid, cal_data, context=ctx)) self.ical_set(cal_data.name.lower(), att_data, 'value') continue if cal_data.name.lower() == 'valarm': alarm = self.pool.get('basic.calendar.alarm') - vals = alarm.import_cal(cr, uid, cal_data) + ctx = context.copy() + if cal_children: + ctx.update({'model': cal_children[cal_data.name.lower()]}) + vals = alarm.import_cal(cr, uid, cal_data, context=ctx) self.ical_set(cal_data.name.lower(), vals, 'value') continue if cal_data.name.lower() in self.__attribute__: @@ -190,9 +197,7 @@ class CalDAV(object): def create_ics(self, cr, uid, datas, name, ical, context=None): if not datas: - model = context.get('model', None) - war_str = "No data available" + (model and " for " + model) or "" - raise osv.except_osv(_('Warning !'), _(war_str)) + return for data in datas: vevent = ical.add(name) for field in self.__attribute__.keys(): @@ -225,12 +230,14 @@ class CalDAV(object): data[map_field], vevent, context=context) elif field == 'valarm' and data[map_field]: model = self.__attribute__[field].get('object', False) + ctx = context.copy() + ctx.update({'model': model}) alarm_obj = self.pool.get('basic.calendar.alarm') vevent = alarm_obj.export_cal(cr, uid, model, \ - data[map_field][0], vevent, context=context) + data[map_field][0], vevent, context=ctx) elif data[map_field]: if map_type in ("char", "text"): - vevent.add(field).value = str(data[map_field]) + vevent.add(field).value = tools.ustr(data[map_field]) elif map_type in ('datetime', 'date') and data[map_field]: if field in ('exdate'): vevent.add(field).value = [parser.parse(data[map_field])] @@ -239,12 +246,12 @@ class CalDAV(object): elif map_type == "timedelta": vevent.add(field).value = timedelta(hours=data[map_field]) elif map_type == "many2one": - vevent.add(field).value = data.get(map_field)[1] + vevent.add(field).value = tools.ustr(data.get(map_field)[1]) elif map_type in ("float", "integer"): vevent.add(field).value = str(data.get(map_field)) elif map_type == "selection": if not self.ical_get(field, 'mapping'): - vevent.add(field).value = (data[map_field]).upper() + vevent.add(field).value = (tools.ustr(data[map_field])).upper() else: for key1, val1 in self.ical_get(field, 'mapping').items(): if val1 == data[map_field]: @@ -291,7 +298,7 @@ class CalDAV(object): res = [] for child in parsedCal.getChildren(): if child.name.lower() in ('vevent', 'vtodo'): - vals = self.parse_ics(cr, uid, child) + vals = self.parse_ics(cr, uid, child, context=context) else: vals = {} continue @@ -329,21 +336,18 @@ class Calendar(CalDAV, osv.osv): } def export_cal(self, cr, uid, datas, vobj='vevent', context={}): - try: - 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() - except Exception, e: - raise osv.except_osv(('Error !'), (str(e))) + cal = self.browse(cr, uid, datas[0]) + ical = vobject.iCalendar() + for line in cal.line_ids: + if line.name in ('valarm', '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) @@ -359,7 +363,7 @@ class Calendar(CalDAV, osv.osv): if child.name.lower() in cal_children: context.update({'model': cal_children[child.name.lower()]}) self.__attribute__ = get_attribute_mapping(cr, uid, child.name.lower(), context=context) - val = self.parse_ics(cr, uid, child) + val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context) obj = self.pool.get(cal_children[child.name.lower()]) if hasattr(obj, 'check_import'): obj.check_import(cr, uid, [val], context=context) @@ -374,7 +378,7 @@ class basic_calendar_line(osv.osv): _description = 'Calendar Lines' _columns = { 'name': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO'), \ - ('alarm', 'Alarm'), \ + ('valarm', 'Alarm'), \ ('attendee', 'Attendee')], \ string="Type", size=64), 'object_id': fields.many2one('ir.model', 'Object'), @@ -423,6 +427,51 @@ class basic_calendar_fields(osv.osv): _defaults = { 'fn': lambda *a: 'field', } + + def check_line(self, cr, uid, vals, name, context=None): + f_obj = self.pool.get('ir.model.fields') + field = f_obj.browse(cr, uid, vals['field_id'], context=context) + relation = field.relation + line_obj = self.pool.get('basic.calendar.lines') + l_id = line_obj.search(cr, uid, [('name', '=', name)]) + if l_id: + line = line_obj.browse(cr, uid, l_id, context=context)[0] + line_rel = line.object_id.model + if (relation != 'NULL') and (not relation == line_rel): + raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines' % (name))) + return True + + def create(self, cr, uid, vals, context={}): + cr.execute('select name from basic_calendar_attributes \ + where id=%s' % (vals.get('name'))) + name = cr.fetchone() + name = name[0] + if name in ('valarm', 'attendee'): + self.check_line(cr, uid, vals, name, context=context) + cr.execute("Select count(id) from basic_calendar_fields \ + where name=%s and type_id=%s" % (vals.get('name'), vals.get('type_id'))) + res = cr.fetchone() + if res: + if res[0] > 0: + raise osv.except_osv(_('Warning !'), _('Can not map same field more than once')) + return super(basic_calendar_fields, self).create(cr, uid, vals, context=context) + + def write(self, cr, uid, ids, vals, context=None): + if not vals: + return + for id in ids: + field = self.browse(cr, uid, id, context=context) + name = field.name.name + if name in ('valarm', 'attendee'): + self.check_line(cr, uid, vals, name, context=context) + qry = "Select count(id) from basic_calendar_fields \ + where name=%s and type_id=%s" % (field.name.id, field.type_id.id) + cr.execute(qry) + res = cr.fetchone() + if res: + if res[0] > 1: + raise osv.except_osv(_('Warning !'), _('Can not map same field more than once')) + return super(basic_calendar_fields, self).write(cr, uid, ids, vals, context) basic_calendar_fields() @@ -584,11 +633,14 @@ class Alarm(CalDAV, osv.osv_memory): trigger.value = delta # Compute other details - valarm.add('DESCRIPTION').value = alarm_data['name'] + valarm.add('DESCRIPTION').value = alarm_data['name'] or 'OpenERP' valarm.add('ACTION').value = alarm_data['action'] return vevent - def import_cal(self, cr, uid, ical_data): + def import_cal(self, cr, uid, ical_data, context=None): + ctx = context.copy() + ctx.update({'model': context.get('model', None)}) + self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, ctx) for child in ical_data.getChildren(): if child.name.lower() == 'trigger': seconds = child.value.seconds @@ -638,7 +690,10 @@ class Attendee(CalDAV, osv.osv_memory): 'language': None, # Use: 0-1 Specify the language for text values in a property or property parameter. } - def import_cal(self, cr, uid, ical_data): + def import_cal(self, cr, uid, ical_data, context=None): + ctx = context.copy() + ctx.update({'model': context.get('model', None)}) + self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, ctx) for para in ical_data.params: if para.lower() == 'cn': self.ical_set(para.lower(), ical_data.params[para][0]+':'+ \ @@ -652,7 +707,9 @@ class Attendee(CalDAV, osv.osv_memory): def export_cal(self, cr, uid, model, attendee_ids, vevent, context={}): attendee_object = self.pool.get(model) - self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, context) + ctx = context.copy() + ctx.update({'model': model}) + self.__attribute__ = get_attribute_mapping(cr, uid, self._calname, ctx) for attendee in attendee_object.read(cr, uid, attendee_ids, []): attendee_add = vevent.add('attendee') cn_val = '' @@ -662,9 +719,10 @@ class Attendee(CalDAV, osv.osv_memory): attendee_add.params[a_key] = [str(attendee[a_val['field']])] elif a_val['type'] == 'boolean': attendee_add.params[a_key] = [str(attendee[a_val['field']])] - if a_val['field'] == 'cn': + if a_val['field'] == 'cn' and attendee[a_val['field']]: cn_val = [str(attendee[a_val['field']])] - attendee_add.params['CN'] = cn_val + if cn_val: + attendee_add.params['CN'] = cn_val return vevent Attendee() diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 0165e483f53..f5b4a274a95 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -19,7 +19,7 @@ - +
diff --git a/addons/base_calendar/base_calendar_wizard.xml b/addons/base_calendar/base_calendar_wizard.xml index 1c20f80a06c..eaebba4234a 100644 --- a/addons/base_calendar/base_calendar_wizard.xml +++ b/addons/base_calendar/base_calendar_wizard.xml @@ -4,7 +4,7 @@ - diff --git a/addons/base_calendar/wizard/wizard_cal_subscribe.py b/addons/base_calendar/wizard/wizard_cal_subscribe.py index c4dceab660c..709c61d0b25 100644 --- a/addons/base_calendar/wizard/wizard_cal_subscribe.py +++ b/addons/base_calendar/wizard/wizard_cal_subscribe.py @@ -27,7 +27,7 @@ import wizard class cal_event_subscribe_wizard(wizard.interface): form1 = ''' - + ''' @@ -64,14 +64,16 @@ class cal_event_subscribe_wizard(wizard.interface): raise wizard.except_wizard(_('Error!'), _('Please provide Proper URL !')) model = data.get('model') model_obj = pooler.get_pool(cr.dbname).get(model) - context.update({'url': data['form']['url_path']}) - vals = model_obj.import_cal(cr, uid, base64.encodestring(caldata), context) + context.update({'url': data['form']['url_path'], + 'model': data.get('model')}) + vals = model_obj.import_cal(cr, uid, base64.encodestring(caldata), \ + data['id'], context) if vals: cnt = vals['count'] return {} def _result_set(self, cr, uid, data, context=None): - return {'msg': 'Subscribed %s Event(s)' % cnt} + return {'msg': 'Import Sucessful.'} states = { 'init': { diff --git a/addons/base_module_merge/i18n/sq.po b/addons/base_module_merge/i18n/sq.po index e280f35a865..7cec4156152 100644 --- a/addons/base_module_merge/i18n/sq.po +++ b/addons/base_module_merge/i18n/sq.po @@ -1,20 +1,21 @@ -# Translation of OpenERP Server. -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * base_module_merge +# Albanian translation for openobject-addons +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2010. # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 5.0.4\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-08-28 15:23:46+0000\n" -"PO-Revision-Date: 2009-08-28 15:23:46+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2009-08-28 16:01+0000\n" +"PO-Revision-Date: 2010-01-26 11:00+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Albanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2010-01-29 04:53+0000\n" +"X-Generator: Launchpad (build Unknown)\n" #. module: base_module_merge #: wizard_field:base_module_merge.module_merge,info,category:0 @@ -121,157 +122,10 @@ msgstr "" #. module: base_module_merge #: wizard_view:base_module_merge.module_merge,save:0 -msgid "If you think your module could interrest others people, we'd like you to publish it on OpenERP.com, in the 'Modules' section. You can do it through the website or using features of the 'base_module_publish' module." -msgstr "" - -#. module: base_module_merge -#: help:base_module_merge.module_merge,init,modules_list:0 -msgid "Select Modules which you want to merge in single module" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,data_kind:0 -msgid "Type of Data" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,info:0 -msgid "Module Information" -msgstr "" - -#. module: base_module_merge -#: wizard_button:base_module_merge.module_merge,info,end:0 -#: wizard_button:base_module_merge.module_merge,init,end:0 -msgid "Cancel" -msgstr "" - -#. module: base_module_merge -#: wizard_button:base_module_merge.module_merge,save,end:0 -msgid "Close" -msgstr "" - -# This file contains the translation of the following modules: -# * base_module_merge -# msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 5.0.4\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-08-28 15:23:46+0000\n" -"PO-Revision-Date: 2009-08-28 15:23:46+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,category:0 -msgid "Category" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Information" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,init:0 -msgid "Module Merging" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,author:0 -msgid "Author" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,directory_name:0 -msgid "Directory Name" -msgstr "" - -#. module: base_module_merge -#: selection:base_module_merge.module_merge,info,data_kind:0 -msgid "Demo Data" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,save,module_filename:0 -msgid "Filename" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,version:0 -msgid "Version" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,info:0 -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Module Recording" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Thanks in advance for your contribution." -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,description:0 -msgid "Full Description" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,name:0 -msgid "Module Name" -msgstr "" - -#. module: base_module_merge -#: model:ir.actions.wizard,name:base_module_merge.wizard_base_module_merger -#: model:ir.ui.menu,name:base_module_merge.menu_wizard_base_module_merger -msgid "Merge module" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,save,module_file:0 -msgid "Module .zip File" -msgstr "" - -#. module: base_module_merge -#: model:ir.module.module,shortdesc:base_module_merge.module_meta_information -msgid "Module Merger" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Module successfully created !" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,website:0 -msgid "Documentation URL" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,init,modules_list:0 -msgid "Modules" -msgstr "" - -#. module: base_module_merge -#: wizard_button:base_module_merge.module_merge,info,save:0 -#: wizard_button:base_module_merge.module_merge,init,info:0 -msgid "Continue" -msgstr "" - -#. module: base_module_merge -#: selection:base_module_merge.module_merge,info,data_kind:0 -msgid "Normal Data" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "If you think your module could interrest others people, we'd like you to publish it on OpenERP.com, in the 'Modules' section. You can do it through the website or using features of the 'base_module_publish' module." +"If you think your module could interrest others people, we'd like you to " +"publish it on OpenERP.com, in the 'Modules' section. You can do it through " +"the website or using features of the 'base_module_publish' module." msgstr "" #. module: base_module_merge @@ -299,4 +153,3 @@ msgstr "" #: wizard_button:base_module_merge.module_merge,save,end:0 msgid "Close" msgstr "" - diff --git a/addons/base_module_merge/i18n/vi.po b/addons/base_module_merge/i18n/vi.po index 30b58544f85..6b897955b51 100644 --- a/addons/base_module_merge/i18n/vi.po +++ b/addons/base_module_merge/i18n/vi.po @@ -1,20 +1,21 @@ -# Translation of OpenERP Server. -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * base_module_merge +# Vietnamese translation for openobject-addons +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2010. # msgid "" 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:00:38+0000\n" -"PO-Revision-Date: 2009-08-28 16:00:38+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2009-08-28 16:01+0000\n" +"PO-Revision-Date: 2010-01-26 11:00+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2010-01-29 04:53+0000\n" +"X-Generator: Launchpad (build Unknown)\n" #. module: base_module_merge #: wizard_field:base_module_merge.module_merge,info,category:0 @@ -121,157 +122,10 @@ msgstr "" #. module: base_module_merge #: wizard_view:base_module_merge.module_merge,save:0 -msgid "If you think your module could interrest others people, we'd like you to publish it on OpenERP.com, in the 'Modules' section. You can do it through the website or using features of the 'base_module_publish' module." -msgstr "" - -#. module: base_module_merge -#: help:base_module_merge.module_merge,init,modules_list:0 -msgid "Select Modules which you want to merge in single module" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,data_kind:0 -msgid "Type of Data" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,info:0 -msgid "Module Information" -msgstr "" - -#. module: base_module_merge -#: wizard_button:base_module_merge.module_merge,info,end:0 -#: wizard_button:base_module_merge.module_merge,init,end:0 -msgid "Cancel" -msgstr "" - -#. module: base_module_merge -#: wizard_button:base_module_merge.module_merge,save,end:0 -msgid "Close" -msgstr "" - -# This file contains the translation of the following modules: -# * base_module_merge -# msgid "" -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:00:38+0000\n" -"PO-Revision-Date: 2009-08-28 16:00:38+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,category:0 -msgid "Category" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Information" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,init:0 -msgid "Module Merging" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,author:0 -msgid "Author" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,directory_name:0 -msgid "Directory Name" -msgstr "" - -#. module: base_module_merge -#: selection:base_module_merge.module_merge,info,data_kind:0 -msgid "Demo Data" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,save,module_filename:0 -msgid "Filename" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,version:0 -msgid "Version" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,info:0 -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Module Recording" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Thanks in advance for your contribution." -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,description:0 -msgid "Full Description" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,name:0 -msgid "Module Name" -msgstr "" - -#. module: base_module_merge -#: model:ir.actions.wizard,name:base_module_merge.wizard_base_module_merger -#: model:ir.ui.menu,name:base_module_merge.menu_wizard_base_module_merger -msgid "Merge module" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,save,module_file:0 -msgid "Module .zip File" -msgstr "" - -#. module: base_module_merge -#: model:ir.module.module,shortdesc:base_module_merge.module_meta_information -msgid "Module Merger" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "Module successfully created !" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,info,website:0 -msgid "Documentation URL" -msgstr "" - -#. module: base_module_merge -#: wizard_field:base_module_merge.module_merge,init,modules_list:0 -msgid "Modules" -msgstr "" - -#. module: base_module_merge -#: wizard_button:base_module_merge.module_merge,info,save:0 -#: wizard_button:base_module_merge.module_merge,init,info:0 -msgid "Continue" -msgstr "" - -#. module: base_module_merge -#: selection:base_module_merge.module_merge,info,data_kind:0 -msgid "Normal Data" -msgstr "" - -#. module: base_module_merge -#: wizard_view:base_module_merge.module_merge,save:0 -msgid "If you think your module could interrest others people, we'd like you to publish it on OpenERP.com, in the 'Modules' section. You can do it through the website or using features of the 'base_module_publish' module." +"If you think your module could interrest others people, we'd like you to " +"publish it on OpenERP.com, in the 'Modules' section. You can do it through " +"the website or using features of the 'base_module_publish' module." msgstr "" #. module: base_module_merge @@ -299,4 +153,3 @@ msgstr "" #: wizard_button:base_module_merge.module_merge,save,end:0 msgid "Close" msgstr "" - diff --git a/addons/base_setup/i18n/it.po b/addons/base_setup/i18n/it.po index 262a33abdf7..0f78558505a 100644 --- a/addons/base_setup/i18n/it.po +++ b/addons/base_setup/i18n/it.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-09-08 14:11+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-01-29 14:07+0000\n" +"Last-Translator: Carlo \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-30 04:39+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base_setup @@ -165,6 +165,9 @@ msgid "" "We suggest you to put bank information here:\n" "IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701" msgstr "" +"Questa frase apparirà al fondo dei report.\n" +"Si possono inserire le coordinate bancarie qui:\n" +"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701" #. module: base_setup #: wizard_field:base_setup.base_setup,company,country_id:0 @@ -270,7 +273,7 @@ msgstr "Logo" #. module: base_setup #: model:ir.module.module,shortdesc:base_setup.module_meta_information msgid "Base Setup" -msgstr "" +msgstr "Configurazione di base" #. module: base_setup #: wizard_button:base_setup.base_setup,company,init:0 diff --git a/addons/board/i18n/it.po b/addons/board/i18n/it.po index a1bf5c5ecfc..80b1555039f 100644 --- a/addons/board/i18n/it.po +++ b/addons/board/i18n/it.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.0\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2009-09-08 12:29+0000\n" -"Last-Translator: Fabien (Open ERP) \n" +"PO-Revision-Date: 2010-01-29 14:08+0000\n" +"Last-Translator: Carlo \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:20+0000\n" +"X-Launchpad-Export-Date: 2010-01-30 04:40+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: board @@ -37,7 +37,7 @@ msgstr "Autore" #. module: board #: model:ir.module.module,shortdesc:board.module_meta_information msgid "Dashboard main module" -msgstr "" +msgstr "Modulo principale cruscotti" #. module: board #: view:board.note:0 @@ -53,7 +53,7 @@ msgstr "Larghezza" #. module: board #: 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: board #: field:board.board.line,name:0 @@ -137,7 +137,7 @@ msgstr "Dashboard" #. module: board #: model:ir.module.module,description:board.module_meta_information msgid "Base module for all dashboards." -msgstr "" +msgstr "Modulo base per tutti i cruscotti." #. module: board #: field:board.board.line,position:0 diff --git a/addons/caldav/caldav.py b/addons/caldav/caldav.py index 34cc3fcf74f..2d988456da2 100644 --- a/addons/caldav/caldav.py +++ b/addons/caldav/caldav.py @@ -215,6 +215,15 @@ request was delegated to"), def do_decline(self, cr, uid, ids, context=None, *args): self.write(cr, uid, ids, {'state': 'declined'}, context) + def create(self, cr, uid, vals, context={}): + if not vals.get("email") and vals.get("cn"): + cnval = vals.get("cn").split(':') + email = filter(lambda x:x.__contains__('@'), cnval) + vals['email'] = email[0] + vals['cn'] = vals.get("cn") + res = super(calendar_attendee, self).create(cr, uid, vals, context) + return res + calendar_attendee() class res_alarm(osv.osv): @@ -252,6 +261,9 @@ are both optional, but if one occurs, so MUST the other"""), model_obj = self.pool.get(model) for data in model_obj.browse(cr, uid, ids): basic_alarm = data.alarm_id + if not context.get('alarm_id'): + self.do_alarm_unlink(cr, uid, [data.id], model) + return True self.do_alarm_unlink(cr, uid, [data.id], model) if basic_alarm: vals = { @@ -297,7 +309,7 @@ res_alarm() class calendar_alarm(osv.osv): _name = 'calendar.alarm' _description = 'Event alarm information' - _inherits = {'res.alarm': "alarm_id"} + _inherit = 'res.alarm' __attribute__ = {} _columns = { @@ -616,6 +628,8 @@ rule or repeating pattern for anexception to a recurrence set"), def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): + if not context: + context = {} if isinstance(ids, (str, int, long)): select = [ids] else: @@ -626,9 +640,10 @@ rule or repeating pattern for anexception to a recurrence set"), if not id in new_ids: new_ids.append(id) res = super(calendar_event, self).write(cr, uid, new_ids, vals, context=context) - if vals.has_key('alarm_id'): + if vals.has_key('alarm_id') or vals.has_key('caldav_alarm_id'): alarm_obj = self.pool.get('res.alarm') - alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date') + context.update({'alarm_id': vals.get('alarm_id')}) + alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date', context=context) return res def browse(self, cr, uid, ids, context=None, list_class=None, fields_process={}): diff --git a/addons/caldav/caldav_data.xml b/addons/caldav/caldav_data.xml index b909bf1dc82..295b05ba540 100644 --- a/addons/caldav/caldav_data.xml +++ b/addons/caldav/caldav_data.xml @@ -143,7 +143,7 @@
- alarm + valarm @@ -170,13 +170,6 @@ field - - - - - field - - @@ -198,13 +191,6 @@ field - - - - - field - - @@ -219,13 +205,6 @@ field - - - - - field - - @@ -284,13 +263,6 @@ - - - - - field - - @@ -298,13 +270,6 @@ field - - - - - field - - @@ -333,13 +298,6 @@ field - - - - - field - - @@ -347,13 +305,6 @@ field - - - - - field - - @@ -368,13 +319,6 @@ field - - - - - hours - - @@ -422,7 +366,7 @@ - + field @@ -450,7 +394,7 @@ - + field diff --git a/addons/caldav/caldav_view.xml b/addons/caldav/caldav_view.xml index 06050f03b5a..559c45485cc 100644 --- a/addons/caldav/caldav_view.xml +++ b/addons/caldav/caldav_view.xml @@ -260,5 +260,9 @@ new + + diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py index d01f083c2d9..5ef83f99cbe 100644 --- a/addons/crm/__terp__.py +++ b/addons/crm/__terp__.py @@ -85,7 +85,7 @@ between mails and Open ERP.""", 'crm_helpdesk_menu.xml', #'crm_report.xml', 'security/crm_security.xml', - #'security/ir.model.access.csv', + 'security/ir.model.access.csv', 'process/crm_configuration_process.xml' ], diff --git a/addons/crm/crm_helpdesk_view.xml b/addons/crm/crm_helpdesk_view.xml index 112440cef68..af702600e28 100644 --- a/addons/crm/crm_helpdesk_view.xml +++ b/addons/crm/crm_helpdesk_view.xml @@ -26,8 +26,9 @@
- - + + + @@ -127,7 +128,7 @@ - +