Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
12759 Widoki

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.




Awatar
Odrzuć
Najlepsza odpowiedź

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/

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 21
7482
1
maj 21
4899
0
mar 21
2494
4
lis 23
8483
1
lip 25
2489