Community mailing list archives

community@mail.odoo.com

Problems with accessing environment values

by
Ingo Devooght
- 03/19/2015 06:00:20
Dear Community,

I’m trying to access some values from an unsaved environment. 

I have a selection field with 3 values (A, B, C). Current state is „A“. I want to retrieve the actual state of this selection field (without saving).

When I’m changing the value of this selection field from „A" to „B“ and not saving the record, the value is still „A“.

I thought the environment concept of odoo is for handling such situations?

I’m using this code to access the selection field:

      test=self.env['res.partner'].browse(self.ids).property_payment_term.name

regards,
Ingo Devooght