addons14/hr_timesheet_sheet/models/hr_timesheet_sheet.py
def onchange_add_project_id(self):
        """Load the project to the timesheet sheet"""
        if self.add_line_project_id:
            return {
                "domain": {
                    "add_line_task_id": [
                        ("project_id", "=", self.add_line_project_id.id),
                        ("company_id", "=", self.company_id.id),
                        ("id", "not in", self.timesheet_ids.mapped("task_id").ids),
                    ]
                }
            }
        else:
            return {"domain": {"add_line_task_id": [("id", "=", False)]}}
Load the project to the timesheet sheet
Load the project to the timesheet sheet
Load the project to the timesheet sheet
def onchange_add_project_id(self):
        if self.add_line_project_id:
            return {
                "domain": {
                    "add_line_task_id": [
                        ("project_id", "=", self.add_line_project_id.id),
                        ("company_id", "=", self.company_id.id),
                        ("id", "not in", self.timesheet_ids.mapped("task_id").ids),
                    ]
                }
            }
        else:
            return {"domain": {"add_line_task_id": [("id", "=", False)]}}
def onchange_add_project_id ( self ) : if self . add_line_project_id : return { "domain" : { "add_line_task_id" : [ ( "project_id" , "=" , self . add_line_project_id . id ) , ( "company_id" , "=" , self . company_id . id ) , ( "id" , "not in" , self . timesheet_ids . mapped ( "task_id" ) . ids ) , ] } } else : return { "domain" : { "add_line_task_id" : [ ( "id" , "=" , False ) ] } }
Load the project to the timesheet sheet
Load the project to the timesheet sheet
"""Load the project to the timesheet sheet"""
self