Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
12767 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 21
7482
1
mei 21
4899
0
mrt. 21
2496
4
nov. 23
8485
1
jul. 25
2489