Quellcode durchsuchen

Ocultar botón de impresión y enviar email.

sebas vor 3 Jahren
Commit
471d916ef9
6 geänderte Dateien mit 163 neuen und 0 gelöschten Zeilen
  1. 22 0
      __init__.py
  2. 51 0
      __openerp__.py
  3. 20 0
      account_invoice_view.xml
  4. 27 0
      purchase_view.xml
  5. 26 0
      sale_view.xml
  6. 17 0
      stock_view.xml

+ 22 - 0
__init__.py

@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    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/>.
+#
+##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 51 - 0
__openerp__.py

@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2013 Ecosoft Co., Ltd. (http://ecosoft.co.th).
+#
+#    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' : "Hide print y send email Buttons",
+    'author' : 'Ecosoft',
+    'summary': 'SO/PO/DO/INV',
+    'description': """
+
+Hide print y send email button in basic modules,
+
+* SO/PO/DO/INV
+
+""",
+    'category': 'Tools',
+    'sequence': 10,
+    'website' : 'http://www.ecosoft.co.th',
+    'images' : [],
+    'depends' : ['account','purchase','sale','stock'],
+    'demo' : [],
+    'data' : [
+            'account_invoice_view.xml',
+            'purchase_view.xml',
+            'sale_view.xml',
+    ],
+    'test' : [
+    ],
+    'auto_install': False,
+    'application': True,
+    'installable': True,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 20 - 0
account_invoice_view.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="invoice_form_ext" model="ir.ui.view">
+            <field name="name">invoice.form.ext</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form"/>
+            <field name="arch" type="xml">
+            	<data>
+                    <button name="invoice_print" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="invoice_print" string="Print Invoice" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+				</data>
+            </field>
+        </record>
+	</data>
+</openerp>

+ 27 - 0
purchase_view.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="purchase_order_form_ext" model="ir.ui.view">
+            <field name="name">purchase.order.form.ext</field>
+            <field name="model">purchase.order</field>
+            <field name="inherit_id" ref="purchase.purchase_order_form"/>
+            <field name="arch" type="xml">
+            	<data>
+                    <button name="print_quotation" states="draft" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="print_quotation" states="sent" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="wkf_send_rfq" states="draft" position="attributes">
+                      <attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="wkf_send_rfq" states="sent" position="attributes">
+                      <attribute name="invisible">True</attribute>
+                    </button>
+
+				       </data>
+            </field>
+        </record>
+	</data>
+</openerp>

+ 26 - 0
sale_view.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_order_form_ext" model="ir.ui.view">
+            <field name="name">view.order.form.ext</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_form"/>
+            <field name="arch" type="xml">
+            	<data>
+                    <button name="print_quotation" states="draft" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="print_quotation" states="sent,progress,manual" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="action_quotation_send" states="draft" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+                    <button name="action_quotation_send" states="sent,progress,manual" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+				       </data>
+            </field>
+        </record>
+	</data>
+</openerp>

+ 17 - 0
stock_view.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_picking_out_form_ext" model="ir.ui.view">
+            <field name="name">view.picking.out.form.ext</field>
+            <field name="model">stock.picking.out</field>
+            <field name="inherit_id" ref="stock.view_picking_out_form"/>
+            <field name="arch" type="xml">
+            	<data>
+                    <button name="%(stock.report_picking_list_out)d" position="attributes">
+                    	<attribute name="invisible">True</attribute>
+                    </button>
+				</data>
+            </field>
+        </record>
+	</data>
+</openerp>