Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2715 มุมมอง

I want to duplicate an attribute of a product after the user selects it. However, I want it to only contain the previously selected values in its attributes and not the values of all the attributes of the original product, in order to only create 1 product variable.

I tried this:

for attribute in self.customization_attribute_line_ids.article_id:
   attribute.copy({
      'name': "{} - {}".format(attribute.name, self.name)
   })

If anyone has any suggestions I would appreciate it.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

We can use article.copy for that, try like below.

self.article_id.copy( default={ 'name': self.article_id.name, 'list_price': self.production_price() } )

Regards

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Olá.

Você pode tentar uma função que monitora a seleção desses produtos algo do tipo @api.onchange('nome da variavel de seleção'), e a partir disto adicionar os atributos deste produto especifico em uma lista.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 22
2859
2
ส.ค. 23
4132
0
ต.ค. 21
1721
1
ก.ย. 19
5146
1
มิ.ย. 25
770