Community mailing list archives

community@mail.odoo.com

how i can used active_id in odoo v9?

by
omar
- 05/10/2016 10:53:52
hi community,
i'm try this statment in classe .py:

client_id=fields.Many2one("res.partner",string='partner')
...
def get_val1(self): 
        self.client_id=self.env.context.get('active_id', False)


and this in view of the partner:
               <button  name="%(Gen_detail)d"  type="action" string="DETAIL"  class="oe_button_box oe_stat_button oe_highlight" context="{'id' : active_id}"/>

but isn't working

how doing for this?

thank's