New module <stock_warehouse_orderpoint_stock_info>

removed innecessary data
Domain on filter mistaken
Expand AUTHORS
Changed email
This commit is contained in:
oihane
2015-02-17 10:04:40 +01:00
committed by ps-tubtim
parent 036eb94292
commit bc9731773a
8 changed files with 232 additions and 0 deletions

View 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>

View File

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

View 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,
}

View 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"

View 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: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 ""

View 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

View File

@@ -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)

View File

@@ -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>