[FIX] fix showing all variant active or inactive

This commit is contained in:
Sébastien BEAU
2017-09-16 12:28:22 +02:00
parent 9319b120bf
commit a3844004fb
4 changed files with 24 additions and 3 deletions

View File

@@ -1 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import product

View 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)])

View File

@@ -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"/>