Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

How to get values of those fields that were not edited by user, in Write method ?

By
Sohail
on 5/18/13, 9:38 AM 1,204 views

when I get into write I do not see those values which were not edited in vals.get(). How do I manage to get those field values that were not edited by user and I need those fields for some validation.

2

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/18/13, 9:47 AM

Hi,

use ORM method browse.

Syntax :browse(cr, uid, select, context=None, list_class=None, fields_process=None)

Example :

def write(self, cr, uid, ids, vals, context=None):
    partner = self.browse(cr, uid, ids[0], context=context)
    #for example get first_name
    first_name=partner.first_name
    # all other field partner.field_name

Thank You.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 5/18/13, 9:38 AM
Seen: 1204 times
Last updated: 3/16/15, 8:10 AM