0

Why does OpenERP create 2 different threads when executing a tree_but_open event. When I double click an item in the tree, it appears to create 2 different threads for each click and then executes my Python method in each thread.

Is this normal behaviour?

        <record id="action_wash_st_method1" model="ir.actions.server">
            <field name="type">ir.actions.server</field>
            <field name="condition">True</field>
            <field name="state">code</field>
            <field name="model_id" ref="model_view_tree_display_address_list"/>
            <field eval="5" name="sequence"/>
            <field name="code">
self.view_calc_sales_tax(cr, uid, context)
</field>
           <field name="name">wash state action request</field>
        </record> 

<record model="ir.values" id="action_wash_st_tax_trigger_method1" >
            <field name="key2" eval="'tree_but_open'" />
            <field name="model" eval="'view.tree.display.address.list'" />
            <field name="name">Method1 Wash State</field>
            <field name="value" eval="'ir.actions.server,%d'%action_wash_st_method1"/>
            <field name="object" eval="True" />
 </record>

OpenERP Output: Notice the 2 different thread ids printed in my method when I double click in a tree/list.

********************before calling button_reset_taxes, 47494460417792
**************Entering button_reset_taxes: 47494460417792
2012-08-07 04:09:26,383 30080 INFO ? werkzeug: 71.195.148.241 - - [07/Aug/2012 04:09:26] "POST /web/action/run HTTP/1.1" 200 -
2012-08-07 04:09:26,402 30080 INFO ? werkzeug: 71.195.148.241 - - [07/Aug/2012 04:09:26] "POST /web/treeview/action HTTP/1.1" 200 -
2012-08-07 04:09:26,496 30080 INFO ? werkzeug: 71.195.148.241 - - [07/Aug/2012 04:09:26] "POST /web/session/eval_domain_and_context HTTP/1.1" 200 -
********************before calling button_reset_taxes, 47494452025088
**************Entering button_reset_taxes: 47494452025088
2012-08-07 04:09:26,590 30080 INFO ? werkzeug: 71.195.148.241 - - [07/Aug/2012 04:09:26] "POST /web/action/run HTTP/1.1" 200 -
Tim Young
  • 91
  • 1
  • 1
  • 3

2 Answers2

1

Yes this is an Normal Behavior .

even at time of Import data from webclient.

when you click on the "IMPORT" it waits for the reply from server (to check to put web in loading mode). and if within that time if you click again it will import again .

Ruchir Shukla
  • 805
  • 6
  • 13
0

Button are one Click Element in view, now you say you click Double click on button the lead to time trigger the button action that is defined on action. Else that is Normal it does not do any anonymous activity.

Thank YOU

ifixthat
  • 6,137
  • 5
  • 25
  • 42