[IMP] add module product_variant_usability

This commit is contained in:
Sébastien BEAU
2017-01-10 15:29:37 +01:00
parent 880cf7c7a9
commit aad2121f20
3 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,30 @@
# -*- 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).
{
"name": "Product Variant Usability",
"summary": "Improve the product variant usability",
"version": "8.0.1.0.0",
"category": "Uncategorized",
"website": "www.akretion.com",
"author": " Akretion",
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],
},
"depends": [
"product_variant_inactive",
],
"data": [
"views/product_view.xml",
],
"demo": [
],
"qweb": [
]
}

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="product_template_view_form" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<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)]">
<tree>
<field name="default_code"/>
<field name="attribute_value_ids" widget="many2many_tags"/>
<field name="qty_available"/>
<field name="active" invisible="1"/>
<button type="object"
name="button_activate"
attrs="{'invisible': [('active','=',True)]}"
icon="gtk-stop"/>
<button type="object"
name="button_deactivate"
attrs="{'invisible': [('active','=',False)]}"
icon="gtk-apply"/>
</tree>
</field>
</field>
<xpath expr="//field[@name='product_variant_count']/../.." position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
</data>
</openerp>