Rodney Enciso Arias 7 lat temu
commit
0e2c92fe25
7 zmienionych plików z 116 dodań i 0 usunięć
  1. 6 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 45 0
      __openerp__.py
  4. 7 0
      security/security.xml
  5. 3 0
      static/src/css/custom.css
  6. 45 0
      views/fields_view.xml
  7. 10 0
      views/templates.xml

+ 6 - 0
__init__.py

@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+# For copyright and license notices, see __openerp__.py file in module root
+# directory
+##############################################################################
+# from . import models

BIN
__init__.pyc


+ 45 - 0
__openerp__.py

@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2015  ADHOC SA  (http://www.adhoc.com.ar)
+#    All Rights Reserved.
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    'name': 'Fields Security Contracts',
+    'version': '8.0.0.1.0',
+    'description': """
+Fields Security HR
+==================
+Oculta ciertos campos no utilizados en el modulo de Contratos
+""",
+    'category': 'Ventas',
+    'author': 'Eiru Software - Rodney Enciso Arias',
+    'website': 'http://www.eiru.com.py/',
+    'license': 'AGPL-3',
+    'depends': [
+        'sale','fields_security','account_analytic_analysis'
+    ],
+    'data': [
+        'security/security.xml',
+        'views/templates.xml',
+        'views/fields_view.xml',
+    ],
+    'demo_xml': [],
+    'test': [],
+    'installable': True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 7 - 0
security/security.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<openerp>
+    <data noupdate="1">
+    	
+    </data>
+</openerp>
+

+ 3 - 0
static/src/css/custom.css

@@ -0,0 +1,3 @@
+div [name="project"]{
+    display: none;
+}

+ 45 - 0
views/fields_view.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="analytic_account_form_view">
+            <field name="name">analytic.account.form.view</field>
+            <field name="model">account.analytic.account</field>
+            <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
+            <field name="groups_id" eval="[(6, 0, [ref('fields_security.group_restrict_fields')])]"/>
+            <field name="arch" type="xml">
+                <field name="template_id" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </field>
+                <field name="parent_id" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </field>
+            </field>
+        </record>
+        <record model="ir.ui.view" id="analytic_account_form_view_inherit">
+            <field name="name">analytic.account.form.view.inherit</field>
+            <field name="model">account.analytic.account</field>
+            <field name="inherit_id" ref="account_analytic_analysis.account_analytic_account_form_form"/>
+            <field name="groups_id" eval="[(6, 0, [ref('fields_security.group_restrict_fields')])]"/>
+            <field name="arch" type="xml">
+                <xpath expr="//form/sheet/notebook//table[@class='oe_form_analytic_account']" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </xpath>
+                <xpath expr="//form/sheet/notebook//separator[@string='Invoicing']" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </xpath>
+                <label for="quantity_max" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </label>
+                <field name="quantity_max" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </field>
+                <xpath expr="//form/sheet/notebook//group[@name='invoice_on_timesheets']" position="attributes">
+                    <attribute name="attrs">{'invisible':True}</attribute>
+                </xpath>
+                <button name="recurring_create_invoice" position="replace">
+                    <button class="oe_link" name="recurring_create_invoice" attrs="{'invisible': [('recurring_invoices','!=',True)]}" string="⇒ create invoices" type="object"/>
+                </button>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 10 - 0
views/templates.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <template id="security_fields_contracts_assets" inherit_id="eiru_assets.assets">
+            <xpath expr="." position="inside">
+                <link rel="stylesheet" href="/fields_security_contracts/static/src/css/custom.css" />
+            </xpath>
+        </template>
+    </data>
+</openerp>