[FIX] fix showing all variant active or inactive
This commit is contained in:
@@ -1 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
|
||||
3
product_variant_usability/models/__init__.py
Normal file
3
product_variant_usability/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import product
|
||||
16
product_variant_usability/models/product.py
Normal file
16
product_variant_usability/models/product.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Akretion (http://www.akretion.com).
|
||||
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp import fields, models
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
all_product_variant_ids = fields.One2many(
|
||||
'product.product',
|
||||
'product_tmpl_id',
|
||||
'All Product Variant',
|
||||
domain=['|', ('active', '=', False), ('active', '=', True)])
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="priority" eval="64"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="attribute_line_ids" position="after">
|
||||
<field name="product_variant_ids" nolabel="1" domain="['|', ('active', '=', False), ('active', '=', True)]" required="0">
|
||||
<field name="all_product_variant_ids" nolabel="1" required="0">
|
||||
<tree create="0">
|
||||
<field name="default_code"/>
|
||||
<field name="attribute_value_ids" widget="many2many_tags"/>
|
||||
|
||||
Reference in New Issue
Block a user