Odoo Help


pré remplir un champs d'assistant lors de son appel

on 5/24/16, 8:15 AM 588 views

Bonjour, je voudrai pré remplir un champs d'assistant lors de son appel.Pré-remplir avec une valeur dynamique et pas seulement une string ou un entier.

Hello , I will wish to know how to pre-fill a field of a wizard when it is called

pre-filled with a dynamic value, not just a static string or integer.


Prakash Sharma

--Prakash Sharma--
--Prakash Sharma--

I like to surround myself with brave, creative people.

My motivation for learning different technologies and algos drive me. I love challenges of a steep learning curve which I believe makes me a better learner. I have a strong desire to learn different technologies, which would enable me to become a full stack developer.

Prakash Sharma
On 5/24/16, 9:55 AM

override the default_get like:

def default_get(self, fields):
res = super(AccountMoveLineReconcile, self).default_get(fields)
data = self.trans_rec_get()
if 'trans_nbr' in fields:
res.update({'trans_nbr': data['trans_nbr']})
if 'credit' in fields:
res.update({'credit': data['credit']})
if 'debit' in fields:
res.update({'debit': data['debit']})
if 'writeoff' in fields:
res.update({'writeoff': data['writeoff']})
return res

On 5/25/16, 1:13 PM


impec cela m'as aidé. Pour un wizard

def default_get(self, fields):
    res = super(WizardBusinessCreator, self).default_get(fields)
    entreprise = self.env.user.company_id
    myNextId = getNextAnalyticName(self, entreprise.id)
    if 'description' in fields:
    res.update({'description': myNextId})
    return res

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/24/16, 8:15 AM
Seen: 588 times
Last updated: 5/25/16, 1:13 PM