A big thanks to you!! You make things seem so easy. I love the way you teach. Keep going 😁
@OdooMates3 жыл бұрын
Thanks for the kind words :)
@bondstar9274 жыл бұрын
I love your work buddy. Really cool stuff :)
@OdooMates4 жыл бұрын
Thanks bro :)
@helanatharwat76142 жыл бұрын
Thank you very much! I
@OdooMates2 жыл бұрын
glad it helped 🤩
@pichrazong97574 жыл бұрын
I try to set context from python wizzard: context {default_name: name , default_gender: ''M"}, the only field that is automatically filled on create from is name, is it possible automatically select, the selection fill like gender ?
@OdooMates4 жыл бұрын
What all fields are there in wizard, and how you call the Create method
@pichrazong97574 жыл бұрын
@@OdooMatesfields in wizard contain basic infomation such as (name,gender,country_id,email) the method was created from button type = object, I return the form view & pass the context like I described above. unfortunately fields like gender, country_id can't seem to be automatically selected.
@italaa863 жыл бұрын
We can also use the context from the action related to that button ??
@OdooMates3 жыл бұрын
If it is of type action button, if it is of type object, we have to make sure that the context is not changed or altered from the Python function
@jfsimon9333 Жыл бұрын
Hi I dont understand why patient_id is set to active_id, as active_id is the ID of the record in the hospital.patient model. We should use the name instead of the ID maybe?
@italaa865 жыл бұрын
Hello thanks very much for your videos, we can set it from action attribute context also I think.
@OdooMates5 жыл бұрын
Suggest videos to others if you like it :)
@thanshidhap.p47433 жыл бұрын
Is there any video available, when clicking a button, then it will go for another model.
@OdooMates3 жыл бұрын
kzbin.info/www/bejne/h6Hdc5eCjKqKqac
@shadowcoder193 жыл бұрын
@@OdooMates Is there a way to create invoice automatically using python code automated action studio?
@AdeshPaul4 жыл бұрын
Thanks for the information sir. I have a query. Here we are getting only name by default. But what if we want gender/age by default. Thanks.
@AdeshPaul4 жыл бұрын
I got the answer, we will do this by the help of onchange function in python file. For context, we will do like this:
@OdooMates4 жыл бұрын
Happy that you have solved it :)
@AdeshPaul4 жыл бұрын
@@OdooMates It is the result of teachings. Thanks.
@vviharika71912 жыл бұрын
hi sir i have error here in form view there is a field called 'Event amnount ' another field in notebook pages field name called 'total amount' if enter event amont the same amount should be display total amount automatically for this i write a code context = "{default_event_amount : active id or total_amount}" can you tel me the exact one sir thank you
@OdooMates2 жыл бұрын
both the field are in same model ? or one in main model and the other in one2many model ?
@vviharika71912 жыл бұрын
@@OdooMates yes sir one in main model another one is one2many
@@OdooMates {'default_event_amount': total_amount} like this sir
@vviharika71912 жыл бұрын
@@OdooMates sir can i write this code in main model or one2many model sir
@prashanthpoojari82523 жыл бұрын
i have one questions sir i created one wizards with fields and with create button in footer when i click on the CREATE button it will redirect to the other module and shows the all the fields with data and after that if i dont click on the save button records will gone. so i dont want click on save button and without clicking save button it should save. when i click the create button can u pls answer for this sir
@prashanthpoojari82523 жыл бұрын
*if i dont click on the save button
@OdooMates3 жыл бұрын
after entering data in the wizard, what is expected to happen ?
@prashanthpoojari82523 жыл бұрын
@@OdooMates iwant all data in other model and inside of other model it should save automatically
@prashanthpoojari82523 жыл бұрын
its should be happen when i click CREATE button
@OdooMates3 жыл бұрын
@@prashanthpoojari8252 see this video, about how to add wizard and create record in another db. Wizard: kzbin.info/www/bejne/hIm3pKuqgM-fosU
@maaneadel28153 жыл бұрын
Hi Bro can you help me ! i created a field named Auteur and i want to set the name of user account as default value
@OdooMates3 жыл бұрын
use this method: kzbin.info/www/bejne/Z2XQlGScfseJq7c
@maaneadel28153 жыл бұрын
@@OdooMates auteur = fields.Many2one('res.users', default=lambda self: self.env.user, required=True, readonly=True) i use this it work for me
@OdooMates3 жыл бұрын
@@maaneadel2815 good
@mohammedraihan49614 жыл бұрын
how you shown that partner's image in form view?
@OdooMates4 жыл бұрын
It's a binary field with widget OE_avatar
@conghunghoang67832 жыл бұрын
Thank you very much! I am facing with a problem that is context is none when edit one2many child. Please help me!
@OdooMates2 жыл бұрын
how you pass the context
@usmanfarzand40785 жыл бұрын
amazing video
@OdooMates4 жыл бұрын
Thanks :)
@nitinshah3344 жыл бұрын
can you tell how to pass context in xml and use it in name_get method in .py file
@OdooMates4 жыл бұрын
You can pass context along with the field in XML... In the name_get function you can get it by self.env.context
@nitinshah3344 жыл бұрын
@@OdooMates I ahave tried that I get error saying" none type object is not iterable" Also when I try to print context as print(self._context.get('form_patient')) None is printed instead of True which I passed