Преглед изворни кода

modulo para ocultar el print de la factura

sebas пре 8 година
комит
f87c31d0d8
9 измењених фајлова са 248 додато и 0 уклоњено
  1. 15 0
      README.rst
  2. 18 0
      __init__.py
  3. BIN
      __init__.pyc
  4. 30 0
      __openerp__.py
  5. 42 0
      i18n/de.po
  6. 42 0
      i18n/es.po
  7. 42 0
      i18n/sl.po
  8. 41 0
      i18n/tr_TR.po
  9. 18 0
      invoice_view.xml

+ 15 - 0
README.rst

@@ -0,0 +1,15 @@
+
+
+===========================
+Account Draft Invoice Print
+===========================
+
+This module adds the button print when customer invoice's state is draft.
+This make the user more comfortable because he doesn't have to click on dropdown menu "Print".
+If this module is not installed, you don't have the button in the form view when customer invoice's state is draft.
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/issues>`_.
+In case of trouble, please check there if your issue has already been reported.

+ 18 - 0
__init__.py

@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#
+#    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/>.
+#
+##############################################################################


+ 30 - 0
__openerp__.py

@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#
+#    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': 'Account Hide Invoice Print Buttom',
+ 'version': '8.0.1.0.0',
+ 'category': 'Accounting & Finance',
+ 'author': "Eiru Software, Sebastian Penayo",
+ 'website': '',
+ 'license': 'AGPL-3',
+ 'depends': ['account'],
+ 'data': ['invoice_view.xml'],
+ 'installable': True,
+ 'active': False,
+ }

+ 42 - 0
i18n/de.po

@@ -0,0 +1,42 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_draft_invoice_print
+# 
+# Translators:
+# Rudolf Schnapka <rs@techno-flex.de>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: account-invoice-reporting (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-09 02:56+0000\n"
+"PO-Revision-Date: 2016-01-14 11:14+0000\n"
+"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
+"Language-Team: German (http://www.transifex.com/oca/OCA-account-invoice-reporting-8-0/language/de/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print"
+msgstr "Drucke"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print Invoice"
+msgstr "Drucke Rechnung"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',False), ('state', 'not in', "
+"['open','draft'])]}"
+msgstr ""
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',True), ('state', 'not in', ['open','draft'])]}"
+msgstr ""

+ 42 - 0
i18n/es.po

@@ -0,0 +1,42 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_draft_invoice_print
+# 
+# Translators:
+# Antonio Trueba, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: account-invoice-reporting (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-16 02:56+0000\n"
+"PO-Revision-Date: 2016-02-16 14:57+0000\n"
+"Last-Translator: Antonio Trueba\n"
+"Language-Team: Spanish (http://www.transifex.com/oca/OCA-account-invoice-reporting-8-0/language/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print"
+msgstr "Imprimir"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print Invoice"
+msgstr "Imprimir factura"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',False), ('state', 'not in', "
+"['open','draft'])]}"
+msgstr ""
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',True), ('state', 'not in', ['open','draft'])]}"
+msgstr ""

+ 42 - 0
i18n/sl.po

@@ -0,0 +1,42 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_draft_invoice_print
+# 
+# Translators:
+# Matjaž Mozetič <m.mozetic@matmoz.si>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: account-invoice-reporting (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-05 08:56+0000\n"
+"PO-Revision-Date: 2016-01-06 10:15+0000\n"
+"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-account-invoice-reporting-8-0/language/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print"
+msgstr "Tiskanje"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print Invoice"
+msgstr "Natisni račun"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',False), ('state', 'not in', "
+"['open','draft'])]}"
+msgstr "{'invisible':['|',('sent','=',False), ('state', 'not in', ['open','draft'])]}"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',True), ('state', 'not in', ['open','draft'])]}"
+msgstr "{'invisible':['|',('sent','=',True), ('state', 'not in', ['open','draft'])]}"

+ 41 - 0
i18n/tr_TR.po

@@ -0,0 +1,41 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_draft_invoice_print
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: account-invoice-reporting (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-12-31 00:20+0000\n"
+"PO-Revision-Date: 2016-01-05 08:56+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-account-invoice-reporting-8-0/language/tr_TR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr_TR\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print"
+msgstr "Yazdır"
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid "Print Invoice"
+msgstr ""
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',False), ('state', 'not in', "
+"['open','draft'])]}"
+msgstr ""
+
+#. module: account_draft_invoice_print
+#: view:account.invoice:account_draft_invoice_print.invoice_form_print_cancel
+msgid ""
+"{'invisible':['|',('sent','=',True), ('state', 'not in', ['open','draft'])]}"
+msgstr ""

+ 18 - 0
invoice_view.xml

@@ -0,0 +1,18 @@
+<openerp>
+  <data>
+        <record id="invoice_form_hideprint_cancel" model="ir.ui.view">
+            <field name="name">account.invoice.form.hideprint.cancel</field>
+            <field name="model">account.invoice</field>
+            <field name="inherit_id" ref="account.invoice_form" />
+            <field name="arch" type="xml">
+                <button name="invoice_print" string="Print" position="attributes">
+                    <attribute name="attrs">{'invisible':['|',('sent','=',True), ('state', 'in', ['open','paid','draft','cancel'])]}</attribute>
+                </button>
+                <button name="invoice_print" string="Print Invoice" position="attributes">
+                    <attribute name="attrs">{'invisible':['|',('sent','=',False), ('state', 'in', ['open','paid','draft','cancel'])]}</attribute>
+                </button>
+            </field>
+        </record>
+
+  </data>
+</openerp>