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

Hi there,

I'm using Odoo 12 and I'm using Variants and Options in the sale module.

Whenever I add attribute values to a product all archived variants get their status changed from active = False to True? This makes it hard to manage products with a lot of variants.

I would think this is a bug, I don't see any reason why this could be useful? Any help?

Thanks

Rufus

الصورة الرمزية
إهمال
الكاتب

For the moment it did an override to change behavior:

class ProductTemplate(models.Model):

_inherit = "product.template"

def create_variant_ids(self):

archived_product_variants_ids = self.env['product.product'].search([('product_tmpl_id','=',self.id),('active','=',False)])

super(ProductTemplate, self).create_variant_ids()

result = archived_product_variants_ids.write({'active':False})

المنشورات ذات الصلة الردود أدوات العرض النشاط
4
أكتوبر 23
1948
1
يوليو 25
475
2
يوليو 25
738
1
يوليو 25
557
1
يوليو 25
554