mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
New module <stock_warehouse_orderpoint_stock_info>
removed innecessary data Domain on filter mistaken Expand AUTHORS Changed email
This commit is contained in:
15
stock_warehouse_orderpoint_stock_info/README.rst
Normal file
15
stock_warehouse_orderpoint_stock_info/README.rst
Normal file
@@ -0,0 +1,15 @@
|
||||
Reordering Rules stock info
|
||||
===========================
|
||||
|
||||
This modules allows to know the product availability directly in the reordering
|
||||
rules.
|
||||
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
|
||||
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
* Ana Juaristi <anajuaristi@avanzosc.es>
|
||||
6
stock_warehouse_orderpoint_stock_info/__init__.py
Normal file
6
stock_warehouse_orderpoint_stock_info/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
# For copyright and license notices, see __openerp__.py file in root directory
|
||||
##############################################################################
|
||||
|
||||
from . import models
|
||||
41
stock_warehouse_orderpoint_stock_info/__openerp__.py
Normal file
41
stock_warehouse_orderpoint_stock_info/__openerp__.py
Normal file
@@ -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 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 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": "Reordering rules stock info",
|
||||
"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": [
|
||||
"views/stock_warehouse_orderpoint_view.xml",
|
||||
],
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
}
|
||||
47
stock_warehouse_orderpoint_stock_info/i18n/es.po
Normal file
47
stock_warehouse_orderpoint_stock_info/i18n/es.po
Normal file
@@ -0,0 +1,47 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_warehouse_orderpoint_stock_info
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-03-04 11:41+0000\n"
|
||||
"PO-Revision-Date: 2015-03-04 11:41+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
|
||||
msgid "Availability under minimum"
|
||||
msgstr "Disponibilidad por debajo del mínimo"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
|
||||
msgid "Group By"
|
||||
msgstr "Agrupar por"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: field:stock.warehouse.orderpoint,available:0
|
||||
msgid "Is enough product available?"
|
||||
msgstr "Hay producto suficiente?"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info.model_stock_warehouse_orderpoint
|
||||
msgid "Minimum Inventory Rule"
|
||||
msgstr "Regla de inventario mínimo"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
|
||||
msgid "Rules"
|
||||
msgstr "Reglas"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
|
||||
msgid "Stock Info"
|
||||
msgstr "Info. de Stock"
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_warehouse_orderpoint_stock_info
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-03-04 11:39+0000\n"
|
||||
"PO-Revision-Date: 2015-03-04 11:39+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
|
||||
msgid "Availability under minimum"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
|
||||
msgid "Group By"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: field:stock.warehouse.orderpoint,available:0
|
||||
msgid "Is enough product available?"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info.model_stock_warehouse_orderpoint
|
||||
msgid "Minimum Inventory Rule"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
|
||||
msgid "Rules"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_warehouse_orderpoint_stock_info
|
||||
#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
|
||||
msgid "Stock Info"
|
||||
msgstr ""
|
||||
|
||||
6
stock_warehouse_orderpoint_stock_info/models/__init__.py
Normal file
6
stock_warehouse_orderpoint_stock_info/models/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
# For copyright and license notices, see __openerp__.py file in root directory
|
||||
##############################################################################
|
||||
|
||||
from . import stock_warehouse_orderpoint
|
||||
@@ -0,0 +1,27 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
# For copyright and license notices, see __openerp__.py file in root directory
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class StockWarehouseOrderpoint(models.Model):
|
||||
_inherit = 'stock.warehouse.orderpoint'
|
||||
|
||||
@api.one
|
||||
def _product_available_qty(self):
|
||||
self.product_location_qty = self.product_id.with_context(
|
||||
location=self.location_id.id
|
||||
)._product_available()[self.product_id.id]['qty_available']
|
||||
|
||||
@api.one
|
||||
@api.depends('product_location_qty', 'product_min_qty')
|
||||
def _product_available(self):
|
||||
self.available = self.product_location_qty > self.product_min_qty
|
||||
|
||||
product_location_qty = fields.Float(
|
||||
string='Quantity On Location', compute='_product_available_qty')
|
||||
available = fields.Boolean(
|
||||
string='Is enough product available?', compute='_product_available',
|
||||
store=True)
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="stock_warehouse_orderpoint_tree_view">
|
||||
<field name="name">stock.warehouse.orderpoint.tree</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_max_qty" position="after">
|
||||
<field name="product_location_qty" />
|
||||
<field name="available" invisible="1" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="stock_warehouse_orderpoint_form_view">
|
||||
<field name="name">stock.warehouse.orderpoint.form</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_form" />
|
||||
<field name="arch" type="xml">
|
||||
<group string="Rules" position="after">
|
||||
<group string="Stock Info">
|
||||
<field name="product_location_qty" />
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="stock_warehouse_orderpoint_search_view">
|
||||
<field name="name">stock.warehouser.orderpoint.search</field>
|
||||
<field name="model">stock.warehouse.orderpoint</field>
|
||||
<field name="inherit_id" ref="stock.warehouse_orderpoint_search" />
|
||||
<field name="arch" type="xml">
|
||||
<group string="Group By" position="before">
|
||||
<filter string="Availability under minimum"
|
||||
domain="[('available', '=', False)]"
|
||||
context="{}" />
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user