Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3054 Lượt xem

Hi everyone,

I am trying to create specific variants through xmlrpc. But when I set attribute as always, it will create all possible combinations between attributes value. Is there a way how to create only specific variants by declaring the attributes value?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Art,

Hope you are doing well.

In odoo when a new always(instant) attribute's value is added then variant for all possible combinations are automatically created. To create a single varient you might need to override odoo's methods but it will be much difficult as lots of odoo default flows will break.

ie: In website sale / shop the other possible combinations will not be available apart from the one that you created which will give combination does not exist error.

There is an option for dynamic in Attribute and such variants are only created when you add the related combination in sale order.

you can check how odoo manages dynamic variant creation and create a custom method which manages creation of single variant based on provided combinations and trigger it from xmlrpc.

I think you should use dynamic attributes instead of instant for single variant creation.

Thanks & Regards,

Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 5 25
1265
3
thg 11 24
7994
3
thg 9 24
5856
3
thg 6 20
4183
0
thg 12 17
3754