parameters: (self)
return_statement: return {
              'name': _('Detailed Operations'),
              'type': 'ir.actions.act_window',
              'view_mode': 'form',
              'res_model': 'stock.move',
              'views': [(view.id, 'form')],
              'view_id': view.id,
              'target': 'new',
              'res_id': self.id,
              'context': dict(
                  self.env.context,
                  show_owner=self.picking_type_id.code != 'incoming',
                  show_lots_m2o=self.has_tracking != 'none' and (self.picking_type_id.use_existing_lots or self.state == 'done' or self.origin_returned_move_id.id),  # able to create lots, whatever the value of ` use_create_lots`.
                  show_lots_text=self.has_tracking != 'none' and self.picking_type_id.use_create_lots and not self.picking_type_id.use_existing_lots and self.state != 'done' and not self.origin_returned_move_id.id,
                  show_source_location=self.picking_type_id.code != 'incoming',
                  show_destination_location=self.picking_type_id.code != 'outgoing',
                  show_package=not self.location_id.usage == 'supplier',
                  show_reserved_quantity=self.state != 'done' and not self.picking_id.immediate_transfer and self.picking_type_id.code != 'incoming'
              ),
          }
docstring: Returns an action that will open a form view (in a popup) allowing to work on all the
          move lines of a particular move. This form view is used when "show operations" is not
          checked on the picking type.
docstring_summary: Returns an action that will open a form view (in a popup) allowing to work on all the
          move lines of a particular move. This form view is used when "show operations" is not
          checked on the picking type.
docstring_tokens: Returns an action that will open a form view ( in a popup ) allowing to work on all the move lines of a particular move . This form view is used when show operations is not checked on the picking type .
function: def action_show_details(self):
          """ Returns an action that will open a form view (in a popup) allowing to work on all the
          move lines of a particular move. This form view is used when "show operations" is not
          checked on the picking type.
          """
          self.ensure_one()
  
          # If "show suggestions" is not checked on the picking type, we have to filter out the
          # reserved move lines. We do this by displaying `move_line_nosuggest_ids`. We use
          # different views to display one field or another so that the webclient doesn't have to
          # fetch both.
          if self.picking_type_id.show_reserved:
              view = self.env.ref('stock.view_stock_move_operations')
          else:
              view = self.env.ref('stock.view_stock_move_nosuggest_operations')
  
          if self.product_id.tracking == "serial" and self.state == "assigned":
              self.next_serial = self.env['stock.production.lot']._get_next_serial(self.company_id, self.product_id)
  
          return {
              'name': _('Detailed Operations'),
              'type': 'ir.actions.act_window',
              'view_mode': 'form',
              'res_model': 'stock.move',
              'views': [(view.id, 'form')],
              'view_id': view.id,
              'target': 'new',
              'res_id': self.id,
              'context': dict(
                  self.env.context,
                  show_owner=self.picking_type_id.code != 'incoming',
                  show_lots_m2o=self.has_tracking != 'none' and (self.picking_type_id.use_existing_lots or self.state == 'done' or self.origin_returned_move_id.id),  # able to create lots, whatever the value of ` use_create_lots`.
                  show_lots_text=self.has_tracking != 'none' and self.picking_type_id.use_create_lots and not self.picking_type_id.use_existing_lots and self.state != 'done' and not self.origin_returned_move_id.id,
                  show_source_location=self.picking_type_id.code != 'incoming',
                  show_destination_location=self.picking_type_id.code != 'outgoing',
                  show_package=not self.location_id.usage == 'supplier',
                  show_reserved_quantity=self.state != 'done' and not self.picking_id.immediate_transfer and self.picking_type_id.code != 'incoming'
              ),
          }
function_tokens: def action_show_details ( self ) : self . ensure_one ( ) # If "show suggestions" is not checked on the picking type, we have to filter out the # reserved move lines. We do this by displaying `move_line_nosuggest_ids`. We use # different views to display one field or another so that the webclient doesn't have to # fetch both. if self . picking_type_id . show_reserved : view = self . env . ref ( 'stock.view_stock_move_operations' ) else : view = self . env . ref ( 'stock.view_stock_move_nosuggest_operations' ) if self . product_id . tracking == "serial" and self . state == "assigned" : self . next_serial = self . env [ 'stock.production.lot' ] . _get_next_serial ( self . company_id , self . product_id ) return { 'name' : _ ( 'Detailed Operations' ) , 'type' : 'ir.actions.act_window' , 'view_mode' : 'form' , 'res_model' : 'stock.move' , 'views' : [ ( view . id , 'form' ) ] , 'view_id' : view . id , 'target' : 'new' , 'res_id' : self . id , 'context' : dict ( self . env . context , show_owner = self . picking_type_id . code != 'incoming' , show_lots_m2o = self . has_tracking != 'none' and ( self . picking_type_id . use_existing_lots or self . state == 'done' or self . origin_returned_move_id . id ) , # able to create lots, whatever the value of ` use_create_lots`. show_lots_text = self . has_tracking != 'none' and self . picking_type_id . use_create_lots and not self . picking_type_id . use_existing_lots and self . state != 'done' and not self . origin_returned_move_id . id , show_source_location = self . picking_type_id . code != 'incoming' , show_destination_location = self . picking_type_id . code != 'outgoing' , show_package = not self . location_id . usage == 'supplier' , show_reserved_quantity = self . state != 'done' and not self . picking_id . immediate_transfer and self . picking_type_id . code != 'incoming' ) , }