Skip to Content
Menu
This question has been flagged
3896 Rodiniai

Hey Good Day!

I am stuck in some problem, which might not be that difficult but at least for me as am new in this system.
I have 2 checkboxes i.e. chk1,chk2. When I select chk1 and press button named action_list. It should display me table in new wizard taking 2nd value only.
I tried the below code but it always displays me complete table taken from list view only.

Code:

    def action_list(self,cr,uid,ids,context=None):
    
    
        cr.execute("SELECT task_name,duration FROM activity_track")

        result= map(lambda x: x[0], cr.fetchall())

        context.update({'myresult':result})
       #return values  
    
       

        return {

       
      'name':'Activities',

      'type':'ir.actions.act_window',

      'view_mode':'tree,form',

      'view_type':'tree',

      #'view_id': False,

      'domain':'[]',

      'nodestroy': True,

      'context':context,
       
      'active_id' : 'activity_list_action',

      'target': 'current',

      'res_model':'activity.track',


        } #Table name is activity_track and model is activity.track

The code above takes task_name and duration but I want to take the 2nd row only on chk1 selected

Thanks

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
saus. 20
15732
16
rugp. 19
10906
1
saus. 19
5826
5
birž. 18
11281
0
rugs. 17
2814