Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to check the auto validation kanban state is activated in OpenERP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 360
    Comment on it

    In OpenERP first we inherit to the rating.rating object and then we create the kanban. if the auto_validation_kanban_state is activated then apply the modification of the kanban state according to the given rating. And then return the action to see all the rating about the all sort of activity of the project like as task and issue.

    Use this function show in given below

    def kanban_rating(self, rate, res_model=None, res_id=None, token=None):
            rating = super(Rating, self).apply_rating(rate, res_model, res_id, token)
            if rating.res_model == 'project.task':
                task = self.env[rating.res_model].sudo().browse(rating.res_id)
                if task.stage_id.auto_validation_kanban_state:
                    if rating.rating > 5:
                        task.write({'kanban_state' : 'done'})
                    else:
                        task.write({'kanban_state' : 'blocked'})
            return rating

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: