콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
887 화면

How can I stop Odoo from auto-populating attribute values after I add an attribute to a product?

I am using a Manufacturer and a Brand attribute so that my customers can use this as a filter in the shop and also see the information on the product page. Display type is "Select", Variant Creation is "Never", and Filter Visibility is "Visible". All is good on the front end.

When I create a new product and add the Manufacturer attribute, all 200 possible values are auto-populated. I need to delete 199 of them... I would like the attribute value to be blank and select one option.

아바타
취소
베스트 답변

Hello Jean-Sebastien


Solution would be Automation action on product.template.attribute.line model, to reset value of attribute value on selection of attribute. 


1) Activate Developer mode from setting --> Click on Activate Developer Mode.

2) Go to Settings --> Technical --> Autotmation Rules

3) Create new automation rules as following


Model -> Product Template Attribute Line

Trigger -> On UI Change

When updating --> Attribute

Add An action --> python code



record['value_ids'] = False


Thanks & Regards,

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209

Email: info@candidroot.com

아바타
취소
작성자 베스트 답변

I tried and it works like a charm. Much appreciated!

아바타
취소