Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
12802 Представления

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.




Аватар
Отменить
Лучший ответ

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/

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июн. 21
7495
1
мая 21
4920
0
мар. 21
2542
4
нояб. 23
8502
2
авг. 25
135