تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2706 أدوات العرض

How can we configure the Product template, to have a specific PRODUCT TAG automatically added when new products are created?

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

If you have a scenario where new products when created need to carry a specific TAG on it, you can do that by creating an automated action. 

Create the related TAG and get the related ID number. You will need that to be added to the automation rule.

For that you need to select the related TAG and check the URL:

https://15784293-saas-15-2-all.runbot82.odoo.com/web#id=1&cids=1&menu_id=548&action=1585&model=product.tag&view_type=form


In this case our TAG ID it is 1

How to create the Automated Action:

In debug mode, type: Automated Action in the main menu. After that create a new Automation action as below:

1 - Name: TAG on Product Creation

2 - Mode: Product Template

3 - Trigger: On Creation

4 - Action to do: Update the record

5 - Field: Product Tags / Evaluation Type: Python Expression / Value  [(6,0, [1])]



***Extra***
Why the VALUE info is like that? [(6,0, [1])]

6 and 0 in Odoo expression mean: UPDATE

and 1 is the ID of the TAG we want to use in the update process.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يونيو 25
2298
0
مايو 24
1546
1
مارس 24
1439
1
يناير 24
1430
1
أكتوبر 22
2577