addons14/project_key/models/project_project.py
def _update_task_keys(self):
        """
        This method will update task keys of the current project.
        """
        self.ensure_one()
        self.flush()
        reindex_query = """
        UPDATE project_task
        SET key = x.key
        FROM (
          SELECT t.id, p.key || '-' || split_part(t.key, '-', 2) AS key
          FROM project_task t
          INNER JOIN project_project p ON t.project_id = p.id
          WHERE t.project_id = %s
        ) AS x
        WHERE project_task.id = x.id;
        """

        self.env.cr.execute(reindex_query, (self.id,))
        self.env["project.task"].invalidate_cache(["key"], self.task_ids.ids)

        This method will update task keys of the current project.
        
This method will update task keys of the current project.
This method will update task keys of the current project .
def _update_task_keys(self):
        self.ensure_one()
        self.flush()
        reindex_query = """
        UPDATE project_task
        SET key = x.key
        FROM (
          SELECT t.id, p.key || '-' || split_part(t.key, '-', 2) AS key
          FROM project_task t
          INNER JOIN project_project p ON t.project_id = p.id
          WHERE t.project_id = %s
        ) AS x
        WHERE project_task.id = x.id;
        """
        self.env.cr.execute(reindex_query, (self.id,))
        self.env["project.task"].invalidate_cache(["key"], self.task_ids.ids)
def _update_task_keys ( self ) : self . ensure_one ( ) self . flush ( ) reindex_query = """
        UPDATE project_task
        SET key = x.key
        FROM (
          SELECT t.id, p.key || '-' || split_part(t.key, '-', 2) AS key
          FROM project_task t
          INNER JOIN project_project p ON t.project_id = p.id
          WHERE t.project_id = %s
        ) AS x
        WHERE project_task.id = x.id;
        """ self . env . cr . execute ( reindex_query , ( self . id , ) ) self . env [ "project.task" ] . invalidate_cache ( [ "key" ] , self . task_ids . ids )
This method will update task keys of the current project.
This method will update task keys of the current project .
"""
        This method will update task keys of the current project.
        """
self