[RM] document_caldav: base_calendar has webdav stuff now. so no need this module

bzr revid: hmo@tinyerp.com-20100202053456-d26l4lkonhtkhi0i
This commit is contained in:
Harry (Open ERP)
2010-02-02 11:04:56 +05:30
parent 89a7c0de3d
commit a5ea44ec50
6 changed files with 0 additions and 169 deletions
-23
View File
@@ -1,23 +0,0 @@
# -*- 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 document_caldav
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-37
View File
@@ -1,37 +0,0 @@
# -*- 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/>.
#
##############################################################################
{
'name': 'Support for caldav based on Document Management System',
'version': '1.0',
'category': 'Generic Modules/Others',
'description': """Allows to synchronise calendars with others applications.""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['caldav','document_webdav', 'crm'],
'init_xml': ['document_data.xml'],
'update_xml': ['document_view.xml'],
'demo_xml': ['document_demo.xml'],
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-60
View File
@@ -1,60 +0,0 @@
# -*- 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/>.
#
##############################################################################
from document.nodes import node_content
from osv import osv, fields
from osv.orm import except_orm
import base64
import os
class document_directory_content(osv.osv):
_inherit = 'document.directory.content'
_columns = {
'object_id': fields.many2one('ir.model', 'Object', required=True),
}
def process_write(self, cr, uid, node, data, context=None):
if node.extension != '.ics':
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):
ctx = (context or {})
ctx.update(node.context.context.copy())
ctx.update(node.dctx)
content = self.browse(cr, uid, node.cnt_id, ctx)
obj_class = self.pool.get(content.object_id.model)
domain = []
if node.act_id:
domain.append(('id','=',node.act_id))
# print "process read clause:",domain
ids = obj_class.search(cr, uid, domain, context=ctx)
ctx.update({'model': content.object_id.model})
s = obj_class.export_cal(cr, uid, ids, context=ctx)
return s
document_directory_content()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="document.directory.content.type" id="ics">
<field name="code">.ics</field>
<field name="name">ICS Calendar</field>
<field name="mimetype">text/calendar</field>
</record>
</data>
</openerp>
-19
View File
@@ -1,19 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="document.directory" id="dir_calendars">
<field name="name">Meeting Calendars</field>
</record>
<record model="document.directory.content" id="dir_content_calendar">
<field name="name">Meeting Calendars</field>
<field name="suffix">meetings</field>
<field name="directory_id" ref="dir_calendars"/>
<field name="extension">.ics</field>
<field name="include_name" eval="False"/>
<field name="object_id" ref="crm.model_crm_meeting"/>
</record>
</data>
</openerp>
-18
View File
@@ -1,18 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_document_directory_form_1">
<field name="name">document.directory</field>
<field name="model">document.directory</field>
<field name="type">form</field>
<field name="inherit_id" ref="document.view_document_directory_form"/>
<field name="arch" type="xml">
<field name="include_name" position="after">
<field name="object_id"/>
</field>
</field>
</record>
</data>
</openerp>