Odoo Help

0
0
Alf Olsen
On 10/22/18, 3:18 AM

The answer you will find in that link Sunny posted is to use self._origin to get the records as it is in the database (before any changes/saves was made in the gui)

0
Sunny Dev
On 2/10/18, 3:55 AM

Hello Rakesh,


please see this answer:

\http://www.odoo.com/forum/help-1/question/how-to-get-record-s-id-on-on-change-of-wizard-s-field-126036#answer-128511 


it will help you.


Thanks

0
ayman mohammed adam
On 1/21/18, 9:43 AM

Dear Rakesh,


1-Try to make another field by the same type just in different name.

2-when you change the value of first field get the old value from the second field and update it by the new value.

 

field1 = fields.Char()

field2 = fields.Char()
@api.onchange('field1')
def onchange_field1(self):

     old_value = self.field2 

     self.field2= self.field1

 

 hope I helped You...



0
NIKHIL KRISHNAN
On 1/20/18, 6:54 AM

Hai Rakesh Yadav,

,

you can search the same record.

     obj = self.env['model.model'].search([('id', '=', self.id)])

obj.field_name give you the first value.
and self.field_name give the new value.
this is just an idea. please try this, it may help you,
thanks.

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/20/18, 12:15 AM
Seen: 1817 times
Last updated: 10/22/18, 3:18 AM