[ADD] product_expiry
bzr revid: nel@tinyerp.com-20100614112930-nsefgdaw3cety5a6
This commit is contained in:
parent
7f6a11818c
commit
fe6e6e43c1
|
@ -0,0 +1,25 @@
|
|||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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 product_expiry
|
||||
import wizard
|
||||
import report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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" : "Products date of expiry",
|
||||
"version" : "1.0",
|
||||
"author" : "Tiny",
|
||||
"category" : "Enterprise Specific Modules/Food Industries",
|
||||
"depends" : ["base", "account", "product", "stock"],
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["product_expiry_demo.xml"],
|
||||
"description": '''Track different dates on products and production lots:
|
||||
- end of life
|
||||
- best before date
|
||||
- removal date
|
||||
- alert date
|
||||
Used, for example, in food industries.''',
|
||||
"update_xml" : ["product_expiry_view.xml", "report/report_stock_view.xml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
# Catalan translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-06-30 15:09+0000\n"
|
||||
"PO-Revision-Date: 2010-01-10 22:56+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Catalan <ca@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-21 03:45+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,life_time:0
|
||||
msgid "Product lifetime"
|
||||
msgstr "Cicle de vida producte"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_from_product_template
|
||||
msgid "Ham"
|
||||
msgstr "Pernil"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_lait_product_template
|
||||
msgid "Cow milk"
|
||||
msgstr "Llet de vaca"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
|
||||
msgid "Products date of expiry"
|
||||
msgstr "Data de caducitat de productes"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid ""
|
||||
"Error: The default UOM and the purchase UOM must be in the same category."
|
||||
msgstr ""
|
||||
"Error: La UdM per defecte i la UdM de compra han d'estar en la mateixa "
|
||||
"categoria."
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "XML no vàlid per a la definició de la vista!"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,life_date:0
|
||||
msgid "The date the lot may become dangerous and should not be consumed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,removal_date:0
|
||||
msgid "Removal Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,description:product_expiry.module_meta_information
|
||||
msgid ""
|
||||
"Track different dates on products and production lots:\n"
|
||||
" - end of life\n"
|
||||
" - best before date\n"
|
||||
" - removal date\n"
|
||||
" - alert date\n"
|
||||
"Used, for example, in food industries."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_pain_product_template
|
||||
msgid "Bread"
|
||||
msgstr "Pa"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.uom,name:product_expiry.product_uom_ltr
|
||||
#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
|
||||
msgid "LTR"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: view:product.product:0
|
||||
#: view:stock.production.lot:0
|
||||
msgid "Dates"
|
||||
msgstr "Dates"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: UOS must be in a different category than the UOM"
|
||||
msgstr "Error: La UdV ha d'estar en una categoria diferent que la UdM."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,life_date:0
|
||||
msgid "End of Life Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,use_date:0
|
||||
msgid "Best before Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,use_date:0
|
||||
msgid "The date the lot starts deteriorating without becoming dangerous."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_jambon_product_template
|
||||
msgid "French cheese Camenbert"
|
||||
msgstr "Formatge Camembert francès"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,removal_time:0
|
||||
msgid "The number of days before a production lot should be removed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,use_time:0
|
||||
msgid "Product usetime"
|
||||
msgstr "Temps d'ús producte"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,alert_date:0
|
||||
msgid "Alert Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,removal_time:0
|
||||
msgid "Product removal time"
|
||||
msgstr "Data eliminació producte"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,use_time:0
|
||||
msgid ""
|
||||
"The number of days before a production lot starts deteriorating without "
|
||||
"becoming dangerous."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.product:0
|
||||
msgid "Error: Invalid ean code"
|
||||
msgstr "Error: Codi EAN erroni"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,life_time:0
|
||||
msgid ""
|
||||
"The number of days before a production lot may become dangerous and should "
|
||||
"not be consumed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,removal_date:0
|
||||
msgid "The date the lot should be removed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,alert_time:0
|
||||
msgid "Product alert time"
|
||||
msgstr "Data alerta producte"
|
||||
|
||||
#~ msgid "Alert date"
|
||||
#~ msgstr "Data alarma"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Track different dates on products and lots. Used, for exampel, in food "
|
||||
#~ "industries: expiry date, alert date, date of removal, eso."
|
||||
#~ msgstr ""
|
||||
#~ "Gestiona diferents dates per a productes i lots. Utilitzat, per exemple, en "
|
||||
#~ "la indústria alimentària: Data de caducitat, data d'alarma, data "
|
||||
#~ "d'eliminació, ..."
|
||||
|
||||
#~ msgid "DLUO"
|
||||
#~ msgstr "Data caducitat"
|
||||
|
||||
#~ msgid "Removal date"
|
||||
#~ msgstr "Data eliminació"
|
|
@ -0,0 +1,180 @@
|
|||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-06-30 15:09+0000\n"
|
||||
"PO-Revision-Date: 2010-04-29 04:43+0000\n"
|
||||
"Last-Translator: Rhubeni Lopes de Andrade <rhube.itsasecret@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-21 03:45+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,life_time:0
|
||||
msgid "Product lifetime"
|
||||
msgstr "Ciclo de vida producto"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_from_product_template
|
||||
msgid "Ham"
|
||||
msgstr "Jamón"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_lait_product_template
|
||||
msgid "Cow milk"
|
||||
msgstr "Leche de vaca"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
|
||||
msgid "Products date of expiry"
|
||||
msgstr "Fecha de caducidad de productos"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid ""
|
||||
"Error: The default UOM and the purchase UOM must be in the same category."
|
||||
msgstr ""
|
||||
"Error: La UdM por defecto y la UdM de compra deben estar en la misma "
|
||||
"categoría."
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "¡XML no válido para la definición de la vista!"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,life_date:0
|
||||
msgid "The date the lot may become dangerous and should not be consumed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,removal_date:0
|
||||
msgid "Removal Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,description:product_expiry.module_meta_information
|
||||
msgid ""
|
||||
"Track different dates on products and production lots:\n"
|
||||
" - end of life\n"
|
||||
" - best before date\n"
|
||||
" - removal date\n"
|
||||
" - alert date\n"
|
||||
"Used, for example, in food industries."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_pain_product_template
|
||||
msgid "Bread"
|
||||
msgstr "Pan"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.uom,name:product_expiry.product_uom_ltr
|
||||
#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
|
||||
msgid "LTR"
|
||||
msgstr "LTR"
|
||||
|
||||
#. module: product_expiry
|
||||
#: view:product.product:0
|
||||
#: view:stock.production.lot:0
|
||||
msgid "Dates"
|
||||
msgstr "Fechas"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: UOS must be in a different category than the UOM"
|
||||
msgstr "Error: La UdV debe estar en una categoría diferente que la UdM."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,life_date:0
|
||||
msgid "End of Life Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,use_date:0
|
||||
msgid "Best before Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,use_date:0
|
||||
msgid "The date the lot starts deteriorating without becoming dangerous."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_jambon_product_template
|
||||
msgid "French cheese Camenbert"
|
||||
msgstr "Queso Camembert francés"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,removal_time:0
|
||||
msgid "The number of days before a production lot should be removed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,use_time:0
|
||||
msgid "Product usetime"
|
||||
msgstr "Tiempo de uso producto"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,alert_date:0
|
||||
msgid "Alert Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,removal_time:0
|
||||
msgid "Product removal time"
|
||||
msgstr "Fecha eliminación producto"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,use_time:0
|
||||
msgid ""
|
||||
"The number of days before a production lot starts deteriorating without "
|
||||
"becoming dangerous."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.product:0
|
||||
msgid "Error: Invalid ean code"
|
||||
msgstr "Error: Código EAN erróneo"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,life_time:0
|
||||
msgid ""
|
||||
"The number of days before a production lot may become dangerous and should "
|
||||
"not be consumed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,removal_date:0
|
||||
msgid "The date the lot should be removed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,alert_time:0
|
||||
msgid "Product alert time"
|
||||
msgstr "Fecha alerta producto"
|
||||
|
||||
#~ msgid "Alert date"
|
||||
#~ msgstr "Fecha alarma"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Track different dates on products and lots. Used, for exampel, in food "
|
||||
#~ "industries: expiry date, alert date, date of removal, eso."
|
||||
#~ msgstr ""
|
||||
#~ "Gestiona distintas fechas para productos y lotes. Utilizado, por ejemplo, en "
|
||||
#~ "industria alimentaria: Fecha de caducidad, fecha de alarma, fecha de "
|
||||
#~ "eliminación, ..."
|
||||
|
||||
#~ msgid "DLUO"
|
||||
#~ msgstr "Fecha caducidad"
|
||||
|
||||
#~ msgid "Removal date"
|
||||
#~ msgstr "Fecha eliminación"
|
|
@ -0,0 +1,178 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_expiry
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.1\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-06-30 15:09+0000\n"
|
||||
"PO-Revision-Date: 2010-01-04 18:19+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-05-21 03:45+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,life_time:0
|
||||
msgid "Product lifetime"
|
||||
msgstr "Durée limite de consommation"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_from_product_template
|
||||
msgid "Ham"
|
||||
msgstr "Jambon"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_lait_product_template
|
||||
msgid "Cow milk"
|
||||
msgstr "Lait de vache"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
|
||||
msgid "Products date of expiry"
|
||||
msgstr "Dates de péremption des produits"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid ""
|
||||
"Error: The default UOM and the purchase UOM must be in the same category."
|
||||
msgstr ""
|
||||
"Erreur: l'unité de mesure par défaut et l'unité de mesure d'achat doivent "
|
||||
"faire partie de la même catégorie"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "XML non valide pour l'architecture de la vue"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,life_date:0
|
||||
msgid "The date the lot may become dangerous and should not be consumed."
|
||||
msgstr ""
|
||||
"La date à laquelle le lot peut devenir dangereux et ne doit plus être "
|
||||
"consommé."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,removal_date:0
|
||||
msgid "Removal Date"
|
||||
msgstr "Date de retrait"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,description:product_expiry.module_meta_information
|
||||
msgid ""
|
||||
"Track different dates on products and production lots:\n"
|
||||
" - end of life\n"
|
||||
" - best before date\n"
|
||||
" - removal date\n"
|
||||
" - alert date\n"
|
||||
"Used, for example, in food industries."
|
||||
msgstr ""
|
||||
"Suit les différentes dates des produits et des lots de production\n"
|
||||
" - Date limite de consommation\n"
|
||||
" - DLUO\n"
|
||||
" - Date de retrait\n"
|
||||
" - Date d'alerte\n"
|
||||
"Utilisé par exemple dans les industries alimentaires"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_pain_product_template
|
||||
msgid "Bread"
|
||||
msgstr "Pain"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.uom,name:product_expiry.product_uom_ltr
|
||||
#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
|
||||
msgid "LTR"
|
||||
msgstr "LTR"
|
||||
|
||||
#. module: product_expiry
|
||||
#: view:product.product:0
|
||||
#: view:stock.production.lot:0
|
||||
msgid "Dates"
|
||||
msgstr "Dates"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: UOS must be in a different category than the UOM"
|
||||
msgstr ""
|
||||
"Erreur: l'unité de vente doit appartenir à une catégorie différente que "
|
||||
"l'unité de mesure"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,life_date:0
|
||||
msgid "End of Life Date"
|
||||
msgstr "Date limite de consommation"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,use_date:0
|
||||
msgid "Best before Date"
|
||||
msgstr "Date limite d'utilisation optimale"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,use_date:0
|
||||
msgid "The date the lot starts deteriorating without becoming dangerous."
|
||||
msgstr ""
|
||||
"La date à laquelle le lot commencera à se déteriorer sans devenir dangereux."
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_jambon_product_template
|
||||
msgid "French cheese Camenbert"
|
||||
msgstr "Fromage Camembert Français"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,removal_time:0
|
||||
msgid "The number of days before a production lot should be removed."
|
||||
msgstr ""
|
||||
"Le nombre de jours après lesquels un lot de production doit être retiré."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,use_time:0
|
||||
msgid "Product usetime"
|
||||
msgstr "Durée limite d'utilisation optimale"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,alert_date:0
|
||||
msgid "Alert Date"
|
||||
msgstr "Date d'alerte"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,removal_time:0
|
||||
msgid "Product removal time"
|
||||
msgstr "Durée avant retrait"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,use_time:0
|
||||
msgid ""
|
||||
"The number of days before a production lot starts deteriorating without "
|
||||
"becoming dangerous."
|
||||
msgstr ""
|
||||
"Le nombre de jours après lesquels un lot de production commencera à se "
|
||||
"déteriorer sans devenir dangereux"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.product:0
|
||||
msgid "Error: Invalid ean code"
|
||||
msgstr "Erreur: code EAN invalide"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,life_time:0
|
||||
msgid ""
|
||||
"The number of days before a production lot may become dangerous and should "
|
||||
"not be consumed."
|
||||
msgstr ""
|
||||
"Nombre de jours après lesquels un lot de production peut devenir dangereux "
|
||||
"et ne doit plus être consommé."
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,removal_date:0
|
||||
msgid "The date the lot should be removed."
|
||||
msgstr "La date à laquelle le lot doit être retiré."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,alert_time:0
|
||||
msgid "Product alert time"
|
||||
msgstr "Durée avant alerte"
|
|
@ -0,0 +1,159 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_expiry
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.1\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-06-30 15:09:36+0000\n"
|
||||
"PO-Revision-Date: 2009-06-30 15:09:36+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: product_expiry
|
||||
#: field:product.product,life_time:0
|
||||
msgid "Product lifetime"
|
||||
msgstr "Durée limite de consommation"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_from_product_template
|
||||
msgid "Ham"
|
||||
msgstr "Jambon"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_lait_product_template
|
||||
msgid "Cow milk"
|
||||
msgstr "Lait de vache"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
|
||||
msgid "Products date of expiry"
|
||||
msgstr "Dates de péremption des produits"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: The default UOM and the purchase UOM must be in the same category."
|
||||
msgstr "Erreur: l'unité de mesure par défaut et l'unité de mesure d'achat doivent faire partie de la même catégorie"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "XML non valide pour l'architecture de la vue"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,life_date:0
|
||||
msgid "The date the lot may become dangerous and should not be consumed."
|
||||
msgstr "La date à laquelle le lot peut devenir dangereux et ne doit plus être consommé."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,removal_date:0
|
||||
msgid "Removal Date"
|
||||
msgstr "Date de retrait"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,description:product_expiry.module_meta_information
|
||||
msgid "Track different dates on products and production lots:\n"
|
||||
" - end of life\n"
|
||||
" - best before date\n"
|
||||
" - removal date\n"
|
||||
" - alert date\n"
|
||||
"Used, for example, in food industries."
|
||||
msgstr "Suit les différentes dates des produits et des lots de production\n"
|
||||
" - Date limite de consommation\n"
|
||||
" - DLUO\n"
|
||||
" - Date de retrait\n"
|
||||
" - Date d'alerte\n"
|
||||
"Utilisé par exemple dans les industries alimentaires"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_pain_product_template
|
||||
msgid "Bread"
|
||||
msgstr "Pain"
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.uom,name:product_expiry.product_uom_ltr
|
||||
#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
|
||||
msgid "LTR"
|
||||
msgstr "LTR"
|
||||
|
||||
#. module: product_expiry
|
||||
#: view:product.product:0
|
||||
#: view:stock.production.lot:0
|
||||
msgid "Dates"
|
||||
msgstr "Dates"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: UOS must be in a different category than the UOM"
|
||||
msgstr "Erreur: l'unité de vente doit appartenir à une catégorie différente que l'unité de mesure"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,life_date:0
|
||||
msgid "End of Life Date"
|
||||
msgstr "Date limite de consommation"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,use_date:0
|
||||
msgid "Best before Date"
|
||||
msgstr "Date limite d'utilisation optimale"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,use_date:0
|
||||
msgid "The date the lot starts deteriorating without becoming dangerous."
|
||||
msgstr "La date à laquelle le lot commencera à se déteriorer sans devenir dangereux."
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_jambon_product_template
|
||||
msgid "French cheese Camenbert"
|
||||
msgstr "Fromage Camembert Français"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,removal_time:0
|
||||
msgid "The number of days before a production lot should be removed."
|
||||
msgstr "Le nombre de jours après lesquels un lot de production doit être retiré."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,use_time:0
|
||||
msgid "Product usetime"
|
||||
msgstr "Durée limite d'utilisation optimale"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,alert_date:0
|
||||
msgid "Alert Date"
|
||||
msgstr "Date d'alerte"
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,removal_time:0
|
||||
msgid "Product removal time"
|
||||
msgstr "Durée avant retrait"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,use_time:0
|
||||
msgid "The number of days before a production lot starts deteriorating without becoming dangerous."
|
||||
msgstr "Le nombre de jours après lesquels un lot de production commencera à se déteriorer sans devenir dangereux"
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.product:0
|
||||
msgid "Error: Invalid ean code"
|
||||
msgstr "Erreur: code EAN invalide"
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,life_time:0
|
||||
msgid "The number of days before a production lot may become dangerous and should not be consumed."
|
||||
msgstr "Nombre de jours après lesquels un lot de production peut devenir dangereux et ne doit plus être consommé."
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,removal_date:0
|
||||
msgid "The date the lot should be removed."
|
||||
msgstr "La date à laquelle le lot doit être retiré."
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,alert_time:0
|
||||
msgid "Product alert time"
|
||||
msgstr "Durée avant alerte"
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_expiry
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.1\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-06-30 15:09:08+0000\n"
|
||||
"PO-Revision-Date: 2009-06-30 15:09:08+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: product_expiry
|
||||
#: field:product.product,life_time:0
|
||||
msgid "Product lifetime"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_from_product_template
|
||||
msgid "Ham"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_lait_product_template
|
||||
msgid "Cow milk"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,shortdesc:product_expiry.module_meta_information
|
||||
msgid "Products date of expiry"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: The default UOM and the purchase UOM must be in the same category."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,life_date:0
|
||||
msgid "The date the lot may become dangerous and should not be consumed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,removal_date:0
|
||||
msgid "Removal Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:ir.module.module,description:product_expiry.module_meta_information
|
||||
msgid "Track different dates on products and production lots:\n"
|
||||
" - end of life\n"
|
||||
" - best before date\n"
|
||||
" - removal date\n"
|
||||
" - alert date\n"
|
||||
"Used, for example, in food industries."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_pain_product_template
|
||||
msgid "Bread"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.uom,name:product_expiry.product_uom_ltr
|
||||
#: model:product.uom.categ,name:product_expiry.product_uom_categ_vol
|
||||
msgid "LTR"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: view:product.product:0
|
||||
#: view:stock.production.lot:0
|
||||
msgid "Dates"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.template:0
|
||||
msgid "Error: UOS must be in a different category than the UOM"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,life_date:0
|
||||
msgid "End of Life Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,use_date:0
|
||||
msgid "Best before Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,use_date:0
|
||||
msgid "The date the lot starts deteriorating without becoming dangerous."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: model:product.template,name:product_expiry.product_product_jambon_product_template
|
||||
msgid "French cheese Camenbert"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,removal_time:0
|
||||
msgid "The number of days before a production lot should be removed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,use_time:0
|
||||
msgid "Product usetime"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:stock.production.lot,alert_date:0
|
||||
msgid "Alert Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,removal_time:0
|
||||
msgid "Product removal time"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,use_time:0
|
||||
msgid "The number of days before a production lot starts deteriorating without becoming dangerous."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: constraint:product.product:0
|
||||
msgid "Error: Invalid ean code"
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:product.product,life_time:0
|
||||
msgid "The number of days before a production lot may become dangerous and should not be consumed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: help:stock.production.lot,removal_date:0
|
||||
msgid "The date the lot should be removed."
|
||||
msgstr ""
|
||||
|
||||
#. module: product_expiry
|
||||
#: field:product.product,alert_time:0
|
||||
msgid "Product alert time"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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 datetime
|
||||
from osv import fields, osv
|
||||
import pooler
|
||||
|
||||
class stock_production_lot(osv.osv):
|
||||
_name = 'stock.production.lot'
|
||||
_inherit = 'stock.production.lot'
|
||||
|
||||
def _get_date(dtype):
|
||||
"""Return a function to compute the limit date for this type"""
|
||||
def calc_date(self, cr, uid, context=None):
|
||||
"""Compute the limit date for a given date"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if not context.get('product_id', False):
|
||||
date = False
|
||||
else:
|
||||
product = pooler.get_pool(cr.dbname).get('product.product').browse(
|
||||
cr, uid, context['product_id'])
|
||||
duration = getattr(product, dtype)
|
||||
# set date to False when no expiry time specified on the product
|
||||
date = duration and (datetime.datetime.today()
|
||||
+ datetime.timedelta(days=duration))
|
||||
return date and date.strftime('%Y-%m-%d')
|
||||
return calc_date
|
||||
|
||||
_columns = {
|
||||
'life_date': fields.date('End of Life Date',
|
||||
help='The date the lot may become dangerous and should not be consumed.'),
|
||||
'use_date': fields.date('Best before Date',
|
||||
help='The date the lot starts deteriorating without becoming dangerous.'),
|
||||
'removal_date': fields.date('Removal Date',
|
||||
help='The date the lot should be removed.'),
|
||||
'alert_date': fields.date('Alert Date'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
# 'life_date': _get_date('life_time'),
|
||||
# 'use_date': _get_date('use_time'),
|
||||
# 'removal_date': _get_date('removal_time'),
|
||||
# 'alert_date': _get_date('alert_time'),
|
||||
}
|
||||
stock_production_lot()
|
||||
|
||||
class product_product(osv.osv):
|
||||
_inherit = 'product.product'
|
||||
_name = 'product.product'
|
||||
_columns = {
|
||||
'life_time': fields.integer('Product lifetime',
|
||||
help='The number of days before a production lot may become dangerous and should not be consumed.'),
|
||||
'use_time': fields.integer('Product usetime',
|
||||
help='The number of days before a production lot starts deteriorating without becoming dangerous.'),
|
||||
'removal_time': fields.integer('Product removal time',
|
||||
help='The number of days before a production lot should be removed.'),
|
||||
'alert_time': fields.integer('Product alert time'),
|
||||
}
|
||||
product_product()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="product_uom_categ_vol" model="product.uom.categ">
|
||||
<field name="name">LTR</field>
|
||||
</record>
|
||||
<record id="product_uom_ltr" model="product.uom">
|
||||
<field name="category_id" ref="product_uom_categ_vol"/>
|
||||
<field name="name">LTR</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_jambon" model="product.product">
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="list_price">7.0</field>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uos_id" ref="product.product_uom_kgm" />
|
||||
<field name="uos_coeff">3</field>
|
||||
<field name="name">French cheese Camenbert</field>
|
||||
<field name="life_time">15</field>
|
||||
<field name="use_time">10</field>
|
||||
<field name="removal_time">6</field>
|
||||
<field name="alert_time">5</field>
|
||||
<field name="default_code">JKB</field>
|
||||
<field name="ean13">3307630302014</field>
|
||||
<field name="categ_id" search="[]" model="product.category"/>
|
||||
</record>
|
||||
<record model="product.packaging">
|
||||
<field name="name">box of 10</field>
|
||||
<field name="qty">12</field>
|
||||
<field name="ul" ref="product.product_ul_box" />
|
||||
<field name="ul_qty">6</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="product_id" ref="product_product_jambon" />
|
||||
<field name="ean">12345678901234</field>
|
||||
<field name="weight">10</field>
|
||||
<field name="weight_ul">240</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_from" model="product.product">
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="list_price">8.0</field>
|
||||
<field name="standard_price">6.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uos_id" ref="product.product_uom_kgm" />
|
||||
<field name="uos_coeff">0.5</field>
|
||||
<field name="name">Ham</field>
|
||||
<field name="life_time">30</field>
|
||||
<field name="use_time">25</field>
|
||||
<field name="removal_time">20</field>
|
||||
<field name="alert_time">19</field>
|
||||
<field name="default_code">FKS</field>
|
||||
<field name="ean13">3307631101876</field>
|
||||
<field name="categ_id" search="[]" model="product.category"/>
|
||||
</record>
|
||||
<record model="product.packaging">
|
||||
<field name="name">Box of 5</field>
|
||||
<field name="qty">12</field>
|
||||
<field name="ul" ref="product.product_ul_box" />
|
||||
<field name="ul_qty">6</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="product_id" ref="product_product_from" />
|
||||
<field name="ean">12345678901234</field>
|
||||
<field name="weight">10</field>
|
||||
<field name="weight_ul">240</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_pain" model="product.product">
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="list_price">8.0</field>
|
||||
<field name="standard_price">6.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uos_id" ref="product.product_uom_kgm" />
|
||||
<field name="uos_coeff">0.5</field>
|
||||
<field name="name">Bread</field>
|
||||
<field name="life_time">30</field>
|
||||
<field name="use_time">25</field>
|
||||
<field name="removal_time">20</field>
|
||||
<field name="alert_time">19</field>
|
||||
<field name="default_code">PKB</field>
|
||||
<field name="ean13">3307631102323</field>
|
||||
<field name="categ_id" search="[]" model="product.category"/>
|
||||
</record>
|
||||
<record model="product.packaging">
|
||||
<field name="name">Bag of 2</field>
|
||||
<field name="qty">6</field>
|
||||
<field name="ul" ref="product.product_ul_box" />
|
||||
<field name="ul_qty">6</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="product_id" ref="product_product_pain" />
|
||||
<field name="ean">12345678901234</field>
|
||||
<field name="weight">10</field>
|
||||
<field name="weight_ul">240</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_lait" model="product.product">
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="list_price">8.0</field>
|
||||
<field name="standard_price">6.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uos_id" ref="product_uom_ltr" />
|
||||
<field name="uos_coeff">0.5</field>
|
||||
<field name="name">Cow milk</field>
|
||||
<field name="life_time">30</field>
|
||||
<field name="use_time">25</field>
|
||||
<field name="removal_time">20</field>
|
||||
<field name="alert_time">19</field>
|
||||
<field name="default_code">LEX</field>
|
||||
<field name="ean13">3307630302045</field>
|
||||
<field name="categ_id" search="[]" model="product.category"/>
|
||||
</record>
|
||||
<record model="product.packaging">
|
||||
<field name="name">Boxes of 1 liter</field>
|
||||
<field name="qty">4</field>
|
||||
<field name="ul" ref="product.product_ul_box" />
|
||||
<field name="ul_qty">6</field>
|
||||
<field name="rows">4</field>
|
||||
<field name="product_id" ref="product_product_lait" />
|
||||
<field name="ean">12345678901234</field>
|
||||
<field name="weight">10</field>
|
||||
<field name="weight_ul">240</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_move_form_expiry">
|
||||
<field name="name">stock.production.lot.form</field>
|
||||
<field name="model">stock.production.lot</field>
|
||||
<field name="inherit_id" ref="stock.view_production_lot_form" />
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date" position="after">
|
||||
<separator string="Dates" colspan="4" />
|
||||
<field name="life_date" />
|
||||
<field name="use_date" />
|
||||
<field name="removal_date" />
|
||||
<field name="alert_date" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_product_form_expiry">
|
||||
<field name="name">product.normal.form</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view" />
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Dates">
|
||||
<separator string="Dates" colspan="4" />
|
||||
<field name="life_time" />
|
||||
<field name="use_time" />
|
||||
<field name="removal_time" />
|
||||
<field name="alert_time" />
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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 report_stock
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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 osv import osv, fields
|
||||
from tools.translate import _
|
||||
import tools
|
||||
from tools.sql import drop_view_if_exists
|
||||
|
||||
class stock_report_prodlots(osv.osv):
|
||||
_name = "stock.report.prodlots1"
|
||||
_description = "Stock report by production lots"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.float('Quantity', readonly=True),
|
||||
'location_id': fields.many2one('stock.location', 'Location', readonly=True, select=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True, select=True),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Production lot', readonly=True, select=True),
|
||||
'life_date': fields.date('End of Life Date',
|
||||
help='The date the lot may become dangerous and should not be consumed.'),
|
||||
'use_date': fields.date('Best before Date',
|
||||
help='The date the lot starts deteriorating without becoming dangerous.'),
|
||||
'removal_date': fields.date('Removal Date',
|
||||
help='The date the lot should be removed.'),
|
||||
'alert_date': fields.date('Alert Date'),
|
||||
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
drop_view_if_exists(cr, 'stock_report_prodlots1')
|
||||
cr.execute("""
|
||||
create or replace view stock_report_prodlots1 as (
|
||||
select max(id) as id,
|
||||
location_id,
|
||||
product_id,
|
||||
prodlot_id,
|
||||
life_date,
|
||||
use_date,
|
||||
removal_date,
|
||||
alert_date,
|
||||
sum(qty) as name
|
||||
from (
|
||||
select -max(sm.id) as id,
|
||||
sm.location_id,
|
||||
sm.product_id,
|
||||
sm.prodlot_id,
|
||||
spl.life_date,
|
||||
spl.use_date,
|
||||
spl.removal_date,
|
||||
spl.alert_date,
|
||||
-sum(sm.product_qty /uo.factor) as qty
|
||||
from stock_move as sm
|
||||
left join stock_location sl
|
||||
on (sl.id = sm.location_id)
|
||||
left join stock_production_lot spl
|
||||
on (sm.prodlot_id=spl.id)
|
||||
left join product_uom uo
|
||||
on (uo.id=sm.product_uom)
|
||||
where state = 'done'
|
||||
group by sm.location_id, sm.product_id, sm.product_uom, sm.prodlot_id,
|
||||
spl.life_date,
|
||||
spl.use_date,
|
||||
spl.removal_date,
|
||||
spl.alert_date
|
||||
|
||||
union all
|
||||
select max(sm.id) as id,
|
||||
sm.location_dest_id as location_id,
|
||||
sm.product_id,
|
||||
sm.prodlot_id,
|
||||
spl.life_date,
|
||||
spl.use_date,
|
||||
spl.removal_date,
|
||||
spl.alert_date,
|
||||
sum(sm.product_qty /uo.factor) as qty
|
||||
from stock_move as sm
|
||||
left join stock_location sl
|
||||
on (sl.id = sm.location_dest_id)
|
||||
left join stock_production_lot spl
|
||||
on (sm.prodlot_id=spl.id)
|
||||
left join product_uom uo
|
||||
on (uo.id=sm.product_uom)
|
||||
where sm.state = 'done'
|
||||
group by sm.location_dest_id, sm.product_id, sm.product_uom, sm.prodlot_id,
|
||||
spl.life_date,
|
||||
spl.use_date,
|
||||
spl.removal_date,
|
||||
spl.alert_date
|
||||
|
||||
) as report
|
||||
group by location_id, product_id, prodlot_id,
|
||||
life_date,
|
||||
use_date,
|
||||
removal_date,
|
||||
alert_date
|
||||
)""")
|
||||
|
||||
def unlink(self, cr, uid, ids, context={}):
|
||||
raise osv.except_osv(_('Error !'), _('You cannot delete any record!'))
|
||||
|
||||
|
||||
stock_report_prodlots()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_stock_report_prodlots_filter" model="ir.ui.view">
|
||||
<field name="name">stock.report.prodlots.filter</field>
|
||||
<field name="model">stock.report.prodlots1</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Location">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-go-home" name="internal_locations" string="Internal Locations" domain="[('location_id.usage', '=', 'internal')]" help="Internal Locations"/>
|
||||
<filter icon="terp-go-home" string="Customer Locations" domain="[('location_id.usage', '=', 'customer')]" help="Customer Locations" />
|
||||
<filter icon="terp-go-home" string="Supplier Locations" domain="[('location_id.usage', '=', 'supplier')]" help="Supplier Locations" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="location_id"/>
|
||||
<field name="product_id"/>
|
||||
<newline/>
|
||||
<field name="use_date" />
|
||||
<field name="life_date" string="End of Life" />
|
||||
<field name="alert_date" />
|
||||
<field name="removal_date" string="Removal D." />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Location" icon="terp-go-home" domain="[]" context="{'group_by':'location_id'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="stock_report_prodlots_form" model="ir.ui.view">
|
||||
<field name="name">stock.report.prodlots.view</field>
|
||||
<field name="model">stock.report.prodlots1</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stock by Lots">
|
||||
<field name="location_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="prodlot_id" groups="base.group_extended"/>
|
||||
<field name="name"/>
|
||||
<field name="use_date" />
|
||||
<field name="life_date" string="End of Life" />
|
||||
<field name="alert_date" />
|
||||
<field name="removal_date" string="Removal D." />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_report_prodlots_tree" model="ir.ui.view">
|
||||
<field name="name">stock.report.prodlots.view</field>
|
||||
<field name="model">stock.report.prodlots1</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stock by Lots">
|
||||
<field name="location_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="prodlot_id" groups="base.group_extended"/>
|
||||
<field name="name"/>
|
||||
<field name="use_date" />
|
||||
<field name="life_date" string="End of Life" />
|
||||
<field name="alert_date" />
|
||||
<field name="removal_date" string="Removal D." />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_report_prodlots_graph" model="ir.ui.view">
|
||||
<field name="name">stock.report.prodlots.view</field>
|
||||
<field name="model">stock.report.prodlots1</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Stock by Lots" type="bar">
|
||||
<field name="product_id"/>
|
||||
<field name="name"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="stock.action_stock_report_prodlots_form" model="ir.actions.act_window">
|
||||
<field name="name">Inventory by Location</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.report.prodlots1</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'full':'1','search_default_internal_locations':1}</field>
|
||||
<field name="search_view_id" ref="view_stock_report_prodlots_filter" />
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
domain="[('product_id','=',active_id)]"
|
||||
id="stock.act_product_product_2_stock_report_prodlots"
|
||||
name="Stock by Lots"
|
||||
res_model="stock.report.prodlots1"
|
||||
src_model="product.product"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1 @@
|
|||
import stock_partial
|
|
@ -0,0 +1,64 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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 osv import fields, osv
|
||||
from service import web_services
|
||||
from tools.misc import UpdateableStr, UpdateableDict
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
import pooler
|
||||
import time
|
||||
import datetime
|
||||
import wizard
|
||||
|
||||
class stock_partial_lot_picking(osv.osv_memory):
|
||||
_inherit = "stock.partial.picking"
|
||||
_name = "stock.partial.picking"
|
||||
_description = "Partial Picking"
|
||||
|
||||
def do_partial(self, cr, uid, ids, context):
|
||||
res = super(stock_partial_lot_picking, self).do_partial(cr, uid, ids, context=context)
|
||||
prodlot_obj = self.pool.get('stock.production.lot')
|
||||
pick_obj = self.pool.get('stock.picking')
|
||||
picking_ids = context.get('active_ids', False)
|
||||
partial = self.browse(cr, uid, ids[0], context)
|
||||
for pick in pick_obj.browse(cr, uid, picking_ids):
|
||||
for m in pick.move_lines:
|
||||
for pick in pick_obj.browse(cr, uid, picking_ids):
|
||||
for m in pick.move_lines:
|
||||
res = {}
|
||||
if (pick.type == 'in') and m.prodlot_id:
|
||||
if not m.prodlot_id.life_date:
|
||||
date_life = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.life_time))
|
||||
res['life_date'] = date_life.strftime('%Y-%m-%d')
|
||||
if not m.prodlot_id.use_date:
|
||||
date_use = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.use_time))
|
||||
res['use_date'] = date_use.strftime('%Y-%m-%d')
|
||||
if not m.prodlot_id.removal_date:
|
||||
date_removal = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.removal_time))
|
||||
res['removal_date'] = date_removal.strftime('%Y-%m-%d')
|
||||
if not m.prodlot_id.alert_date:
|
||||
date_alert = (datetime.datetime.strptime(partial.date, '%Y-%m-%d %H:%M:%S') + datetime.timedelta(days=m.product_id.alert_time))
|
||||
res['alert_date'] = date_alert.strftime('%Y-%m-%d')
|
||||
prodlot_obj.write(cr, uid, [m.prodlot_id.id], res)
|
||||
return res
|
||||
stock_partial_lot_picking()
|
||||
|
Loading…
Reference in New Issue