Community mailing list archives

community@mail.odoo.com

Re: how i can used active_id in odoo v9?

by
bplancher
- 05/10/2016 11:07:23
Hi Omar Frikha,

your key is incorrect, you set 'id' on context in your view, but you expect 'active_id' in your code ^^

2016-05-10 16:57 GMT+02:00 omar frikha <omarfrikha59@gmail.com>:
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

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe