This question has been flagged

Odoo 13.0+e (Enterprise Edition) on odoo.com

Screenshot: https://pasteboard.co/IYQ1VPP.png


Is there any way, when creating a new Product, do have the company fields (red arrow in screenshot) default to the current Company the user is logged in under (blue arrow in screenshot)?


Currently, the field is blank.




Avatar
Discard
Best Answer

Automated Actions should work well, using the environment variable for the current company. 

Start by enabling developer mode and navigating to Settings / Technical / Automated Actions.

Click on "Create" and enter the information shown below:

Python Code: 

record['company_id'] = env.company

https://odootricks.tips/automated-actions-set-company-on-products-odoo-13/

Avatar
Discard
Best Answer

Hello Russ Schneider,

Kindly follow the below-mentioned steps:

1) Go to the Settings> Click on Activate the Developer Mode

2) Now, go-to products and click on the "Create" button to create a new product

3) In the company section, select the company as per your wish

4) Under Debug>> click on "Set Defaults" https://prnt.sc/rfm2er

5) For Default option; select "company=company_name" ; no need to put any condition; you can also set, whether you want to make the company default for all users or just for you. At last click on the save default button. https://prnt.sc/rfm35a

You can follow the same steps if you want to change the default company in future. https://prnt.sc/rfm1f2

Thanks

Anisha Bahukhandi

Technical Content Writer

Webkul

Avatar
Discard