Browse Source

ADD Añade el campo del motivo de inventario en ajustes de inventario

Sebas 6 years ago
commit
d079187445

+ 20 - 0
__init__.py

@@ -0,0 +1,20 @@
+# -*- 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/>.
+#
+##############################################################################
+
+import inventory_obs_field
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

BIN
__init__.pyc


+ 32 - 0
__openerp__.py

@@ -0,0 +1,32 @@
+# -*- 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': 'Obs Field in Inventory',
+    'version': '2.0',
+    'category': 'Tools',
+    'description': """This module allow to add obs field in inventory.""",
+    'author': 'Sebastian Penayo/Eiru Software',
+    'website': 'http://www.eiru.com',
+    'depends': ['base','stock'],
+    'data': ['inventory_obs_field_view.xml',
+            ],
+    'installable': True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 31 - 0
inventory_obs_field.py

@@ -0,0 +1,31 @@
+# -*- 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/>.
+#
+##############################################################################
+
+from openerp.osv import osv, fields
+
+class obs_inventory(osv.osv):
+    '''
+    Add observation inventory to stock.inventory
+    '''
+    _name = 'stock.inventory'
+    _inherit = 'stock.inventory'
+    _description = 'Add observation inventory in stock'
+
+    _columns = {
+        'obs_inventory':fields.char('Observación:', size=150, required=False, readonly=False),
+    }

BIN
inventory_obs_field.pyc


+ 18 - 0
inventory_obs_field_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+
+        <record id="view_inventory_obs_form" model="ir.ui.view">
+            <field name="name">inventory.obs.field.inherit</field>
+            <field name="model">stock.inventory</field>
+            <field name="inherit_id" ref="stock.view_inventory_form"/>
+            <field name="arch" type="xml">
+
+                    <field name="location_id" position="after">
+                        <field string="Motivo:" name="obs_inventory" placeholder="Motivo del Inventario" />
+                    </field>
+
+            </field>
+        </record>
+    </data>
+</openerp>

+ 2 - 0
security/ir.model.access.csv

@@ -0,0 +1,2 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_partner_primer_contacto","res.partner.primer.contacto","model_res_partner_primer_contacto","base.group_partner_manager",1,1,1,1

BIN
static/description/icon.png