[IMP] clean project_* code (ARA)
bzr revid: mra@mra-laptop-20100702141550-05xl1o45ophjl23t
This commit is contained in:
parent
38738c887d
commit
5477d0de86
|
@ -22,4 +22,4 @@
|
|||
import project_long_term
|
||||
import wizard
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -18,13 +18,14 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Long Term Project Management",
|
||||
"name": "Long Term Project Management",
|
||||
"version": "1.1",
|
||||
"author" : "Tiny",
|
||||
"website" : "http://www.openerp.com",
|
||||
"category" : "Generic Modules/Projects & Services",
|
||||
"depends" : ["project", "resource"],
|
||||
"author": "Tiny",
|
||||
"website": "http://www.openerp.com",
|
||||
"category": "Generic Modules/Projects & Services",
|
||||
"depends": ["project", "resource"],
|
||||
"description": """
|
||||
|
||||
Long Term Project management module that tracks planning, scheduling, resources allocation.
|
||||
|
@ -36,9 +37,9 @@
|
|||
- Schedule Tasks: All the tasks which are in draft,pending and open state are scheduled with taking the phase's start date
|
||||
|
||||
""",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["project_long_term_demo.xml"],
|
||||
"test" : [
|
||||
"init_xml": [],
|
||||
"demo_xml": ["project_long_term_demo.xml"],
|
||||
"test": [
|
||||
'test/schedule_project_phases.yml',
|
||||
'test/schedule_project_tasks.yml',
|
||||
'test/schedule_phase_tasks.yml'
|
||||
|
|
|
@ -29,7 +29,10 @@ class project_phase(osv.osv):
|
|||
_name = "project.phase"
|
||||
_description = "Project Phase"
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, context={}):
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
data_phase = self.browse(cr, uid, ids[0], context=context)
|
||||
prev_ids = data_phase.previous_phase_ids
|
||||
next_ids = data_phase.next_phase_ids
|
||||
|
@ -45,7 +48,7 @@ class project_phase(osv.osv):
|
|||
next_ids = [rec.id for rec in next_ids]
|
||||
# iter prev_ids
|
||||
while prev_ids:
|
||||
cr.execute('select distinct prv_phase_id from project_phase_rel where next_phase_id IN %s',(tuple(prev_ids),))
|
||||
cr.execute('SELECT distinct prv_phase_id FROM project_phase_rel WHERE next_phase_id IN %s', (tuple(prev_ids),))
|
||||
prv_phase_ids = filter(None, map(lambda x: x[0], cr.fetchall()))
|
||||
if data_phase.id in prv_phase_ids:
|
||||
return False
|
||||
|
@ -55,7 +58,7 @@ class project_phase(osv.osv):
|
|||
prev_ids = prv_phase_ids
|
||||
# iter next_ids
|
||||
while next_ids:
|
||||
cr.execute('select distinct next_phase_id from project_phase_rel where prv_phase_id IN %s',(tuple(next_ids),))
|
||||
cr.execute('SELECT distinct next_phase_id FROM project_phase_rel WHERE prv_phase_id IN %s', (tuple(next_ids),))
|
||||
next_phase_ids = filter(None, map(lambda x: x[0], cr.fetchall()))
|
||||
if data_phase.id in next_phase_ids:
|
||||
return False
|
||||
|
@ -65,19 +68,19 @@ class project_phase(osv.osv):
|
|||
next_ids = next_phase_ids
|
||||
return True
|
||||
|
||||
def _check_dates(self, cr, uid, ids, context={}):
|
||||
def _check_dates(self, cr, uid, ids, context=None):
|
||||
for phase in self.read(cr, uid, ids, ['date_start', 'date_end'], context=context):
|
||||
if phase['date_start'] and phase['date_end'] and phase['date_start'] > phase['date_end']:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _check_constraint_start(self, cr, uid, ids, context={}):
|
||||
def _check_constraint_start(self, cr, uid, ids, context=None):
|
||||
phase = self.read(cr, uid, ids[0], ['date_start', 'constraint_date_start'], context=context)
|
||||
if phase['date_start'] and phase['constraint_date_start'] and phase['date_start'] < phase['constraint_date_start']:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _check_constraint_end(self, cr, uid, ids, context={}):
|
||||
def _check_constraint_end(self, cr, uid, ids, context=None):
|
||||
phase = self.read(cr, uid, ids[0], ['date_end', 'constraint_date_end'], context=context)
|
||||
if phase['date_end'] and phase['constraint_date_end'] and phase['date_end'] > phase['constraint_date_end']:
|
||||
return False
|
||||
|
@ -97,7 +100,7 @@ class project_phase(osv.osv):
|
|||
'product_uom': fields.many2one('product.uom', 'Duration UoM', required=True, help="UoM (Unit of Measure) is the unit of measurement for Duration"),
|
||||
'task_ids': fields.one2many('project.task', 'phase_id', "Project Tasks"),
|
||||
'resource_ids': fields.one2many('project.resource.allocation', 'phase_id', "Project Resources"),
|
||||
'responsible_id':fields.many2one('res.users', 'Responsible'),
|
||||
'responsible_id': fields.many2one('res.users', 'Responsible'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
|
||||
help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\
|
||||
\n If the phase is over, the states is set to \'Done\'.')
|
||||
|
@ -116,7 +119,7 @@ class project_phase(osv.osv):
|
|||
#(_check_constraint_end, 'Phase must end-before constraint end Date.', ['date_end', 'constraint_date_end']),
|
||||
]
|
||||
|
||||
def onchange_project(self, cr, uid, ids, project, context={}):
|
||||
def onchange_project(self, cr, uid, ids, project, context=None):
|
||||
result = {}
|
||||
project_obj = self.pool.get('project.project')
|
||||
if project:
|
||||
|
@ -126,7 +129,9 @@ class project_phase(osv.osv):
|
|||
return {'value': result}
|
||||
return {'value': {'date_start': []}}
|
||||
|
||||
def _check_date_start(self, cr, uid, phase, date_end, context={}):
|
||||
def _check_date_start(self, cr, uid, phase, date_end, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
"""
|
||||
Check And Compute date_end of phase if change in date_start < older time.
|
||||
"""
|
||||
|
@ -147,7 +152,9 @@ class project_phase(osv.osv):
|
|||
dt_start = work_times[0][0].strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.write(cr, uid, [phase.id], {'date_start': dt_start, 'date_end': date_end.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
|
||||
|
||||
def _check_date_end(self, cr, uid, phase, date_start, context={}):
|
||||
def _check_date_end(self, cr, uid, phase, date_start, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
"""
|
||||
Check And Compute date_end of phase if change in date_end > older time.
|
||||
"""
|
||||
|
@ -168,11 +175,11 @@ class project_phase(osv.osv):
|
|||
dt_end = work_times[-1][1].strftime('%Y-%m-%d %H:%M:%S')
|
||||
self.write(cr, uid, [phase.id], {'date_start': date_start.strftime('%Y-%m-%d %H:%M:%S'), 'date_end': dt_end}, context=context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context={}):
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
resource_calendar_obj = self.pool.get('resource.calendar')
|
||||
resource_obj = self.pool.get('resource.resource')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
if not context:
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('scheduler',False):
|
||||
return super(project_phase, self).write(cr, uid, ids, vals, context=context)
|
||||
|
@ -191,7 +198,7 @@ class project_phase(osv.osv):
|
|||
# Change the date_start and date_end
|
||||
# for previous and next phases respectively based on valid condition
|
||||
if vals.get('date_start', False) and vals['date_start'] < phase.date_start:
|
||||
dt_start = mx.DateTime.strptime(vals['date_start'],'%Y-%m-%d %H:%M:%S')
|
||||
dt_start = mx.DateTime.strptime(vals['date_start'], '%Y-%m-%d %H:%M:%S')
|
||||
work_times = resource_calendar_obj.interval_get(cr, uid, calendar_id, dt_start, avg_hours or 0.0, resource_id and resource_id[0] or False)
|
||||
if work_times:
|
||||
vals['date_end'] = work_times[-1][1].strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
@ -214,7 +221,7 @@ class project_phase(osv.osv):
|
|||
self.write(cr, uid, ids, {'state': 'open'})
|
||||
return True
|
||||
|
||||
def set_pending(self, cr, uid, ids,*args):
|
||||
def set_pending(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'pending'})
|
||||
return True
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Requests Links -->
|
||||
<record id="req_link_project" model="res.request.link">
|
||||
<field name="name">Project</field>
|
||||
|
@ -10,5 +11,6 @@
|
|||
<field name="name">Project task</field>
|
||||
<field name="object">project.task</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -8,151 +8,151 @@
|
|||
<field name="address_id" ref="base.main_address"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">Demo User1</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="signature">Mr Demo</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Setup')]"/>
|
||||
<field name="login">demo1</field>
|
||||
<field name="password">demo1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_manager0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">Manager1</field>
|
||||
<field eval="[(6,0,[ref('base.group_user'),ref('project.group_project_manager')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_manager')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">manager1</field>
|
||||
<field name="password">manager1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_manager1" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">Manager2</field>
|
||||
<field eval="[(6,0,[ref('base.group_user'),ref('project.group_project_manager')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_manager')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">manager2</field>
|
||||
<field name="password">manager2</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_user0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user1</field>
|
||||
<field eval="[(6,0,[ref('base.group_user'),ref('project.group_project_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user1</field>
|
||||
<field name="password">USER1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_user1" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user2</field>
|
||||
<field eval="[(6,0,[ref('base.group_user'),ref('project.group_project_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user2</field>
|
||||
<field name="password">user2</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_userfinance0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_finance</field>
|
||||
<field eval="[(6,0,[ref('base.group_user'),ref('project.group_project_finance')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_finance')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_finance</field>
|
||||
<field name="password">user_finance</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_userdesign0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_design1</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_design1</field>
|
||||
<field name="password">user_design1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_userdesign1" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_design2</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_design2</field>
|
||||
<field name="password">user_design2</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_userdeveloper0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_developer1</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_developer1</field>
|
||||
<field name="password">user_developer1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_userdeveloper1" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_developer2</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_developer2</field>
|
||||
<field name="password">user_developer1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_usertester0" model="res.users">
|
||||
|
@ -161,43 +161,43 @@
|
|||
<field name="name">user_tester1</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_tester1</field>
|
||||
<field name="password">user_tester1</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_usertester1" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_tester2</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_tester2</field>
|
||||
<field name="password">user_tester2</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_useranalyst0" model="res.users">
|
||||
<field model="ir.actions.actions" name="menu_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="context_lang">en_US</field>
|
||||
<field name="name">user_analyst</field>
|
||||
<field eval="[(6,0,[ref('base.group_user')])]" name="groups_id"/>
|
||||
<field eval="[(6, 0, [ref('base.group_user')])]" name="groups_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="[(6,0,[])]" name="roles_id"/>
|
||||
<field eval="[(6,0,[])]" name="rules_id"/>
|
||||
<field eval="[(6, 0, [])]" name="roles_id"/>
|
||||
<field eval="[(6, 0, [])]" name="rules_id"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field model="ir.actions.actions" name="action_id" search="[('name', '=', u'Menu')]"/>
|
||||
<field name="login">user_analyst</field>
|
||||
<field name="password">user_analyst</field>
|
||||
<field eval="[(6,0,[])]" name="company_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="company_ids"/>
|
||||
</record>
|
||||
|
||||
<!-- Resources -->
|
||||
|
@ -255,17 +255,17 @@
|
|||
<field name="state">open</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="description">Develop an OpenERP Website.</field>
|
||||
<field eval="[(6,0,[ref('res_users_manager0'),ref('res_users_user0'),ref('res_users_userfinance0'),ref('res_users_userdesign0'),ref('res_users_userdeveloper0'),ref('res_users_usertester0'),ref('res_users_useranalyst0')])]" name="members"/>
|
||||
<field eval="[(6, 0, [ref('res_users_manager0'), ref('res_users_user0'), ref('res_users_userfinance0'), ref('res_users_userdesign0'), ref('res_users_userdeveloper0'), ref('res_users_usertester0'), ref('res_users_useranalyst0')])]" name="members"/>
|
||||
<field name="date">2010-04-30</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field eval="[(6,0,[])]" name="type_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="type_ids"/>
|
||||
<field name="name">OpenERP Website Development</field>
|
||||
</record>
|
||||
|
||||
<!-- Project Phases -->
|
||||
<record id="project_phase_informationgatheringandunderstanding0" model="project.phase">
|
||||
<field eval="[(6,0,[])]" name="previous_phase_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="previous_phase_ids"/>
|
||||
<field name="name">Information Gathering and Understanding</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
|
@ -280,7 +280,7 @@
|
|||
</record>
|
||||
|
||||
<record id="project_phase_planning0" model="project.phase">
|
||||
<field eval="[(6,0,[ref('project_phase_informationgatheringandunderstanding0')])]" name="previous_phase_ids"/>
|
||||
<field eval="[(6, 0, [ref('project_phase_informationgatheringandunderstanding0')])]" name="previous_phase_ids"/>
|
||||
<field name="name">Planning</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
|
@ -295,7 +295,7 @@
|
|||
</record>
|
||||
|
||||
<record id="project_phase_webdesign0" model="project.phase">
|
||||
<field eval="[(6,0,[ref('project_phase_informationgatheringandunderstanding0'),ref('project_phase_planning0')])]" name="previous_phase_ids"/>
|
||||
<field eval="[(6, 0, [ref('project_phase_informationgatheringandunderstanding0'), ref('project_phase_planning0')])]" name="previous_phase_ids"/>
|
||||
<field name="name">Web Design </field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
|
@ -310,7 +310,7 @@
|
|||
</record>
|
||||
|
||||
<record id="project_phase_developmentintegrationandtesting0" model="project.phase">
|
||||
<field eval="[(6,0,[ref('project_phase_informationgatheringandunderstanding0'),ref('project_phase_planning0'),ref('project_phase_webdesign0')])]" name="previous_phase_ids"/>
|
||||
<field eval="[(6, 0, [ref('project_phase_informationgatheringandunderstanding0'), ref('project_phase_planning0'), ref('project_phase_webdesign0')])]" name="previous_phase_ids"/>
|
||||
<field name="name">Development, Integration and Testing</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
|
@ -325,7 +325,7 @@
|
|||
</record>
|
||||
|
||||
<record id="project_phase_websitedeployment0" model="project.phase">
|
||||
<field eval="[(6,0,[ref('project_phase_informationgatheringandunderstanding0'),ref('project_phase_planning0'),ref('project_phase_webdesign0'),ref('project_phase_developmentintegrationandtesting0')])]" name="previous_phase_ids"/>
|
||||
<field eval="[(6, 0, [ref('project_phase_informationgatheringandunderstanding0'), ref('project_phase_planning0'), ref('project_phase_webdesign0'), ref('project_phase_developmentintegrationandtesting0')])]" name="previous_phase_ids"/>
|
||||
<field name="name">Website Deployment</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
|
@ -405,8 +405,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Prepare Requirements Document</field>
|
||||
<field name="date_deadline">2010-03-08</field>
|
||||
|
@ -424,8 +424,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Define Website Goals, Purposes and Target Audience</field>
|
||||
<field name="date_deadline">2010-03-04</field>
|
||||
|
@ -443,8 +443,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Use Cases</field>
|
||||
<field name="date_deadline">2010-03-10</field>
|
||||
|
@ -462,8 +462,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Budget Planning</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
|
@ -481,8 +481,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Quality Planning</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
|
@ -500,8 +500,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Risk Management Planning</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
|
@ -519,8 +519,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Create Project Schedules</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
|
@ -538,8 +538,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Dataflow Design</field>
|
||||
<field name="date_deadline">2010-04-02</field>
|
||||
|
@ -557,8 +557,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">User Interface Design</field>
|
||||
<field name="date_deadline">2010-04-10</field>
|
||||
|
@ -576,8 +576,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Task Level WBS</field>
|
||||
<field name="date_deadline">2010-04-07</field>
|
||||
|
@ -595,8 +595,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modular Programming</field>
|
||||
<field name="date_deadline">2010-04-22</field>
|
||||
|
@ -613,8 +613,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Integrate Modules</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -631,8 +631,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Unit Testing</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -649,8 +649,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Regression Test</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -667,8 +667,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Documentation</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -685,8 +685,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Performance Tuning</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -703,8 +703,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Deploy Website</field>
|
||||
<field name="date_deadline">2010-04-26</field>
|
||||
|
@ -721,8 +721,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Presentation</field>
|
||||
<field name="date_deadline">2010-04-28</field>
|
||||
|
@ -739,8 +739,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Deployment</field>
|
||||
<field name="date_deadline">2010-04-28</field>
|
||||
|
@ -758,8 +758,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Presentation</field>
|
||||
<field name="date_deadline">2010-04-29</field>
|
||||
|
@ -777,8 +777,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modules Integration</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -796,8 +796,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Unit Testing</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -815,8 +815,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modular Testing</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
|
@ -834,8 +834,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Documentation</field>
|
||||
<field name="date_deadline">2010-04-28</field>
|
||||
|
@ -853,8 +853,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Performance Tuning</field>
|
||||
<field name="date_deadline">2010-04-27</field>
|
||||
|
@ -873,8 +873,8 @@
|
|||
<field name="priority">2</field>
|
||||
<field name="state">draft</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6,0,[])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[])]" name="parent_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modular Programming</field>
|
||||
<field name="date_deadline">2010-04-22</field>
|
||||
|
@ -882,5 +882,6 @@
|
|||
<field eval="100.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report auto="False" id="report_project_task_gantt" model="project.task" name="project.tasks.gantt" string="Gantt Representation"/>
|
||||
<report auto="False" id="report_project_project_gantt" model="project.project" name="project.project.gantt" string="Gantt Representation"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<!--<wizard id="wizard_schedule_task" menu="False" model="project.phase" name="phase.schedule.tasks" string="Schedule Tasks"/>-->
|
||||
<!--<wizard id="wizard_compute_task" model="project.task" menu="False" name="wizard.compute.tasks" string="Compute Task Scheduling"/>-->
|
||||
|
||||
<!-- <menuitem icon="terp-project" id="base.menu_main" name="Project Management" sequence="1"/>-->
|
||||
<!--<menuitem icon="terp-project" id="base.menu_main" name="Project Management" sequence="1"/>-->
|
||||
<!--<menuitem id="base.menu_pm_planning" name="Planning" parent="base.menu_main" sequence="3"/>-->
|
||||
<!-- <menuitem
|
||||
action="wizard_compute_phase"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="wkf_phase" model="workflow">
|
||||
<field name="name">project.phase.wkf</field>
|
||||
<field name="osv">project.phase</field>
|
||||
|
@ -104,5 +105,6 @@
|
|||
<field name="act_to" ref="act_draft"/>
|
||||
<field name="signal">set_draft</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -25,4 +25,3 @@ import project_schedule_tasks
|
|||
import working_calendar
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import datetime
|
||||
from resource.faces import *
|
||||
from new import classobj
|
||||
|
@ -48,6 +49,8 @@ class project_compute_phases(osv.osv_memory):
|
|||
return self.compute_date(cr, uid, ids, context=context)
|
||||
|
||||
def _phase_schedule(self, cr, uid, phase, start_date, calendar_id=False, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
"""Schedule phase with the start date till all the next phases are completed.
|
||||
|
||||
Arguements: start_dsate -- start date for the phase
|
||||
|
@ -118,7 +121,7 @@ class project_compute_phases(osv.osv_memory):
|
|||
context=ctx)
|
||||
# Recursive call till all the next phases scheduled
|
||||
for phase in phase.next_phase_ids:
|
||||
if phase.state in ['draft','open','pending']:
|
||||
if phase.state in ['draft', 'open', 'pending']:
|
||||
id_cal = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False
|
||||
self._phase_schedule(cr, uid, phase, date_start, id_cal, context=context)
|
||||
else:
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Compute Scheduling of Phases">
|
||||
<group width="380" height="180">
|
||||
<group colspan="4" col="4">
|
||||
<label colspan="4" string="This wizard will schedule phases for all or specified project" />
|
||||
<newline />
|
||||
<field name="target_project" colspan="4"/>
|
||||
</group>
|
||||
<newline />
|
||||
<group colspan="4" col="6" attrs="{'invisible':[('target_project','=','all')]}">
|
||||
<field name="project_id"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6"> <!-- Improve me -->
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="check_selection" string="_Compute" type="object"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<label colspan="4" string="This wizard will schedule phases for all or specified project" />
|
||||
<newline />
|
||||
<field name="target_project" colspan="4"/>
|
||||
</group>
|
||||
<newline />
|
||||
<group colspan="4" col="6" attrs="{'invisible':[('target_project','=','all')]}">
|
||||
<field name="project_id"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6"> <!-- Improve me -->
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="check_selection" string="_Compute" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_project_compute_phases_select"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="context">{'record_id': active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
@ -43,4 +43,4 @@
|
|||
parent="menu_phase_schedule" action="action_project_compute_phases"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -69,7 +69,7 @@ class project_compute_tasks(osv.osv_memory):
|
|||
resource_id = resource_obj.search(cr, uid, [('user_id', '=', user.id)], context=context)
|
||||
if resource_id:
|
||||
# resource = resource_obj.browse(cr, uid, resource_id, context=context)[0]
|
||||
resource = resource_obj.read(cr, uid, resource_id, ['calendar_id','time_efficiency'], context=context)[0]
|
||||
resource = resource_obj.read(cr, uid, resource_id, ['calendar_id', 'time_efficiency'], context=context)[0]
|
||||
if resource.get('calendar_id', False):
|
||||
leaves = wkcal.compute_leaves(cr, uid, calendar_id , resource_id[0], resource['calendar_id'] and resource['calendar_id'][0] or False)
|
||||
time_efficiency = resource.get('time_efficiency')
|
||||
|
@ -126,7 +126,7 @@ class project_compute_tasks(osv.osv_memory):
|
|||
s_date = t.start.to_datetime()
|
||||
e_date = t.end.to_datetime()
|
||||
if loop_no == 0:
|
||||
project_obj.write(cr, uid, [project_id], {'date' : e_date}, context=context)
|
||||
project_obj.write(cr, uid, [project_id], {'date': e_date}, context=context)
|
||||
else:
|
||||
ctx = context.copy()
|
||||
ctx.update({'scheduler': True})
|
||||
|
|
|
@ -34,4 +34,4 @@
|
|||
parent="menu_phase_schedule" action="action_project_compute_tasks"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -40,6 +40,8 @@ class project_schedule_task(osv.osv_memory):
|
|||
}
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
res = super(project_schedule_task, self).default_get(cr, uid, fields_list, context)
|
||||
self.compute_date(cr, uid, context=context)
|
||||
return res
|
||||
|
@ -70,6 +72,8 @@ class project_schedule_task(osv.osv_memory):
|
|||
return resource_objs
|
||||
|
||||
def compute_date(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
"""
|
||||
Schedule the tasks according to resource available and priority.
|
||||
"""
|
||||
|
@ -152,7 +156,7 @@ class project_schedule_task(osv.osv_memory):
|
|||
'date_end': e_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'user_id': user_id[0]},
|
||||
context=ctx)
|
||||
loop_no +=1
|
||||
loop_no += 1
|
||||
return {}
|
||||
|
||||
project_schedule_task()
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_project_schedule_tasks"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="context">{'record_id': active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -18,21 +18,27 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import datetime
|
||||
|
||||
import pooler
|
||||
|
||||
def convert_timeformat(cr, uid, time_string, context={}):
|
||||
def convert_timeformat(cr, uid, time_string, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
""" Convert input time string: 8.5 to output time string 8:30."""
|
||||
|
||||
split_list = str(time_string).split('.')
|
||||
hour_part = split_list[0]
|
||||
mins_part = split_list[1]
|
||||
round_mins = int(round(float(mins_part) * 60,-2))
|
||||
round_mins = int(round(float(mins_part) * 60,-2))
|
||||
converted_string = hour_part + ':' + str(round_mins)[0:2]
|
||||
return converted_string
|
||||
|
||||
def compute_leaves(cr, uid, calendar_id, resource_id=False, resource_calendar=False, context={}):
|
||||
def compute_leaves(cr, uid, calendar_id, resource_id=False, resource_calendar=False, context=None):
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
"""Compute the leaves from the working calendar of the resource.
|
||||
|
||||
|
@ -63,7 +69,10 @@ def compute_leaves(cr, uid, calendar_id, resource_id=False, resource_calendar=Fa
|
|||
leave_list.sort()
|
||||
return leave_list
|
||||
|
||||
def compute_working_calendar(cr, uid, calendar_id, context={}):
|
||||
def compute_working_calendar(cr, uid, calendar_id, context=None):
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
"""Change the format of working calendar from 'Openerp' format to bring it into 'Faces' format.
|
||||
|
||||
|
@ -103,7 +112,7 @@ def compute_working_calendar(cr, uid, calendar_id, context={}):
|
|||
for k,v in wk_time.items():
|
||||
wktime_cal.append(tuple(v))
|
||||
# Add for the non-working days like: [('sat, sun', '8:00-8:00')]
|
||||
for k,v in wk_days.items():
|
||||
for k, v in wk_days.items():
|
||||
if week_days.has_key(k):
|
||||
week_days.pop(k)
|
||||
for v in week_days.itervalues():
|
||||
|
@ -111,4 +120,4 @@ def compute_working_calendar(cr, uid, calendar_id, context={}):
|
|||
if non_working:
|
||||
wktime_cal.append((non_working[:-1], time_range))
|
||||
return wktime_cal
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -21,10 +21,10 @@
|
|||
|
||||
|
||||
{
|
||||
"name" : "In-Project Messaging System",
|
||||
"version" : "1.0",
|
||||
"depends" : ["project"],
|
||||
"author" : "Tiny",
|
||||
"name": "In-Project Messaging System",
|
||||
"version": "1.0",
|
||||
"depends": ["project"],
|
||||
"author": "Tiny",
|
||||
"description": """
|
||||
This module provides the functionality to send messages within a project.'
|
||||
A user can send messages individually to other user also he can broadcast
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
import netsvc
|
||||
|
||||
|
@ -29,16 +30,15 @@ class messages(osv.osv):
|
|||
logger = netsvc.Logger()
|
||||
|
||||
_columns = {
|
||||
'from_id':fields.many2one('res.users', 'From', ondelete="CASCADE"),
|
||||
'to_id':fields.many2one('res.users', 'To', ondelete="CASCADE"),
|
||||
'project_id':fields.many2one('project.project', 'Project',
|
||||
'from_id': fields.many2one('res.users', 'From', ondelete="CASCADE"),
|
||||
'to_id': fields.many2one('res.users', 'To', ondelete="CASCADE"),
|
||||
'project_id': fields.many2one('project.project', 'Project',
|
||||
required=True, ondelete="CASCADE"),
|
||||
'message':fields.text('Message', required=True),
|
||||
'message': fields.text('Message', required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'from_id':lambda self, cr, uid, context: uid,
|
||||
'to_id':None,
|
||||
'from_id': lambda self, cr, uid, context: uid,
|
||||
'to_id': None,
|
||||
}
|
||||
|
||||
def broadcast(self, cr, uid, project_id, message, context=None):
|
||||
|
@ -67,6 +67,7 @@ class project_with_message(osv.osv):
|
|||
'project.messages', 'project_id', 'Messages',
|
||||
domain="[('to_id','in',[uid,False])]"),
|
||||
}
|
||||
|
||||
project_with_message()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -21,4 +21,3 @@
|
|||
import mrp
|
||||
import project_mrp
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,35 +15,38 @@
|
|||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv, orm
|
||||
|
||||
import tools
|
||||
|
||||
class procurement_order(osv.osv):
|
||||
_name = "procurement.order"
|
||||
_inherit = "procurement.order"
|
||||
|
||||
def action_produce_assign_service(self, cr, uid, ids, context={}):
|
||||
|
||||
def action_produce_assign_service(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
for procurement in self.browse(cr, uid, ids):
|
||||
sline = self.pool.get('sale.order.line')
|
||||
content = ''
|
||||
sale_order = self.pool.get('sale.order')
|
||||
so_ref = procurement.name.split(':')[0]
|
||||
order_ids = sale_order.search(cr, uid, [('name','=',so_ref)], context)
|
||||
order_ids = sale_order.search(cr, uid, [('name', '=', so_ref)], context)
|
||||
|
||||
if order_ids:
|
||||
sale_ids = sale_order.read(cr, uid, order_ids[0],['order_line'],context=context)['order_line']
|
||||
sale_ids = sale_order.read(cr, uid, order_ids[0], ['order_line'], context=context)['order_line']
|
||||
else:
|
||||
so_ref = procurement.origin.split(':')[0]
|
||||
sale_ids = sline.search(cr, uid, [('procurement_id','=',procurement.id)], context)
|
||||
sale_ids = sline.search(cr, uid, [('procurement_id', '=',procurement.id)], context)
|
||||
l = None
|
||||
project_id = None
|
||||
analytic_account_id = False
|
||||
partner_id = False
|
||||
|
||||
|
||||
for line in sline.browse(cr, uid, sale_ids, context=context):
|
||||
content += (line.notes or '')
|
||||
l = line
|
||||
|
@ -53,28 +56,28 @@ class procurement_order(osv.osv):
|
|||
partner_id = line.order_id.partner_id.id
|
||||
content+="\n\n"+line.order_id.project_id.complete_name
|
||||
break
|
||||
|
||||
|
||||
# Creating a project for task.Project is created from Procurement.
|
||||
project_obj = self.pool.get('project.project')
|
||||
proj_name = tools.ustr(so_ref)
|
||||
proj_exist_id = project_obj.search(cr, uid, [('name','=',proj_name)], context=context)
|
||||
proj_exist_id = project_obj.search(cr, uid, [('name', '=', proj_name)], context=context)
|
||||
if not proj_exist_id:
|
||||
project_id = project_obj.create(cr, uid, {'name':proj_name, 'partner_id':partner_id})
|
||||
project_id = project_obj.create(cr, uid, {'name': proj_name, 'partner_id': partner_id})
|
||||
else:
|
||||
project_id = proj_exist_id[0]
|
||||
|
||||
self.write(cr, uid, [procurement.id], {'state':'running'})
|
||||
|
||||
|
||||
self.write(cr, uid, [procurement.id], {'state': 'running'})
|
||||
|
||||
name_task = ('','')
|
||||
if procurement.product_id.type == 'service':
|
||||
proc_name = procurement.name
|
||||
if procurement.origin == proc_name:
|
||||
proc_name = procurement.product_id.name
|
||||
|
||||
|
||||
name_task = (procurement.origin, proc_name or '')
|
||||
else:
|
||||
name_task = (procurement.product_id.name or procurement.origin, procurement.name or '')
|
||||
|
||||
|
||||
task_id = self.pool.get('project.task').create(cr, uid, {
|
||||
'name': '%s:%s' % name_task,
|
||||
'date_deadline': procurement.date_planned,
|
||||
|
@ -90,8 +93,9 @@ class procurement_order(osv.osv):
|
|||
'company_id': procurement.company_id.id,
|
||||
'project_id': project_id,
|
||||
},context=context)
|
||||
|
||||
return task_id
|
||||
|
||||
procurement_order()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -49,4 +49,4 @@ class project_task(osv.osv):
|
|||
|
||||
project_task()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="workflow.transition" id="procurement.trans_produce_service_make_done">
|
||||
<field name="act_from" ref="procurement.act_produce_service"/>
|
||||
<field name="act_to" ref="procurement.act_make_done"/>
|
||||
<field name="signal">subflow.done</field>
|
||||
</record>
|
||||
</data>
|
||||
<data>
|
||||
<record model="workflow.transition" id="procurement.trans_produce_service_make_done">
|
||||
<field name="act_from" ref="procurement.act_produce_service"/>
|
||||
<field name="act_to" ref="procurement.act_make_done"/>
|
||||
<field name="signal">subflow.done</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -23,4 +23,3 @@ import project_planning
|
|||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
</xpath>
|
||||
</field>
|
||||
</record>"
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -20,16 +20,17 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import mx.DateTime
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
import time
|
||||
import mx.DateTime
|
||||
|
||||
class one2many_mod3(fields.one2many):
|
||||
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
|
||||
if not context:
|
||||
context = {}
|
||||
context = context
|
||||
res = {}
|
||||
for obj in obj.browse(cr, user, ids, context=context):
|
||||
res[obj.id] = []
|
||||
|
@ -48,7 +49,7 @@ class report_account_analytic_planning(osv.osv):
|
|||
_name = "report_account_analytic.planning"
|
||||
_description = "Planning"
|
||||
|
||||
def _get_total_planned(self, cr, uid, ids, name, args, context):
|
||||
def _get_total_planned(self, cr, uid, ids, name, args, context=None):
|
||||
result = {}
|
||||
for plan in self.browse(cr, uid, ids, context):
|
||||
plan_hrs=0.0
|
||||
|
@ -59,7 +60,7 @@ class report_account_analytic_planning(osv.osv):
|
|||
result[plan.id] = plan_hrs
|
||||
return result
|
||||
|
||||
def _get_total_free(self, cr, uid, ids, name, args, context):
|
||||
def _get_total_free(self, cr, uid, ids, name, args, context=None):
|
||||
result = {}
|
||||
for plan in self.browse(cr, uid, ids, context):
|
||||
total_free = 0.0
|
||||
|
@ -69,7 +70,9 @@ class report_account_analytic_planning(osv.osv):
|
|||
result[plan.id] = total_free
|
||||
return result
|
||||
|
||||
def _check_planning_responsible(self, cr, uid, ids, context={}):
|
||||
def _check_planning_responsible(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
for obj_plan in self.browse(cr, uid, ids, context=context):
|
||||
cr.execute("""
|
||||
SELECT id FROM report_account_analytic_planning plan
|
||||
|
@ -92,23 +95,23 @@ class report_account_analytic_planning(osv.osv):
|
|||
'name': fields.char('Planning Name', required=True, size=32, states={'done':[('readonly', True)]}),
|
||||
'code': fields.char('Code', size=32, states={'done':[('readonly', True)]}),
|
||||
'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done':[('readonly', True)]}),
|
||||
'date_from':fields.date('Start Date', required=True, states={'done':[('readonly', True)]}),
|
||||
'date_from': fields.date('Start Date', required=True, states={'done':[('readonly', True)]}),
|
||||
'date_to':fields.date('End Date', required=True, states={'done':[('readonly', True)]}),
|
||||
'line_ids': fields.one2many('report_account_analytic.planning.line', 'planning_id', 'Planning lines', states={'done':[('readonly', True)]}),
|
||||
'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('open', 'Open'), ('done', 'Done'),('cancel','Cancelled')], 'Status', required=True),
|
||||
'business_days' : fields.integer('Business Days', required=True, states={'done':[('readonly', True)]}, help='Set here the number of working days within this planning for one person full time'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('open', 'Open'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', required=True),
|
||||
'business_days': fields.integer('Business Days', required=True, states={'done':[('readonly', True)]}, help='Set here the number of working days within this planning for one person full time'),
|
||||
'planning_user_ids': one2many_mod3('report_account_analytic.planning.user', 'planning_id', 'Planning By User'),
|
||||
'planning_account': fields.one2many('report_account_analytic.planning.account', 'planning_id', 'Planning By Account'),
|
||||
'total_planned' : fields.function(_get_total_planned, method=True, string='Total Planned'),
|
||||
'total_free' : fields.function(_get_total_free, method=True, string='Total Free'),
|
||||
'total_planned': fields.function(_get_total_planned, method=True, string='Total Planned'),
|
||||
'total_free': fields.function(_get_total_free, method=True, string='Total Free'),
|
||||
}
|
||||
_defaults = {
|
||||
'date_from': lambda *a: time.strftime('%Y-%m-01'),
|
||||
'date_to': lambda *a: (mx.DateTime.now()+mx.DateTime.RelativeDateTime(months=1, day=1, days=-1)).strftime('%Y-%m-%d'),
|
||||
'date_from': time.strftime('%Y-%m-01'),
|
||||
'date_to': (mx.DateTime.now()+mx.DateTime.RelativeDateTime(months=1, day=1, days=-1)).strftime('%Y-%m-%d'),
|
||||
'user_id': lambda self, cr, uid, c: uid,
|
||||
'state': lambda *args: 'draft',
|
||||
'business_days' : lambda *a: 20,
|
||||
'state': 'draft',
|
||||
'business_days': 20,
|
||||
}
|
||||
_order = 'date_from desc'
|
||||
|
||||
|
@ -116,19 +119,27 @@ class report_account_analytic_planning(osv.osv):
|
|||
(_check_planning_responsible, 'Invalid planning ! Planning dates can\'t overlap for the same responsible. ', ['user_id'])
|
||||
]
|
||||
|
||||
def action_open(self, cr, uid, id, context={}):
|
||||
def action_open(self, cr, uid, id, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, id, {'state' : 'open'}, context=context)
|
||||
return True
|
||||
|
||||
def action_cancel(self, cr, uid, id, context={}):
|
||||
def action_cancel(self, cr, uid, id, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, id, {'state' : 'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
def action_draft(self, cr, uid, id, context={}):
|
||||
def action_draft(self, cr, uid, id, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, id, {'state' : 'draft'}, context=context)
|
||||
return True
|
||||
|
||||
def action_done(self, cr, uid, id, context={}):
|
||||
def action_done(self, cr, uid, id, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
self.write(cr, uid, id, {'state' : 'done'}, context=context)
|
||||
return True
|
||||
|
||||
|
@ -139,10 +150,12 @@ class report_account_analytic_planning_line(osv.osv):
|
|||
_description = "Planning Line"
|
||||
_rec_name = 'user_id'
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['user_id','planning_id','note'], context)
|
||||
reads = self.read(cr, uid, ids, ['user_id', 'planning_id', 'note'], context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = '['+record['planning_id'][1]
|
||||
|
@ -155,7 +168,9 @@ class report_account_analytic_planning_line(osv.osv):
|
|||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def _amount_base_uom(self, cr, uid, ids, name, args, context):
|
||||
def _amount_base_uom(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm = users_obj.browse(cr, uid, uid, context).company_id.planning_time_mode_id
|
||||
|
@ -168,7 +183,7 @@ class report_account_analytic_planning_line(osv.osv):
|
|||
return result
|
||||
|
||||
_columns = {
|
||||
'account_id':fields.many2one('account.analytic.account', 'Analytic account', required=True),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic account', required=True),
|
||||
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning', required=True, ondelete='cascade'),
|
||||
'user_id': fields.many2one('res.users', 'User'),
|
||||
'amount': fields.float('Quantity', required=True),
|
||||
|
@ -177,7 +192,7 @@ class report_account_analytic_planning_line(osv.osv):
|
|||
'amount_in_base_uom': fields.function(_amount_base_uom, method=True, string='Quantity in base uom', store=True),
|
||||
'task_ids': fields.one2many('project.task', 'planning_line_id', 'Planning Tasks'),
|
||||
}
|
||||
_order = 'user_id,account_id'
|
||||
_order = 'user_id, account_id'
|
||||
|
||||
report_account_analytic_planning_line()
|
||||
|
||||
|
@ -199,7 +214,7 @@ class project_task(osv.osv):
|
|||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if not context:
|
||||
context = {}
|
||||
context = context
|
||||
if not context.get('planning'):
|
||||
return super(project_task,self).search(cr, user, args, offset, limit, order, context)
|
||||
cr.execute(" SELECT t.id, t.name \
|
||||
|
@ -211,15 +226,15 @@ class project_task(osv.osv):
|
|||
|
||||
project_task()
|
||||
|
||||
|
||||
class report_account_analytic_planning_user(osv.osv):
|
||||
_name = "report_account_analytic.planning.user"
|
||||
_description = "Planning by User"
|
||||
_rec_name = 'user_id'
|
||||
_auto = False
|
||||
|
||||
|
||||
def _get_tasks(self, cr, uid, ids, name, args, context):
|
||||
def _get_tasks(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm = users_obj.browse(cr, uid, uid, context=context).company_id.project_time_mode_id
|
||||
|
@ -243,7 +258,9 @@ class report_account_analytic_planning_user(osv.osv):
|
|||
result[line.id] = 0
|
||||
return result
|
||||
|
||||
def _get_free(self, cr, uid, ids, name, args, context):
|
||||
def _get_free(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = {}
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
if line.user_id:
|
||||
|
@ -252,7 +269,9 @@ class report_account_analytic_planning_user(osv.osv):
|
|||
result[line.id] = 0.0
|
||||
return result
|
||||
|
||||
def _get_timesheets(self, cr, uid, ids, name, args, context):
|
||||
def _get_timesheets(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm2 = users_obj.browse(cr, uid, uid, context).company_id.planning_time_mode_id
|
||||
|
@ -275,9 +294,9 @@ class report_account_analytic_planning_user(osv.osv):
|
|||
_columns = {
|
||||
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning'),
|
||||
'user_id': fields.many2one('res.users', 'User', readonly=True),
|
||||
'tasks' : fields.function(_get_tasks, method=True, string='Remaining Tasks', help='This value is given by the sum of work remaining to do on the task for this planning, expressed in days.'),
|
||||
'tasks': fields.function(_get_tasks, method=True, string='Remaining Tasks', help='This value is given by the sum of work remaining to do on the task for this planning, expressed in days.'),
|
||||
'plan_tasks': fields.float('Time Planned on Tasks', readonly=True, help='This value is given by the sum of time allocation with task(s) linked, expressed in days.'),
|
||||
'free' : fields.function(_get_free, method=True, string='Unallocated Time', readonly=True,help='Computed as \
|
||||
'free': fields.function(_get_free, method=True, string='Unallocated Time', readonly=True, help='Computed as \
|
||||
Business Days - (Time Allocation of Tasks + Time Allocation without Tasks + Holiday Leaves)'),
|
||||
'plan_open': fields.float('Time Allocation without Tasks', readonly=True,help='This value is given by the sum of time allocation without task(s) linked, expressed in days.'),
|
||||
'holiday': fields.float('Leaves',help='This value is given by the total of validated leaves into the \'Date From\' and \'Date To\' of the planning.'),
|
||||
|
@ -361,7 +380,9 @@ class report_account_analytic_planning_account(osv.osv):
|
|||
_rec_name = 'account_id'
|
||||
_auto = False
|
||||
|
||||
def _get_tasks(self, cr, uid, ids, name, args, context):
|
||||
def _get_tasks(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm = users_obj.browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
|
@ -386,7 +407,9 @@ class report_account_analytic_planning_account(osv.osv):
|
|||
result[line.id] = cr.fetchall()[0][0] / div * div2
|
||||
return result
|
||||
|
||||
def _get_timesheets(self, cr, uid, ids, name, args, context):
|
||||
def _get_timesheets(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm2 = users_obj.browse(cr, uid, uid, context).company_id.planning_time_mode_id
|
||||
|
@ -409,10 +432,10 @@ class report_account_analytic_planning_account(osv.osv):
|
|||
_columns = {
|
||||
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning'),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
|
||||
'tasks' : fields.function(_get_tasks, method=True, string='Remaining Tasks', help='This value is given by the sum of work remaining to do on the task for this planning, expressed in days.'),
|
||||
'plan_tasks': fields.float('Time Allocation of Tasks', readonly=True,help='This value is given by the sum of time allocation with the checkbox \'Assigned in Taks\' set to TRUE expressed in days.'),
|
||||
'plan_open': fields.float('Time Allocation without Tasks', readonly=True,help='This value is given by the sum of time allocation with the checkbox \'Assigned in Taks\' set to FALSE, expressed in days.'),
|
||||
'timesheet': fields.function(_get_timesheets, method=True, string='Timesheet',help='This value is given by the sum of all work encoded in the timesheet(s) between the \'Date From\' and \'Date To\' of the planning.'),
|
||||
'tasks': fields.function(_get_tasks, method=True, string='Remaining Tasks', help='This value is given by the sum of work remaining to do on the task for this planning, expressed in days.'),
|
||||
'plan_tasks': fields.float('Time Allocation of Tasks', readonly=True, help='This value is given by the sum of time allocation with the checkbox \'Assigned in Taks\' set to TRUE expressed in days.'),
|
||||
'plan_open': fields.float('Time Allocation without Tasks', readonly=True, help='This value is given by the sum of time allocation with the checkbox \'Assigned in Taks\' set to FALSE, expressed in days.'),
|
||||
'timesheet': fields.function(_get_timesheets, method=True, string='Timesheet', help='This value is given by the sum of all work encoded in the timesheet(s) between the \'Date From\' and \'Date To\' of the planning.'),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
@ -448,7 +471,6 @@ class report_account_analytic_planning_account(osv.osv):
|
|||
)
|
||||
""")
|
||||
|
||||
|
||||
report_account_analytic_planning_account()
|
||||
|
||||
class report_account_analytic_planning_stat(osv.osv):
|
||||
|
@ -459,7 +481,9 @@ class report_account_analytic_planning_stat(osv.osv):
|
|||
_log_access = False
|
||||
_order = 'planning_id,user_id'
|
||||
|
||||
def _sum_amount_real(self, cr, uid, ids, name, args, context):
|
||||
def _sum_amount_real(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm2 = users_obj.browse(cr, uid, uid, context).company_id.planning_time_mode_id
|
||||
|
@ -469,15 +493,17 @@ class report_account_analytic_planning_stat(osv.osv):
|
|||
div2 = 1.0
|
||||
for line in self.browse(cr, uid, ids, context):
|
||||
if line.user_id:
|
||||
cr.execute('''select sum(acc.unit_amount/uom.factor) from account_analytic_line acc
|
||||
cr.execute('''SELECT sum(acc.unit_amount/uom.factor) FROM account_analytic_line acc
|
||||
LEFT JOIN product_uom uom ON (uom.id = acc.product_uom_id)
|
||||
where user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.id, line.account_id.id, line.planning_id.date_from, line.planning_id.date_to))
|
||||
WHERE user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.id, line.account_id.id, line.planning_id.date_from, line.planning_id.date_to))
|
||||
else:
|
||||
cr.execute('select sum(unit_amount) from account_analytic_line where account_id=%s and date>=%s and date<=%s', (line.account_id.id, line.planning_id.date_from, line.planning_id.date_to))
|
||||
cr.execute('SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s', (line.account_id.id, line.planning_id.date_from, line.planning_id.date_to))
|
||||
result[line.id] = cr.fetchone()[0] * div2
|
||||
return result
|
||||
|
||||
def _sum_amount_tasks(self, cr, uid, ids, name, args, context):
|
||||
def _sum_amount_tasks(self, cr, uid, ids, name, args, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
users_obj = self.pool.get('res.users')
|
||||
result = {}
|
||||
tm = users_obj.browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
|
@ -496,12 +522,12 @@ where user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.i
|
|||
where = 'user_id=' + str(line.user_id.id) + ' and '
|
||||
cr.execute('''select
|
||||
sum(planned_hours)
|
||||
from
|
||||
FROM
|
||||
project_task
|
||||
where
|
||||
WHERE
|
||||
''' + where + '''
|
||||
project_id in (select id from project_project where category_id=%s) and
|
||||
date_close>=%s and
|
||||
project_id IN (select id from project_project where category_id=%s) AND
|
||||
date_close>=%s AND
|
||||
date_close<=%s''', (
|
||||
line.account_id.id,
|
||||
line.planning_id.date_from,
|
||||
|
@ -523,23 +549,24 @@ where user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.i
|
|||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_account_analytic_planning_stat as (
|
||||
select
|
||||
SELECT
|
||||
min(l.id) as id,
|
||||
l.user_id as user_id,
|
||||
a.user_id as manager_id,
|
||||
l.account_id as account_id,
|
||||
sum(l.amount/u.factor) as sum_amount,
|
||||
l.planning_id
|
||||
from
|
||||
FROM
|
||||
report_account_analytic_planning_line l
|
||||
left join
|
||||
LEFT JOIN
|
||||
report_account_analytic_planning a on (a.id = l.planning_id)
|
||||
left join
|
||||
LEFT JOIN
|
||||
product_uom u on (l.amount_unit = u.id)
|
||||
group by
|
||||
GROUP BY
|
||||
l.planning_id, l.user_id, l.account_id, a.user_id
|
||||
)
|
||||
""")
|
||||
|
||||
report_account_analytic_planning_stat()
|
||||
|
||||
class res_company(osv.osv):
|
||||
|
@ -547,9 +574,8 @@ class res_company(osv.osv):
|
|||
_columns = {
|
||||
'planning_time_mode_id': fields.many2one('product.uom', 'Planning Time Unit',
|
||||
help='This will set the unit of measure used in plannings.',
|
||||
|
||||
),
|
||||
}
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -19,6 +19,4 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -20,4 +20,3 @@
|
|||
##############################################################################
|
||||
import project_retro_planning
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Project Retro planning',
|
||||
'version': '0.1',
|
||||
|
|
|
@ -19,12 +19,14 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from datetime import date,timedelta,datetime
|
||||
from datetime import date, timedelta, datetime
|
||||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
class project_project(osv.osv):
|
||||
_inherit = 'project.project'
|
||||
|
||||
def write(self, cr, uid, ids,vals, *args, **kwargs):
|
||||
if 'date' in vals and vals['date']:
|
||||
data_project = self.browse(cr, uid, ids)
|
||||
|
@ -43,4 +45,3 @@ class project_project(osv.osv):
|
|||
|
||||
project_project()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -22,4 +22,3 @@ import project_timesheet
|
|||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Project Timesheet',
|
||||
'version': '1.0',
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Process Transition
|
||||
-->
|
||||
|
@ -71,7 +70,5 @@
|
|||
<field model="process.node" name="source_node_id" ref="project.process_node_donetask0"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -93,6 +93,8 @@ class project_work(osv.osv):
|
|||
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
vals_line = {}
|
||||
obj = self.pool.get('hr.analytic.timesheet')
|
||||
timesheet_obj = self.pool.get('hr.analytic.timesheet')
|
||||
|
@ -152,7 +154,9 @@ class task(osv.osv):
|
|||
|
||||
return super(task,self).unlink(cr, uid, ids, *args, **kwargs)
|
||||
|
||||
def write(self, cr, uid, ids,vals,context={}):
|
||||
def write(self, cr, uid, ids,vals,context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if (vals.has_key('project_id') and vals['project_id']) or (vals.has_key('name') and vals['name']):
|
||||
vals_line = {}
|
||||
hr_anlytic_timesheet = self.pool.get('hr.analytic.timesheet')
|
||||
|
@ -178,6 +182,8 @@ class project_project(osv.osv):
|
|||
_inherit = "project.project"
|
||||
|
||||
def name_get(self, cr, user, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = []
|
||||
for project in self.browse(cr, user, ids, context):
|
||||
name = "[%s] %s" % (project.category_id and project.category_id.code or '?', project.name)
|
||||
|
@ -187,4 +193,3 @@ class project_project(osv.osv):
|
|||
project_project()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -20,4 +20,3 @@
|
|||
##############################################################################
|
||||
import task_report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ class report_timesheet_task_user(osv.osv):
|
|||
|
||||
}
|
||||
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute(""" create or replace view report_timesheet_task_user as (
|
||||
select
|
||||
|
@ -156,4 +155,3 @@ class report_timesheet_task_user(osv.osv):
|
|||
report_timesheet_task_user()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
<!-- Tasks by projects and users
|
||||
|
||||
|
||||
<record id="view_task_project_form" model="ir.ui.view">
|
||||
<field name="name">task.report.form</field>
|
||||
<field name="model">task.report</field>
|
||||
|
|
Loading…
Reference in New Issue