Explorar o código

commit inicial

Rodney Elpidio Enciso Arias %!s(int64=6) %!d(string=hai) anos
achega
5c78630373
Modificáronse 7 ficheiros con 165 adicións e 0 borrados
  1. 6 0
      __init__.py
  2. BIN=BIN
      __init__.pyc
  3. 53 0
      __openerp__.py
  4. 53 0
      i18n/en.po
  5. 32 0
      stock.py
  6. BIN=BIN
      stock.pyc
  7. 21 0
      stock_view.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 stock

BIN=BIN
__init__.pyc


+ 53 - 0
__openerp__.py

@@ -0,0 +1,53 @@
+# -*- 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/>.
+#
+#######################################################s#######################
+{
+    'name': 'Stock Locations II',
+    'version': '8.0.1.0.0',
+    'category': 'Warehouse Management',
+    'sequence': 14,
+    'summary': '',
+    'description': """
+Stock Locations II
+==================
+Add Location and Destiny Location to stock picking. When stock moves are
+created they are taken by default.
+Add a button to stock picking to update the stock move Location and Destiny
+Location.
+    """,
+    'author':  'adhoc / Rodney Enciso Arias',
+    'website': 'www.adhoc.com.ar',
+    'images': [
+    ],
+    'depends': [
+        'stock',
+    ],
+    'data': [
+        'stock_view.xml',
+    ],
+    'demo': [
+    ],
+    'test': [
+    ],
+    'installable': True,
+    'auto_install': False,
+    'application': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 53 - 0
i18n/en.po

@@ -0,0 +1,53 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_picking_locations
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: odoo-addons (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-09-09 23:58+0000\n"
+"PO-Revision-Date: 2015-09-01 17:53+0000\n"
+"Last-Translator: Juan Jose Scarafia <scarafia.juanjose@gmail.com>\n"
+"Language-Team: English (http://www.transifex.com/adhoc/ingadhoc-odoo-addons-8-0/language/en/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: stock_picking_locations
+#: field:stock.picking,new_location_dest_id:0
+msgid "Destination Location"
+msgstr "Destination Location"
+
+#. module: stock_picking_locations
+#: help:stock.picking,new_location_dest_id:0
+msgid ""
+"Location where the system will stock the finished products. This will be the"
+" default of the asociated stock moves."
+msgstr "Location where the system will stock the finished products. This will be the default of the asociated stock moves."
+
+#. module: stock_picking_locations
+#: model:ir.model,name:stock_picking_locations.model_stock_picking
+msgid "Picking List"
+msgstr "Picking List"
+
+#. module: stock_picking_locations
+#: help:stock.picking,new_location_id:0
+msgid ""
+"Sets a location if you produce at a fixed location. This can be a partner "
+"location if you subcontract the manufacturing operations. This will be the "
+"default of the asociated stock moves."
+msgstr "Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations. This will be the default of the asociated stock moves."
+
+#. module: stock_picking_locations
+#: field:stock.picking,new_location_id:0
+msgid "Source Location"
+msgstr "Source Location"
+
+#. module: stock_picking_locations
+#: view:stock.picking:stock_picking_locations.stock_picking_location_stock_picking_form
+msgid "Update Locations"
+msgstr "Update Locations"

+ 32 - 0
stock.py

@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+# For copyright and license notices, see __openerp__.py file in module root
+# directory
+##############################################################################
+from openerp import models, fields, api
+
+
+class stock_picking(models.Model):
+    _inherit = 'stock.picking'
+
+    new_location_id = fields.Many2one('stock.location', 'Ubicacion de Origen', domain="[('usage','<>','view')]")
+        # readonly=True,
+        # states={
+        #     'draft': [('readonly', False)],
+        #     'waiting': [('readonly', False)],
+        #     'confirmed': [('readonly', False)],
+        #     },)
+    new_location_dest_id = fields.Many2one('stock.location', 'Ubicacion de destino', domain="[('usage','<>','view')]")
+        # readonly=True,
+        # states={
+        #     'draft': [('readonly', False)],
+        #     'waiting': [('readonly', False)],
+        #     'confirmed': [('readonly', False)],
+        #     },
+    @api.one
+    def update_locations(self):
+        vals = {
+            'location_id': self.new_location_id.id,
+            'location_dest_id': self.new_location_dest_id.id
+            }
+        self.move_lines.write(vals)

BIN=BIN
stock.pyc


+ 21 - 0
stock_view.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+
+        <record id="stock_picking_location_stock_picking_form" model="ir.ui.view">
+            <field name="name">stock_picking_location.stock.picking.form</field>
+            <field name="model">stock.picking</field>
+            <field name="inherit_id" ref="stock.view_picking_form"/>
+            <field name="arch" type="xml">
+                <field name="move_lines" position="before">
+                    <group colspan="4" col="6">
+                        <field name="new_location_id"/>
+                        <field name="new_location_dest_id"/>
+                        <button name="update_locations" string="Actualizar Origen/Destino" type="object"/>
+                    </group>
+                </field>
+            </field>
+        </record>
+
+    </data>
+</openerp>