Odoo Help

0

0
2 Answers
0
Balázs Nagy
2019/06/03 10:01

I was unable to figure out which parameters I need for the 'default_supplier':1

I was able to set the default value true on the contact form... how to set a value false? Because now both options are ticked.
0
Avatar

Niyas Raphy

--Niyas Raphy--
24623
| 7 7 11
Wayanad, Kerala, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
2019/05/30 10:09

Hi,

You might be getting this window while you click create and edit option in the Many2one field of the res.partner model. Rather than setting the default value as Supplier ticked, it will be better to pass supplier as True in the context of the Many2one field.


If you set the supplier as default value, every where when you access the res.partner it will be default come as the Supplier .


So here in your case, just activate the developer mode and click the debugger button and Click the Edit Form View option from the corresponding form and check the code where this Contact field is defined.


In the code you can see a field like this,

<field name="partner_id"/>


Along with this field add context as below,


<field name="partner_id" context="{'default_supplier':1, 'default_customer': 0}"/>


If you like setting default values you can go to Customers form view and click debugger button and click the Set defaults option and do it, see the video : How To Set Default Value For A Field in Odoo


Thanks

Ask a Question
Tag
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now