[ADD] caldv wizard doc

bzr revid: tfr@openerp.com-20110107170219-g4t9zdcpg2hbfn36
This commit is contained in:
Thibault Francois
2011-01-07 18:02:19 +01:00
22 changed files with 2607 additions and 98 deletions
+4
View File
@@ -208,6 +208,10 @@ class account_analytic_account(osv.osv):
args=[]
if context is None:
context={}
if context.get('current_model') == 'project.project':
cr.execute("select analytic_account_id from project_project")
project_ids = [x[0] for x in cr.fetchall()]
return self.name_get(cr, uid, project_ids, context=context)
account = self.search(cr, uid, [('code', '=', name)]+args, limit=limit, context=context)
if not account:
account = self.search(cr, uid, [('name', 'ilike', '%%%s%%' % name)]+args, limit=limit, context=context)
+1
View File
@@ -56,6 +56,7 @@
'wizard/calendar_event_export_view.xml',
'wizard/calendar_event_import_view.xml',
'wizard/calendar_event_subscribe_view.xml',
'wizard/caldav_browse_view.xml',
'caldav_view.xml',
'caldav_setup.xml'
],
+50
View File
@@ -0,0 +1,50 @@
==========================
CalDAV How-To
==========================
As from OpenERP v6.0, document_webdav v2.2, the iPhone has been thoroughly
tested and supported as a Calendaring client for the OpenERP CalDAV module.
However, keep in mind that OpenERP is not a straightforward calendaring
server, but an ERP application (with more data + structure) which exposes
that data to calendar clients. That said, the full features that would be
accessible through the Gtk or Web OpenERP clients cannot be crammed into
the Calendar clients (such as the iPhone).
OpenERP server Setup
--------------------
Some modules need to be installed at the OpenERP server. These are:
- caldav: Required, has the reference setup and the necessary
underlying code. Will also cause document, document_webdav
to be installed.
- crm_caldav: Optional, will export the CRM Meetings as a calendar.
- project_caldav: Optional, will export project tasks as calendar.
- http_well_known: Optional, experimental. Will ease bootstrapping,
but only when a DNS srv record is also used.
These will also install a reference setup of the folders, ready to go.
The administrator of OpenERP can add more calendars and structure, if
needed.
DNS server setup
------------------
To be documented.
SSL setup
----------
It is highly advisable that you also setup SSL to work for the OpenERP
server. HTTPS is a server-wide feature in OpenERP, which means a
certificate will be set at the openerp-server.conf and will be the same
for XML-RPC, HTTP, WebDAV and CalDAV.
The iPhone also supports secure connections with SSL, although it does
not expect a self-signed certificate (or one that is not verified by
one of the "big" certificate authorities [1] ).
[1] I remember one guy that made *lots* of money selling his CA business
off, and since then uses this money to create a software monopoly.
+27
View File
@@ -0,0 +1,27 @@
==================================
Synchronization with Android phone
==================================
Prerequire
----------
There is no buit-in way to synchronize calendar with caldav.
So you need to install a third part software : Calendar (CalDav)
for now it's the only one
configuration
-------------
1. Open Calendar Sync
I'll get an interface with 2 tabs
Stay on the first one
2. CaDAV Calendar URL : put the URL given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)
3. Put your openerp username and password
4. If your server don't use SSL, you'll get a warnign, say "Yes"
5. Then you can synchronize manually or custom the settings to synchronize every x minutes.
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
=========================================
Synchronization with Evolution's calendar
=========================================
1. Go to Calendar View
2. File -> New -> Calendar
3. Fill the form
- type : CalDav
- name : Whaterver you want (ie : Meeting)
- url : http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie :
http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings)
the one given on the top of this window
- uncheck "User SSL"
- Username : Your username (ie : Demo)
- Refresh : everytime you want that evolution synchronize the data with the server
4. Click ok and give your openerp password
5. A new calendar named with the name you gave should appear on the left side.
+37 -49
View File
@@ -2,67 +2,55 @@
CalDAV with iPhone How-To
==========================
As from OpenERP v6.0, document_webdav v2.2, the iPhone has been thoroughly
tested and supported as a Calendaring client for the OpenERP CalDAV module.
However, keep in mind that OpenERP is not a straightforward calendaring
server, but an ERP application (with more data + structure) which exposes
that data to calendar clients. That said, the full features that would be
accessible through the Gtk or Web OpenERP clients cannot be crammed into
the Calendar clients (such as the iPhone).
Phone setup
-------------
The iPhone is fairly easy to setup.
IF you need SSL (and your certificate is not a verified one, as usual),
then you first will need to let the iPhone trust that. Follow these
steps:
s1. Open Safari and enter the https location of the OpenERP server:
https://my.server.ip:8071/
(assuming you have the server at "my.server.ip" and the HTTPS port
is the default 8071)
s2. Safari will try to connect and issue a warning about the certificate
used. Inspect the certificate and click "Accept" so that iPhone
now trusts it.
For SSL specific configuration see the documentation below
Now, to setup the calendars, you need to:
1. Click on the "Settings" and go to the "Mail, Contacts, Calendars" page.
2. Go to "Add account..."
3. Click on "Other"
4. From the "Calendars" group, select "Add CalDAV Account"
5. Enter the server's name or IP address at the "Server" entry, the
OpenERP username and password at the next ones.
As a description, you can either leave the server's name or
something like "OpenERP calendars".
6. You _will_ get the "Unable to verify account" error message. That is
because our server is not at the port iPhone expects[2]. But no
need to worry, click OK.
7. At the next page, enter the "Advanced Settings" to specify the right
ports and paths
8. If you have SSL, turn the switch on. Note that port will be changed
to 8443.
9. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.
10. Set the "Account URL" to the right path of the OpenERP webdav:
https://my.server.ip:8071/webdav/dbname/calendars
Where "https://my.server.ip:8071" is the protocol, server name
and port as discussed above, "dbname" is the name of the database.
[Note that the default
"https://my.server.ip:8071/principals/users/username" might also
be edited to
"https://my.server.ip:8071/webdav/dbname/principals/users/username" ]
5. Enter the host's name
(ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , openerp.com is the host)
6. Fill Username and password with your openerp login and password
7. As a description, you can either leave the server's name or
something like "OpenERP calendars".
9. If you are not using a SSL server, you'll get an error, do not worry and push "Continue"
10. Then click to "Advanced Settings" to specify the right
ports and paths.
11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.
12. Set the "Account URL" to the right path of the OpenERP webdav:
the url given by the wizard (ie : http://my.server.ip:8069/webdav/dbname/calendars/ )
11. Click on Done. The phone will hopefully connect to the OpenERP server
and verify it can use the account.
and verify it can use the account.
12. Go to the main menu of the iPhone and enter the Calendar application.
Your OpenERP calendars will be visible inside the selection of the
"Calendars" button.
Your OpenERP calendars will be visible inside the selection of the
"Calendars" button.
Note that when creating a new calendar entry, you will have to specify
which calendar it should be saved at.
IF you need SSL (and your certificate is not a verified one, as usual),
then you first will need to let the iPhone trust that. Follow these
steps:
s1. Open Safari and enter the https location of the OpenERP server:
https://my.server.ip:8071/
(assuming you have the server at "my.server.ip" and the HTTPS port
is the default 8071)
s2. Safari will try to connect and issue a warning about the certificate
used. Inspect the certificate and click "Accept" so that iPhone
now trusts it.
[2] This may not happen if the SRV records at DNS and the well-known URIs
are setup right. But we appreciate that a default OpenERP installation will
not have the DNS server of the company's domain configured.
+15
View File
@@ -0,0 +1,15 @@
all: compile clean
concat: all.rst
cat all.rst iPhone.rst android.rst evolution.rst sunbird.rst > compile.rst
compile: concat
rst2pdf compile.rst -o caldav_doc.pdf
debug: compile
clean:
rm compile.rst
del:
rm caldav_doc.pdf
+28
View File
@@ -0,0 +1,28 @@
======================================
Synchronization with Sunbird/Lightning
======================================
Prerequire
----------
If you are using thunderbird, first you need to install the lightning module
http://www.mozilla.org/projects/calendar/lightning/
configuration
-------------
1. Go to Calendar View
2. File -> New Calendar
3. Chosse "On the Network"
4. for format choose CalDav
and as location the url given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)
5. Choose a name and a color for the Calendar, and we advice you to uncheck "alarm"
6. Then put your openerp login and password (to give the password only check the box "Use password Manager to remember this password"
7. Then Finish, your meetings should appear now in your calendar view
+1 -1
View File
@@ -22,5 +22,5 @@
import calendar_event_export
import calendar_event_import
import calendar_event_subscribe
import caldav_browse
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+282
View File
@@ -0,0 +1,282 @@
# -*- 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 osv import osv, fields
from tools import config
import base64
import addons
from tools.translate import _
class caldav_browse(osv.osv_memory):
__doc = {
'other' : _("""
* Webdav server that provides remote access to calendar
* Synchronisation of calendar using WebDAV
* Customize calendar event and todo attribute with any of OpenERP model
* Provides iCal Import/Export functionality
To access Calendars using CalDAV clients, point them to:
http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c
To access OpenERP Calendar using WebCal to remote site use the URL like:
http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics
Where,
HOSTNAME: Host on which OpenERP server(With webdav) is running
PORT : Port on which OpenERP server is running (By Default : 8069)
DATABASE_NAME: Name of database on which OpenERP Calendar is created
CALENDAR_NAME: Name of calendar to access
"""),
'iphone' : _("""
For SSL specific configuration see the documentation below
Now, to setup the calendars, you need to:
1. Click on the "Settings" and go to the "Mail, Contacts, Calendars" page.
2. Go to "Add account..."
3. Click on "Other"
4. From the "Calendars" group, select "Add CalDAV Account"
5. Enter the host's name
(ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , openerp.com is the host)
6. Fill Username and password with your openerp login and password
7. As a description, you can either leave the server's name or
something like "OpenERP calendars".
9. If you are not using a SSL server, you'll get an error, do not worry and push "Continue"
10. Then click to "Advanced Settings" to specify the right
ports and paths.
11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.
12. Set the "Account URL" to the right path of the OpenERP webdav:
the url given by the wizard (ie : http://my.server.ip:8069/webdav/dbname/calendars/ )
11. Click on Done. The phone will hopefully connect to the OpenERP server
and verify it can use the account.
12. Go to the main menu of the iPhone and enter the Calendar application.
Your OpenERP calendars will be visible inside the selection of the
"Calendars" button.
Note that when creating a new calendar entry, you will have to specify
which calendar it should be saved at.
IF you need SSL (and your certificate is not a verified one, as usual),
then you first will need to let the iPhone trust that. Follow these
steps:
s1. Open Safari and enter the https location of the OpenERP server:
https://my.server.ip:8071/
(assuming you have the server at "my.server.ip" and the HTTPS port
is the default 8071)
s2. Safari will try to connect and issue a warning about the certificate
used. Inspect the certificate and click "Accept" so that iPhone
now trusts it.
"""),
'android' : _("""
Prerequire
----------
There is no buit-in way to synchronize calendar with caldav.
So you need to install a third part software : Calendar (CalDav)
for now it's the only one
configuration
-------------
1. Open Calendar Sync
I'll get an interface with 2 tabs
Stay on the first one
2. CaDAV Calendar URL : put the URL given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)
3. Put your openerp username and password
4. If your server don't use SSL, you'll get a warnign, say "Yes"
5. Then you can synchronize manually or custom the settings to synchronize every x minutes.
"""),
'evolution' : _("""
1. Go to Calendar View
2. File -> New -> Calendar
3. Fill the form
- type : CalDav
- name : Whaterver you want (ie : Meeting)
- url : http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie : http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one given on the top of this window
- uncheck "User SSL"
- Username : Your username (ie : Demo)
- Refresh : everytime you want that evolution synchronize the data with the server
4. Click ok and give your openerp password
5. A new calendar named with the name you gave should appear on the left side.
"""),
'thunderbird' : _("""
Prerequire
----------
If you are using thunderbird, first you need to install the lightning module
http://www.mozilla.org/projects/calendar/lightning/
configuration
-------------
1. Go to Calendar View
2. File -> New Calendar
3. Chosse "On the Network"
4. for format choose CalDav
and as location the url given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)
5. Choose a name and a color for the Calendar, and we advice you to uncheck "alarm"
6. Then put your openerp login and password (to give the password only check the box "Use password Manager to remember this password"
7. Then Finish, your meetings should appear now in your calendar view
"""),
}
_name = 'caldav.browse'
_description = 'Caldav Browse'
_columns = {
'url' : fields.char('Caldav Server', size=264, required=True, help="Url of the caldav server, use for synchronization"),
'caldav_doc_file':fields.binary('Caldav Document', readonly=True, help="download full caldav Documentation."),
'description':fields.text('Description', readonly=True)
}
def default_get(self, cr, uid, fields, context=None):
res = {}
host = ''
port = ''
prefix = 'http://'
if not config.get('xmlrpc'):
if not config.get('netrpc'):
prefix = 'https://'
host = config.get('xmlrpcs_interface', None)
port = config.get('xmlrpcs_port', 8071)
else:
host = config.get('netrpc_interface', None)
port = config.get('netrpc_port',8070)
else:
host = config.get('xmlrpc_interface', None)
port = config.get('xmlrpc_port',8069)
if host == '' or None:
host = 'localhost'
port = 8069
if not config.get_misc('webdav','enable',True):
raise Exception("WebDAV is disabled, cannot continue")
user_pool = self.pool.get('res.users')
current_user = user_pool.browse(cr, uid, uid, context=context)
pref_obj = self.pool.get('user.preference')
pref_ids = pref_obj.browse(cr, uid ,context.get('rec_id',False), context=context)
#TODO write documentation
res['description'] = self.__doc['other']
if pref_ids:
pref_ids = pref_ids[0]
if pref_ids.device == 'iphone':
url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/'
else :
url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/'+ 'users/'+ current_user.login + '/'+ pref_ids.collection.name+ '/'+ pref_ids.calendar.name
res['description'] = self.__doc.get(pref_ids.device , self.__doc['other'])
file = open(addons.get_module_resource('caldav','doc', 'caldav_doc.pdf'),'rb')
res['caldav_doc_file'] = base64.encodestring(file.read())
res['url'] = prefix+url
return res
def browse_caldav(self, cr, uid, ids, context):
return {}
caldav_browse()
class user_preference(osv.osv_memory):
_name = 'user.preference'
_description = 'User preference Form'
_columns = {
'collection' :fields.many2one('document.directory', "Calendar Collection", required=True, domain = [('calendar_collection', '=', True)]),
'calendar' :fields.many2one('basic.calendar', 'Calendar', required=True),
'service': fields.selection([('webdav','CalDAV')], "Services"),
'device' : fields.selection([('other', 'Other'), ('iphone', 'iPhone'), ('android', 'Android based device'),('thunderbird', 'Sunbird/Thunderbird'), ('evolution','Evolution')], "Software/Devices")
}
def _get_default_calendar(self, cr, uid, context):
if context == None:
context = {}
name = context.get('cal_name')
collection_obj = self.pool.get('basic.calendar')
ids = collection_obj.search(cr, uid, [('name', '=', name)])
return ids[0]
def _get_default_collection(self, cr, uid, context):
collection_obj = self.pool.get('document.directory')
ids = collection_obj.search(cr, uid, [('name', '=', 'c')])
return ids[0]
_defaults={
'service': 'webdav',
'collection' : _get_default_collection,
'calendar' : _get_default_calendar,
'device' : 'other'
}
def open_window(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','caldav_Browse')])
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])
context.update({'rec_id': ids})
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'caldav.browse',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
'context': context,
}
user_preference()
@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="caldav_browse_form" model="ir.ui.view">
<field name="name">caldav_Browse</field>
<field name="model">caldav.browse</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Browse caldav" >
<group colspan="4" width="700" height="500">
<separator string="Browse caldav" colspan="4"/>
<field name="url" colspan="4" />
<separator string="Description" colspan="4"/>
<field name="description" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<field name="caldav_doc_file" colspan="4" />
<group col="4" colspan="4">
<label string="" colspan="2"/>
<button name="browse_caldav" string="_Ok" type="object" icon="gtk-ok"/>
</group>
</group>
</form>
</field>
</record>
<record id="user_prefernce_form" model="ir.ui.view">
<field name="name">user_preference</field>
<field name="model">user.preference</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="User Preference">
<separator string="" colspan="4"/>
<field name="service" colspan="4" width="250" readonly="1"/>
<field name="collection" colspan="4" width="250" invisible="1" />
<field name="calendar" colspan="4" width="250" domain="[('collection_id','=', collection)]" readonly="1"/>
<field name="device" colspan="4" width="250" />
<separator colspan="4"/>
<group col="4" colspan="4">
<label string="" colspan="2"/>
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
<button name="open_window" string="_Open" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
</data>
</openerp>
+1
View File
@@ -125,6 +125,7 @@ Create dashboard for CRM that includes:
'test/test_crm_meeting.yml',
'test/test_crm_opportunity.yml',
'test/test_crm_phonecall.yml',
'test/test_crm_recurrent_meeting.yml',
],
'installable': True,
'active': False,
@@ -0,0 +1,106 @@
-
In order to test recurrent meetings in OpenERP, I create meetings with different recurrency.
-
I create a customer meeting record with daily recurrency.
-
!record {model: crm.meeting, id: crm_meeting_pricelistdiscussion0}:
categ_id: crm.categ_meet1
count: 0.0
date: '2011-01-05 00:00:00'
date_deadline: '2011-01-05 01:00:00'
day: 0.0
duration: 1.0
end_date: '2011-01-12'
end_type: end_date
name: Pricelist Discussion
recurrency: true
recurrent_uid: 0.0
rrule: FREQ=DAILY;INTERVAL=1;UNTIL=20110112T235959Z
rrule_type: daily
sequence: 0.0
-
I create another meeting record with weekly recurrency.
-
!record {model: crm.meeting, id: crm_meeting_changesindesigning0}:
categ_id: crm.categ_meet2
count: 15
date: '2011-01-22 11:05:05'
date_deadline: '2011-01-22 16:05:05'
day: 0.0
duration: 5.0
email_from: info@opensides.be
end_type: count
fr: true
mo: true
name: Changes in Designing
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
recurrency: true
recurrent_uid: 0.0
rrule: FREQ=WEEKLY;BYDAY=FR,TU,TH,WE,MO;INTERVAL=1;COUNT=15
rrule_type: weekly
section_id: crm.section_sales_department
sequence: 0.0
th: true
tu: true
user_id: base.user_demo
we: true
-
I create a meeting record with monthly recurrency.
-
!record {model: crm.meeting, id: crm_meeting_reviewneeds0}:
categ_id: crm.categ_meet3
count: 0.0
date: '2011-01-20 10:02:02'
date_deadline: '2011-01-20 16:02:02'
day: 15
duration: 6.0
end_date: '2011-05-31'
end_type: end_date
name: Review needs
partner_address_id: base.res_partner_address_15
partner_id: base.res_partner_11
recurrency: true
recurrent_uid: 0.0
rrule: FREQ=MONTHLY;INTERVAL=1;UNTIL=20110531T235959Z;BYMONTHDAY=15
rrule_type: monthly
section_id: crm.section_sales_department
sequence: 0.0
user_id: base.user_demo
-
I create a record for daily scrum meeting.
-
!record {model: crm.meeting, id: crm_meeting_scrummeeting0}:
categ_id: crm.categ_meet2
count: 0.0
date: '2011-01-06 00:00:00'
date_deadline: '2011-01-06 01:00:00'
day: 0.0
duration: 1.0
name: Scrum meeting
recurrency: true
recurrent_uid: 0.0
rrule: FREQ=DAILY;INTERVAL=1
rrule_type: daily
sequence: 0.0
-
I create a meeting record for yearly recurrency.
-
!record {model: crm.meeting, id: crm_meeting_updatethedata0}:
categ_id: crm.categ_meet2
count: 0.0
date: '2011-01-18 13:12:49'
date_deadline: '2011-01-19 02:30:49'
day: 0.0
duration: 13.300000000000001
end_date: '2015-01-06'
end_type: end_date
name: Update the data
partner_address_id: base.res_partner_address_7
partner_id: base.res_partner_4
recurrency: true
recurrent_uid: 0.0
rrule: FREQ=YEARLY;INTERVAL=1;UNTIL=20150106T235959Z
rrule_type: yearly
section_id: crm.section_sales_department
sequence: 0.0
+2 -1
View File
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
##############################################################################
#
@@ -36,7 +37,7 @@
'crm_caldav_setup.xml',
],
'update_xml': [],
'update_xml': ['crm_caldav_view.xml'],
'demo_xml': [],
'installable': True,
'active': False,
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="action_caldav_browse" model="ir.actions.act_window">
<field name="name">Caldav Browse</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">user.preference</field>
<field name="view_id" ref="caldav.user_prefernce_form"/>
<field name="context">{'cal_name' : 'Meetings'}</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem
name="Synchronyze this calendar"
action="action_caldav_browse"
id="menu_caldav_browse"
icon="STOCK_EXECUTE"
parent="crm.menu_meeting_sale" sequence="1"/>
</data>
</openerp>
+1 -1
View File
@@ -108,7 +108,7 @@
<field name="extension"/>
<field name="include_name"/>
<separator string="PDF Report" colspan="4"/>
<field name="report_id" domain="[ ('type','=','ressource'),('model_id','=',parent.ressource_type_id)]"/>
<field name="report_id" domain="[('model_id','=',parent.ressource_type_id)]"/>
</form>
<tree string="Contents">
<field name="sequence" string="Seq."/>
-1
View File
@@ -129,7 +129,6 @@ class project(osv.osv):
'priority': fields.integer('Sequence', help="Gives the sequence order when displaying a list of task"),
'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'parent_id': fields.many2one('project.project', 'Parent Project'),
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
store = {
+5 -1
View File
@@ -15,13 +15,17 @@
<field name="object">project.task</field>
</record>
<!--
Resource: project.project
-->
<record id="all_projects_account" model="account.analytic.account">
<field name="name">Projects</field>
<field name="code">3</field>
</record>
<function eval="('default',False,'parent_id', [('project.project', False)], all_projects_account, True, False, False, False, True)" id="parent_project_default_set" model="ir.values" name="set"/>
</data>
</openerp>
+12 -5
View File
@@ -216,13 +216,13 @@
</record>
<!--
Resource: project.project
-->
Resource: project.project
-->
<record id="base.main_company" model="res.company">
<field name="project_time_mode_id" ref="product.uom_hour"></field>
</record>
<!-- Task Types -->
<!-- Task Types -->
<record id="project_tt_specification" model="project.task.type">
<field name="sequence">1</field>
<field name="name">Specification</field>
@@ -232,7 +232,7 @@
<field name="name">Development</field>
</record>
<record id="project_tt_testing" model="project.task.type">
<field name="sequence">3</field>
<field name="sequence">3</field>
<field name="name">Testing</field>
</record>
<record id="project_tt_merge" model="project.task.type">
@@ -241,6 +241,13 @@
</record>
<!-- Projects -->
<!-- Projects -->
<!-- <record id="all_projects_account" model="project.project">
<field name="name">Projects</field>
<field name="code">3</field>
</record> -->
<record id="project_project_9" model="project.project">
<field name="warn_manager">1</field>
<field name="name">OpenERP Integration</field>
@@ -270,7 +277,7 @@
<field eval="[(6, 0, [ref('project_tt_development')])]" name="type_ids"/>
</record>
<!-- Tasks -->
<!-- Tasks -->
<record id="project_task_116" model="project.task">
<field name="planned_hours">38.0</field>
<field name="remaining_hours">38.0</field>
+2 -2
View File
@@ -21,7 +21,7 @@
<form string="Project">
<group colspan="6" col="6">
<field name="name" string="Project Name" select="1"/>
<field name="parent_id" domain="[('id','!=',active_id)]"/>
<field name="parent_id" string="Parent Project" domain="[('id','!=',active_id)]" context="{'current_model': 'project.project'}"/>
<field name="user_id" string="Project Manager" select="1" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
<field name="date_start" string="Start Date" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
<field name="date" string="End Date" attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"/>
@@ -143,7 +143,7 @@
<field name="name" string="Project Name"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Partner"/>
<field name="parent_id" invisible="1"/>
<field name="parent_id" string="Parent Project" invisible="1"/>
<field name="planned_hours" widget="float_time"/>
<field name="total_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
+36 -37
View File
@@ -80,45 +80,45 @@
<field name="arch" type="xml">
<notebook colspan="4" position="inside">
<page string="Recurrency Option" attrs="{'invisible':[('recurrency','=',False)]}">
<group colspan="2" col="4" >
<field name="rrule_type" string="Recurrency" colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
</group>
<newline/>
<group col="4" colspan="6" name="rrule">
<separator string="Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<group colspan="2" col="4" >
<field name="rrule_type" string="Recurrency" colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
</group>
<newline/>
<group col="4" colspan="6" name="rrule">
<separator string="Recurrency Rule" colspan="8"/>
<group col="6" colspan="4">
<field name="interval" string="Repeat Times" attrs="{'readonly': [('end_date','!=',False)]}"/>
<field name="count" attrs="{'readonly': [('end_date','!=',False)]}"/>
<field name="end_date" attrs="{'invisible': [('readonly','!=',False)]}"/>
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible' :[('rrule_type','not in', ['weekly','daily_working'])]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<field name="su" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<newline />
</group>
<group col="10" colspan="4" attrs="{'invisible': [('rrule_type','!=','monthly'), ('rrule_type','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1" attrs="{'invisible' : [('select1','=','day')]}">
<field name="day" attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1" attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The" attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1" attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1" attrs="{'invisible' : [('rrule_type','!=','yearly')]}">
<field name="month_list" string="of" colspan="1" attrs="{'required' : [('rrule_type','=','yearly')]}" />
</group>
</group>
</group>
</group>
<group col="14" colspan="4" name="Select weekdays"
attrs="{'invisible' :[('rrule_type','not in', ['weekly','daily_working'])]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<newline/>
<field name="fr" colspan="1" />
<field name="sa" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<field name="su" colspan="1" attrs="{'invisible': [('rrule_type','=','daily_working')]}"/>
<newline />
</group>
<group col="10" colspan="4" attrs="{'invisible': [('rrule_type','!=','monthly'), ('rrule_type','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1" attrs="{'invisible' : [('select1','=','day')]}">
<field name="day" attrs="{'required' : [('select1','=','date')]}" />
</group>
<group col="3" colspan="1" attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The" attrs="{'required' : [('select1','=','day')]}" />
<field name="week_list" nolabel="1" attrs="{'required' : [('select1','=','day')]}" />
</group>
<group col="1" colspan="1" attrs="{'invisible' : [('rrule_type','!=','yearly')]}">
<field name="month_list" string="of" colspan="1" attrs="{'required' : [('rrule_type','=','yearly')]}" />
</group>
</group>
</group>
</page>
</notebook>
</field>
@@ -140,5 +140,4 @@
</field>
</record>
</data>
</openerp>