addons14/project_timesheet_time_control/tests/test_project_timesheet_time_control.py
def _create_wizard(self, action, active_record):
        """Create a new hr.timesheet.switch wizard in the specified context.

        :param dict action: Action definition that creates the wizard.
        :param active_record: Record being browsed when creating the wizard.
        """
        self.assertEqual(action["res_model"], "hr.timesheet.switch")
        self.assertEqual(action["target"], "new")
        self.assertEqual(action["type"], "ir.actions.act_window")
        self.assertEqual(action["view_mode"], "form")
        self.assertEqual(action["view_type"], "form")
        return (
            active_record.env[action["res_model"]]
            .with_context(
                active_id=active_record.id,
                active_ids=active_record.ids,
                active_model=active_record._name,
                **action.get("context", {}),
            )
            .create({})
        )
Create a new hr.timesheet.switch wizard in the specified context.

        :param dict action: Action definition that creates the wizard.
        :param active_record: Record being browsed when creating the wizard.
        
Create a new hr.timesheet.switch wizard in the specified context.
Create a new hr . timesheet . switch wizard in the specified context .
def _create_wizard(self, action, active_record):
        self.assertEqual(action["res_model"], "hr.timesheet.switch")
        self.assertEqual(action["target"], "new")
        self.assertEqual(action["type"], "ir.actions.act_window")
        self.assertEqual(action["view_mode"], "form")
        self.assertEqual(action["view_type"], "form")
        return (
            active_record.env[action["res_model"]]
            .with_context(
                active_id=active_record.id,
                active_ids=active_record.ids,
                active_model=active_record._name,
                **action.get("context", {}),
            )
            .create({})
        )
def _create_wizard ( self , action , active_record ) : self . assertEqual ( action [ "res_model" ] , "hr.timesheet.switch" ) self . assertEqual ( action [ "target" ] , "new" ) self . assertEqual ( action [ "type" ] , "ir.actions.act_window" ) self . assertEqual ( action [ "view_mode" ] , "form" ) self . assertEqual ( action [ "view_type" ] , "form" ) return ( active_record . env [ action [ "res_model" ] ] . with_context ( active_id = active_record . id , active_ids = active_record . ids , active_model = active_record . _name , ** action . get ( "context" , { } ) , ) . create ( { } ) )
Create a new hr.timesheet.switch wizard in the specified context.
Create a new hr . timesheet . switch wizard in the specified context .
"""Create a new hr.timesheet.switch wizard in the specified context.

        :param dict action: Action definition that creates the wizard.
        :param active_record: Record being browsed when creating the wizard.
        """
self
action
Action definition that creates the wizard.
Action definition that creates the wizard .
active_record
Record being browsed when creating the wizard.
Record being browsed when creating the wizard .