Community mailing list archives

Document type: project.project, Operation: read

mihir shah
- 09/28/2015 08:59:46
Dear Community,

I have made an attendance module in multi-company (parent child) environment,which has certain stages.
On change of  every stage (child company) i want to create as task in project of parent company.

following is the error when i click on stage change button.
Document type: project.project, Operation: read

Please guide me on this.

Code of  function is as given bellow.

def submit_manager(self, cr, uid, ids, context=None):
        project_obj = self.pool.get('project.project')
        porject_task_obj= self.pool.get('project.task')
        cr.execute("select id from project_project where use_attendance = True ")
        for project in cr.fetchall():
            for pro in project:
                for stages in project_obj.browse(cr,uid,pro).type_ids:
                       if stages.sequence == 1:
                          stage_id =              
        vals = {}  
        for data in self.browse(cr, uid, ids, context):
            vals = {
                'name':'Attendance:' + + ' : ' + + ' : ' + data.date_from + ' to ' + data.date_to,
                'stage_id': stage_id,
       # task_id = porject_task_obj.create(cr,uid ,vals)
        self.write(cr, uid, ids, {'state': 'submit'}, context=context)
        return True

Mihir Shah

*Please Don't print this email unless you really need to "Save Earth and Save Environment"