Jelajahi Sumber

commit inicial

Rodney Enciso Arias 8 tahun lalu
melakukan
706db6622e
8 mengubah file dengan 159 tambahan dan 0 penghapusan
  1. 15 0
      README.rst
  2. 4 0
      __init__.py
  3. TEMPAT SAMPAH
      __init__.pyc
  4. 41 0
      __openerp__.py
  5. 26 0
      i18n/pt_BR.po
  6. 26 0
      i18n/sl.po
  7. 10 0
      security/stock_disable_force_availability_button_security.xml
  8. 37 0
      views/stock_view.xml

+ 15 - 0
README.rst

@@ -0,0 +1,15 @@
+Disable force availability button
+=================================
+
+This module creates a security group that limits the visibility of "Force
+availability" button on stock operations to those that belong to this group.
+
+
+Credits
+=======
+
+Contributors
+------------
+* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
+* Pedro M. Baeza <pedro.baeza@serviciobaeza.com>
+* Ana Juaristi <anajuaristi@avanzosc.es>

+ 4 - 0
__init__.py

@@ -0,0 +1,4 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+# For copyright and license notices, see __openerp__.py file in root directory
+##############################################################################

TEMPAT SAMPAH
__init__.pyc


+ 41 - 0
__openerp__.py

@@ -0,0 +1,41 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see http://www.gnu.org/licenses/.
+#
+##############################################################################
+
+{
+    "name": "Disable force availability button",
+    "version": "1.0",
+    "depends": [
+        "stock",
+    ],
+    "author": "OdooMRP team,"
+              "AvanzOSC,"
+              "Serv. Tecnol. Avanzados - Pedro M. Baeza",
+    "website": "http://www.odoomrp.com",
+    "contributors": [
+        "Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>",
+        "Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
+        "Ana Juaristi <anajuaristi@avanzosc.es>"
+    ],
+    "category": "Custom Module",
+    "summary": "",
+    "data": [
+        "security/stock_disable_force_availability_button_security.xml",
+        "views/stock_view.xml",
+    ],
+    "installable": True,
+}

+ 26 - 0
i18n/pt_BR.po

@@ -0,0 +1,26 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_disable_force_availability_button
+# 
+# Translators:
+# danimaribeiro <danimaribeiro@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: odoomrp-utils (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-10-08 08:46+0000\n"
+"PO-Revision-Date: 2015-10-09 01:22+0000\n"
+"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-utils-8-0/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: stock_disable_force_availability_button
+#: view:stock.move:stock_disable_force_availability_button.stock_move_disable_button_form_view
+#: view:stock.move:stock_disable_force_availability_button.stock_move_picking_disable_button_form_view
+#: view:stock.picking:stock_disable_force_availability_button.stock_picking_disable_button_form_view
+msgid "stock.group_stock_force_availability"
+msgstr "stock.group_stock_force_availability"

+ 26 - 0
i18n/sl.po

@@ -0,0 +1,26 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_disable_force_availability_button
+# 
+# Translators:
+# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: odoomrp-utils (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-10-08 08:46+0000\n"
+"PO-Revision-Date: 2015-09-28 13:20+0000\n"
+"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-utils-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: stock_disable_force_availability_button
+#: view:stock.move:stock_disable_force_availability_button.stock_move_disable_button_form_view
+#: view:stock.move:stock_disable_force_availability_button.stock_move_picking_disable_button_form_view
+#: view:stock.picking:stock_disable_force_availability_button.stock_picking_disable_button_form_view
+msgid "stock.group_stock_force_availability"
+msgstr "stock.group_stock_force_availability"

+ 10 - 0
security/stock_disable_force_availability_button_security.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="0">
+        <record id="stock.group_stock_force_availability" model="res.groups">
+            <field name="name">Allow to force availability on stock operations</field>
+            <field name="category_id" ref="base.module_category_hidden" />
+            <field name="users" eval="[(4, ref('base.user_root'))]"/>
+        </record>
+    </data>
+</openerp>

+ 37 - 0
views/stock_view.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record model="ir.ui.view" id="stock_picking_disable_button_form_view">
+            <field name="name">stock.picking.disable_button.form</field>
+            <field name="model">stock.picking</field>
+            <field name="inherit_id" ref="stock.view_picking_form" />
+            <field name="arch" type="xml">
+                <button name="force_assign" position="attributes">
+                    <attribute name="groups">stock.group_stock_force_availability</attribute>
+                </button>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="stock_move_disable_button_form_view">
+            <field name="name">stock.move.disable_button.form</field>
+            <field name="model">stock.move</field>
+            <field name="inherit_id" ref="stock.view_move_form" />
+            <field name="arch" type="xml">
+                <button name="force_assign" position="attributes">
+                    <attribute name="groups">stock.group_stock_force_availability</attribute>
+                </button>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="stock_move_picking_disable_button_form_view">
+            <field name="name">stock.move.picking.disable_button.form</field>
+            <field name="model">stock.move</field>
+            <field name="inherit_id" ref="stock.view_move_picking_form" />
+            <field name="arch" type="xml">
+                <button name="force_assign" position="attributes">
+                    <attribute name="groups">stock.group_stock_force_availability</attribute>
+                </button>
+            </field>
+        </record>
+    </data>
+</openerp>