Explorar o código

commit incial

Rodney Enciso Arias %!s(int64=8) %!d(string=hai) anos
achega
8325cc9692
Modificáronse 4 ficheiros con 66 adicións e 0 borrados
  1. 1 0
      __init__.py
  2. BIN=BIN
      __init__.pyc
  3. 30 0
      __openerp__.py
  4. 35 0
      views/product_view.xml

+ 1 - 0
__init__.py

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

BIN=BIN
__init__.pyc


+ 30 - 0
__openerp__.py

@@ -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": [
+    ]
+}

+ 35 - 0
views/product_view.xml

@@ -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)]" required="0">
+                <tree create="0">
+                    <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>