Jelajahi Sumber

commit inicial

Rodney Enciso Arias 8 tahun lalu
induk
melakukan
bfd5a77dd8
7 mengubah file dengan 24 tambahan dan 2 penghapusan
  1. 0 0
      __init__.py
  2. TEMPAT SAMPAH
      __init__.pyc
  3. 1 1
      __openerp__.py
  4. 0 0
      models/__init__.py
  5. TEMPAT SAMPAH
      models/__init__.pyc
  6. TEMPAT SAMPAH
      static/description/icon.png
  7. 23 1
      views/product_view.xml

+ 0 - 0
__init__.py


TEMPAT SAMPAH
__init__.pyc


+ 1 - 1
__openerp__.py

@@ -29,7 +29,7 @@
 Product Hide Tabs
 =================
 This is a security feature, in order to hide sale/inventory tabs in product
-form view.
+form view, for all user groups except for stock manager.
     """,
     'author':  'Blanco Martin & Asociados',
     'website': 'http://blancomartin.cl',

+ 0 - 0
models/__init__.py


TEMPAT SAMPAH
models/__init__.pyc


TEMPAT SAMPAH
static/description/icon.png


+ 23 - 1
views/product_view.xml

@@ -6,10 +6,32 @@
             <field name="model">product.template</field>
             <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
+             	<xpath expr="//form/sheet/notebook//page[@string='Procurements']" position="attributes">
+                    <!--<attribute name="attrs">{'invisible':True}</attribute>-->
+                    <attribute name="groups">stock.group_stock_manager</attribute>
+                </xpath>
+                <xpath expr="//form/sheet/notebook//page[@string='Inventory']" position="attributes">
+                	<!--<attribute name="attrs">{'invisible':True}</attribute>-->
+                    <attribute name="groups">stock.group_stock_manager</attribute>
+                </xpath>
+            </field>
+        </record>
+
+        <record id="product_product_hide_tabs" model="ir.ui.view">
+            <field name="name">product.template_hide_tabs</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="arch" type="xml">
+             	<xpath expr="//form/sheet/notebook//page[@string='Procurements']" position="attributes">
+                    <!--<attribute name="attrs">{'invisible':True}</attribute>-->
+                    <attribute name="groups">stock.group_stock_manager</attribute>
+                </xpath>
                 <xpath expr="//form/sheet/notebook//page[@string='Inventory']" position="attributes">
-                	<attribute name="attrs">{'invisible':True}</attribute>
+                	<!--<attribute name="attrs">{'invisible':True}</attribute>-->
+                    <attribute name="groups">stock.group_stock_manager</attribute>
                 </xpath>
             </field>
         </record>
+
     </data>
 </openerp>