[MERGE] branch trunk-v62_projct_config-tpa (project config wizard)
bzr revid: rco@openerp.com-20120326114953-046ph8adrwp5q05r
This commit is contained in:
commit
d4675435b4
|
@ -210,4 +210,10 @@ class sale_config_settings(osv.osv_memory):
|
|||
_name = 'sale.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
# Preferences wizard for Projects & CRM.
|
||||
# It is defined here because it must be inherited independently in modules project and crm_claim.
|
||||
class project_config_settings(osv.osv_memory):
|
||||
_name = 'project.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<!--
|
||||
<!--
|
||||
<record id="config_action_partner_terminology_config_form" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_partner_terminology_config_form"/>
|
||||
<field name="category_id" ref="base.category_administration_config"/>
|
||||
|
@ -169,5 +169,31 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="base.project_settings_form_view" model="ir.ui.view">
|
||||
<field name="name">project.config.settings</field>
|
||||
<field name="model">project.config.settings</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure Projects">
|
||||
<group name="project" colspan="4"/>
|
||||
<separator string="Helpdesk and support" colspan="4"/>
|
||||
<group name="helpdesk" colspan="4"/>
|
||||
<newline/>
|
||||
<label colspan="2"/>
|
||||
<button string="Cancel" icon="gtk-cancel" special="cancel"/>
|
||||
<button string="Apply" icon="gtk-ok" type="object" name="execute"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="base.action_project_config" model="ir.actions.act_window">
|
||||
<field name="name">Configure Projects</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">project.config.settings</field>
|
||||
<field name="view_id" ref="base.project_settings_form_view"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
import crm_claim
|
||||
import report
|
||||
import res_config
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ automatically new claims based on incoming emails.
|
|||
'crm_claim_menu.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'report/crm_claim_report_view.xml',
|
||||
'res_config_view.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
'crm_claim_demo.xml',
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
# -*- 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
|
||||
|
||||
class project_claim_mail_configuration(osv.osv_memory):
|
||||
_inherit = 'project.config.settings'
|
||||
_columns = {
|
||||
'project_claim': fields.boolean("Create claims from an email account",
|
||||
help="""Allows you to configure your incoming mail server, and create claims from incoming emails."""),
|
||||
'claim_server' : fields.char('Server Name', size=256),
|
||||
'claim_port' : fields.integer('Port'),
|
||||
'claim_type': fields.selection([
|
||||
('pop', 'POP Server'),
|
||||
('imap', 'IMAP Server'),
|
||||
('local', 'Local Server'),
|
||||
], 'Server Type'),
|
||||
'claim_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
|
||||
'claim_user' : fields.char('Username', size=256),
|
||||
'claim_password' : fields.char('Password', size=1024),
|
||||
}
|
||||
_defaults = {
|
||||
'claim_type': 'pop',
|
||||
}
|
||||
|
||||
def get_default_claim_server(self, cr, uid, ids, context=None):
|
||||
context.update({'type':'claim'})
|
||||
res = self.get_default_email_configurations(cr, uid, ids, context)
|
||||
return res
|
||||
|
||||
def set_default_claim_server(self, cr, uid, ids, context=None):
|
||||
context.update({'type':'claim','obj':'crm.claim'})
|
||||
self.set_email_configurations(cr, uid, ids, context)
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_project_config_claim" model="ir.ui.view">
|
||||
<field name="name">Project Application</field>
|
||||
<field name="model">project.config.settings</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.project_settings_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="helpdesk" position="after">
|
||||
<field name="project_claim"/>
|
||||
<group colspan="2" attrs="{'invisible': [('project_claim','=',False)]}">
|
||||
<field name="claim_server" attrs="{'required': [('project_claim','=',True)]}"/>
|
||||
<field name="claim_type" nolabel="1" on_change="onchange_server_type(claim_type, claim_is_ssl,'claim')" attrs="{'required': [('project_claim','=',True)]}"/>
|
||||
<field name="claim_port" attrs="{'required': [('project_claim','=',True)]}"/>
|
||||
<field name="claim_is_ssl" on_change="onchange_server_type(claim_type, claim_is_ssl,'claim')"/>
|
||||
<field name="claim_user" attrs="{'required': [('project_claim','=',True)]}"/>
|
||||
<field name="claim_password" password="True" attrs="{'required': [('project_claim','=',True)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,7 +1,7 @@
|
|||
#-*- coding:utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# mga@tinyerp.com
|
||||
#
|
||||
|
@ -21,5 +21,6 @@
|
|||
##############################################################################
|
||||
|
||||
import fetchmail
|
||||
import res_config
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
#-*- coding:utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# mga@tinyerp.com
|
||||
#
|
||||
# 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 fields, osv
|
||||
|
||||
class project_configuration(osv.osv_memory):
|
||||
_inherit = 'project.config.settings'
|
||||
|
||||
def get_default_email_configurations(self, cr, uid, ids, context=None):
|
||||
fetchmail_obj = self.pool.get('fetchmail.server')
|
||||
result = {}
|
||||
if not context:
|
||||
context = {}
|
||||
type = context.get('type')
|
||||
if type:
|
||||
server_ids = fetchmail_obj.search(cr, uid, [('name','=',type),('state','=','done')])
|
||||
if server_ids:
|
||||
result.update({'project_'+type: True})
|
||||
server_id = fetchmail_obj.browse(cr, uid, server_ids[0])
|
||||
result.update({type+'_server': server_id.server})
|
||||
result.update({type+'_port': server_id.port})
|
||||
result.update({type+'_is_ssl': server_id.is_ssl})
|
||||
result.update({type+'_type': server_id.type})
|
||||
result.update({type+'_user': server_id.user})
|
||||
result.update({type+'_password': server_id.password})
|
||||
|
||||
return result
|
||||
|
||||
def set_email_configurations(self, cr, uid, ids, context=None):
|
||||
model_obj = self.pool.get('ir.model')
|
||||
fetchmail_obj = self.pool.get('fetchmail.server')
|
||||
ir_values_obj = self.pool.get('ir.values')
|
||||
if not context:
|
||||
context = {}
|
||||
type = context.get('type')
|
||||
model = context.get('obj')
|
||||
if type and model:
|
||||
object_id = model_obj.search(cr, uid, [('model','=',model)])
|
||||
vals = self.read(cr, uid, ids[0], [], context=context)
|
||||
if vals.get('project_'+type) and object_id:
|
||||
server_vals = {
|
||||
'name': type,
|
||||
'object_id': object_id[0],
|
||||
'server': vals.get(type+'_server'),
|
||||
'port': vals.get(type+'_port'),
|
||||
'is_ssl': vals.get(type+'_is_ssl'),
|
||||
'type': vals.get(type+'_type'),
|
||||
'user': vals.get(type+'_user'),
|
||||
'password': vals.get(type+'_password')
|
||||
}
|
||||
server_ids = fetchmail_obj.search(cr, uid, [('name','=',type),('state','!=','done')])
|
||||
if not server_ids:
|
||||
server_ids = [fetchmail_obj.create(cr, uid, server_vals, context=context)]
|
||||
else:
|
||||
server_ids = fetchmail_obj.search(cr, uid, [('name','=',type)], context=context)
|
||||
fetchmail_obj.write(cr, uid, server_ids, server_vals, context=context)
|
||||
fetchmail_obj.button_confirm_login(cr, uid, server_ids, context=None)
|
||||
|
||||
else:
|
||||
server_ids = fetchmail_obj.search(cr, uid, [('name','=',type),('state','=','done')])
|
||||
fetchmail_obj.set_draft(cr, uid, server_ids, context=None)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -24,5 +24,6 @@ import company
|
|||
import report
|
||||
import wizard
|
||||
import res_partner
|
||||
import res_config
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -57,7 +57,8 @@ Dashboard for project members that includes:
|
|||
"report/project_report_view.xml",
|
||||
"board_project_view.xml",
|
||||
'board_project_manager_view.xml',
|
||||
'report/project_cumulative.xml'
|
||||
'report/project_cumulative.xml',
|
||||
'res_config_view.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
'project_demo.xml',
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
# -*- 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
|
||||
|
||||
class project_configuration(osv.osv_memory):
|
||||
_inherit = 'project.config.settings'
|
||||
|
||||
_columns = {
|
||||
'module_project_mrp': fields.boolean('Create tasks directly from a sale order',
|
||||
help ="""Automatically creates project tasks from procurement lines of type 'service'.
|
||||
This installs the module project_mrp."""),
|
||||
'module_pad': fields.boolean("Write task specifications on collaborative note pads",
|
||||
help="""Lets the company customize which Pad installation should be used to link to new pads
|
||||
(by default, http://ietherpad.com/).
|
||||
This installs the module pad."""),
|
||||
'module_project_timesheet': fields.boolean("Invoice working time on tasks",
|
||||
help="""This allows you to transfer the entries under tasks defined for Project Management to
|
||||
the timesheet line entries for particular date and user, with the effect of creating,
|
||||
editing and deleting either ways.
|
||||
This installs the module project_timesheet."""),
|
||||
'module_project_scrum': fields.boolean("Manage your project following Agile methodology",
|
||||
help="""This allows to implement all concepts defined by the scrum project management methodology for IT companies.
|
||||
* Project with sprints, product owner, scrum master;
|
||||
* Sprints with reviews, daily meetings, feedbacks;
|
||||
* Product backlog;
|
||||
* Sprint backlog.
|
||||
This installs the module project_scrum."""),
|
||||
'module_project_planning' : fields.boolean("Manage planning",
|
||||
help="""This module helps you to manage your plannings.
|
||||
Each department manager can know whether someone in their team has still unallocated time for a given
|
||||
planning (taking into consideration the validated leaves), or whether he/she still needs to encode tasks.
|
||||
This installs the module project_planning."""),
|
||||
'module_project_long_term': fields.boolean("Manage long term planning",
|
||||
help="""A long term project management module that tracks planning, scheduling, and resource allocation.
|
||||
This installs the module project_long_term."""),
|
||||
'module_project_issue_sheet': fields.boolean("Track and invoice issues working time",
|
||||
help="""Provides timesheet support for the issues/bugs management in project.
|
||||
This installs the module project_issue_sheet."""),
|
||||
}
|
||||
|
||||
def onchange_server_type(self, cr, uid, ids, server_type=False, ssl=False , type=[]):
|
||||
port = 0
|
||||
values = {}
|
||||
if server_type == 'pop':
|
||||
port = ssl and 995 or 110
|
||||
elif server_type == 'imap':
|
||||
port = ssl and 993 or 143
|
||||
else:
|
||||
values[type+'_server'] = ''
|
||||
values[type+'_port'] = port
|
||||
return {'value': values}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,34 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_project_config" model="ir.ui.view">
|
||||
<field name="name">Project Application</field>
|
||||
<field name="model">project.config.settings</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.project_settings_form_view"/>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="project" position="after">
|
||||
<separator string="Project" colspan="4"/>
|
||||
<field name="module_project_mrp"/>
|
||||
<field name="module_project_timesheet"/>
|
||||
<field name="module_pad"/>
|
||||
<field name="module_project_scrum"/>
|
||||
|
||||
<separator string="Planning" colspan="4"/>
|
||||
<field name="module_project_planning"/>
|
||||
<field name="module_project_long_term"/>
|
||||
</group>
|
||||
|
||||
<group name="helpdesk" position="after">
|
||||
<field name="module_project_issue_sheet"/>
|
||||
<newline/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="base.menu_project_config" name="Projects" parent="base.menu_config"
|
||||
sequence="5" action="base.action_project_config"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -22,5 +22,6 @@
|
|||
|
||||
import project_issue
|
||||
import report
|
||||
import res_config
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -52,6 +52,7 @@ and decide on their status as they evolve.
|
|||
'security/project_issue_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
"board_project_issue_view.xml",
|
||||
"res_config_view.xml",
|
||||
],
|
||||
'demo_xml': ['project_issue_demo.xml'],
|
||||
'test': [
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
# -*- 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
|
||||
|
||||
class project_issue_mail_configuration(osv.osv_memory):
|
||||
_inherit = 'project.config.settings'
|
||||
_columns = {
|
||||
'project_issue': fields.boolean("Create issues from an email account",
|
||||
help="""Allows you to configure your incoming mail server, and create issues from incoming emails."""),
|
||||
'issue_server' : fields.char('Server Name', size=256),
|
||||
'issue_port' : fields.integer('Port'),
|
||||
'issue_type': fields.selection([
|
||||
('pop', 'POP Server'),
|
||||
('imap', 'IMAP Server'),
|
||||
('local', 'Local Server'),
|
||||
], 'Server Type'),
|
||||
'issue_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
|
||||
'issue_user' : fields.char('Username', size=256),
|
||||
'issue_password' : fields.char('Password', size=1024),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'issue_type': 'pop',
|
||||
}
|
||||
|
||||
def get_default_issue_server(self, cr, uid, ids, context=None):
|
||||
context.update({'type':'issue'})
|
||||
res = self.get_default_email_configurations(cr, uid, ids, context)
|
||||
return res
|
||||
|
||||
def set_default_issue_server(self, cr, uid, ids, context=None):
|
||||
context.update({'type':'issue','obj':'project.issue'})
|
||||
self.set_email_configurations(cr, uid, ids, context)
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_project_config_issue" model="ir.ui.view">
|
||||
<field name="name">Project Application</field>
|
||||
<field name="model">project.config.settings</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.project_settings_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="helpdesk" position="after">
|
||||
<field name="project_issue"/>
|
||||
<group colspan="2" attrs="{'invisible': [('project_issue','=',False)]}">
|
||||
<field name="issue_server" attrs="{'required': [('project_issue','=',True)]}"/>
|
||||
<field name="issue_type" nolabel="1" on_change="onchange_server_type(issue_type, issue_is_ssl,'issue')" attrs="{'required': [('project_issue','=',True)]}"/>
|
||||
<field name="issue_port" attrs="{'required': [('project_issue','=',True)]}"/>
|
||||
<field name="issue_is_ssl" on_change="onchange_server_type(issue_type, issue_is_ssl, 'issue')"/>
|
||||
<field name="issue_user" attrs="{'required': [('project_issue','=',True)]}"/>
|
||||
<field name="issue_password" password="True" attrs="{'required': [('project_issue','=',True)]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue