[IMP] stock_quant_manual_assign: Delete picking operations to confirm the wizard of "quants Manual" and check availability.

This commit is contained in:
alfredo
2015-06-24 09:00:53 +02:00
committed by Tony Gu
parent 60b9c7aa72
commit b26b66424b
13 changed files with 745 additions and 117 deletions

View File

@@ -1,20 +1,6 @@
# -*- encoding: utf-8 -*-
# -*- 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/.
#
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import models
from . import wizard

View File

@@ -1,27 +1,12 @@
# -*- 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 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/.
#
##############################################################################
# -*- coding: utf-8 -*-
# (c) 2015 Mikel Arregi - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Stock - Manual assignment of quants",
"version": "1.0",
"depends": [
"stock",
],
"version": "8.0.1.0.0",
"category": "Warehouse Management",
"license": "AGPL-3",
"author": "OdooMRP team,"
"AvanzOSC,"
"Serv. Tecnol. Avanzados - Pedro M. Baeza",
@@ -31,7 +16,9 @@
"Pedro Manuel Baeza Romero <pedro.baeza@serviciosbaeza.com>"
"Mikel Arregi <mikelarregi@avanzosc.es>",
],
"category": "Warehouse Management",
"depends": [
"stock",
],
"data": [
"wizard/assign_manual_quants_view.xml",
"views/stock_move_view.xml",

View File

@@ -0,0 +1,127 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quant_manual_assign
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:45+0000\n"
"PO-Revision-Date: 2015-10-09 10:50+0000\n"
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/odoomrp-wip-8-0/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Cancel"
msgstr "Cancelar"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Confirm"
msgstr "Confirmar"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_uid:0
#: field:assign.manual.quants.lines,create_uid:0
msgid "Created by"
msgstr "Creado por"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_date:0
#: field:assign.manual.quants.lines,create_date:0
msgid "Created on"
msgstr "Creado el"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:25
#, python-format
msgid "Error"
msgstr "Error"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,id:0
#: field:assign.manual.quants.lines,id:0
msgid "ID"
msgstr "ID"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_uid:0
#: field:assign.manual.quants.lines,write_uid:0
msgid "Last Updated by"
msgstr "Última actualización por"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_date:0
#: field:assign.manual.quants.lines,write_date:0
msgid "Last Updated on"
msgstr "Última actualización el"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_picking_form_view
msgid "Manual Quants"
msgstr "Quants manuales"
#. module: stock_quant_manual_assign
#: model:ir.actions.act_window,name:stock_quant_manual_assign.assign_manual_quants_action
msgid "Manual quants"
msgstr "Quants manuales"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,assign_wizard:0
msgid "Move"
msgstr "Mover"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,name:0
msgid "Name"
msgstr "Nombre"
#. module: stock_quant_manual_assign
#: model:ir.model,name:stock_quant_manual_assign.model_stock_picking
msgid "Picking List"
msgstr "Albarán"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,qty:0
msgid "QTY"
msgstr "Ctd."
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,quant:0
msgid "Quant"
msgstr "Quant"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:26
#, python-format
msgid "Quantity is higher than the needed one"
msgstr "La cantidad es mayor que la requerida"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,quants_lines:0
msgid "Quants"
msgstr "Quants"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,selected:0
msgid "Select"
msgstr "Seleccionar"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "or"
msgstr "o"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "qty"
msgstr "ctd."

View File

@@ -0,0 +1,126 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quant_manual_assign
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:45+0000\n"
"PO-Revision-Date: 2015-09-10 16:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: French (http://www.transifex.com/oca/odoomrp-wip-8-0/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Cancel"
msgstr "Annuler"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Confirm"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_uid:0
#: field:assign.manual.quants.lines,create_uid:0
msgid "Created by"
msgstr "Créé par"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_date:0
#: field:assign.manual.quants.lines,create_date:0
msgid "Created on"
msgstr "Créé le"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:25
#, python-format
msgid "Error"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,id:0 field:assign.manual.quants.lines,id:0
msgid "ID"
msgstr "Id."
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_uid:0
#: field:assign.manual.quants.lines,write_uid:0
msgid "Last Updated by"
msgstr "Mis à jour par"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_date:0
#: field:assign.manual.quants.lines,write_date:0
msgid "Last Updated on"
msgstr "Mis à jour le"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_picking_form_view
msgid "Manual Quants"
msgstr ""
#. module: stock_quant_manual_assign
#: model:ir.actions.act_window,name:stock_quant_manual_assign.assign_manual_quants_action
msgid "Manual quants"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,assign_wizard:0
msgid "Move"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,name:0
msgid "Name"
msgstr ""
#. module: stock_quant_manual_assign
#: model:ir.model,name:stock_quant_manual_assign.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,qty:0
msgid "QTY"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,quant:0
msgid "Quant"
msgstr ""
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:26
#, python-format
msgid "Quantity is higher than the needed one"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,quants_lines:0
msgid "Quants"
msgstr "Quants"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,selected:0
msgid "Select"
msgstr ""
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "or"
msgstr "ou"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "qty"
msgstr ""

View File

@@ -0,0 +1,127 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quant_manual_assign
#
# Translators:
# danimaribeiro <danimaribeiro@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:45+0000\n"
"PO-Revision-Date: 2015-10-09 03:20+0000\n"
"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-wip-8-0/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Cancel"
msgstr "Cancelar"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Confirm"
msgstr "Confirmar"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_uid:0
#: field:assign.manual.quants.lines,create_uid:0
msgid "Created by"
msgstr "Criado por"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_date:0
#: field:assign.manual.quants.lines,create_date:0
msgid "Created on"
msgstr "Criado em"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:25
#, python-format
msgid "Error"
msgstr "Erro"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,id:0 field:assign.manual.quants.lines,id:0
msgid "ID"
msgstr "ID"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_uid:0
#: field:assign.manual.quants.lines,write_uid:0
msgid "Last Updated by"
msgstr "Última atualização por"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_date:0
#: field:assign.manual.quants.lines,write_date:0
msgid "Last Updated on"
msgstr "Última atualização em"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_picking_form_view
msgid "Manual Quants"
msgstr ""
#. module: stock_quant_manual_assign
#: model:ir.actions.act_window,name:stock_quant_manual_assign.assign_manual_quants_action
msgid "Manual quants"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,assign_wizard:0
msgid "Move"
msgstr "Movimentações"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,name:0
msgid "Name"
msgstr "Nome"
#. module: stock_quant_manual_assign
#: model:ir.model,name:stock_quant_manual_assign.model_stock_picking
msgid "Picking List"
msgstr "Lista de separação"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,qty:0
msgid "QTY"
msgstr "QTD"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,quant:0
msgid "Quant"
msgstr "Quant"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:26
#, python-format
msgid "Quantity is higher than the needed one"
msgstr "Quantidade é maior que o necessário"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,quants_lines:0
msgid "Quants"
msgstr "Quants"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,selected:0
msgid "Select"
msgstr "Selecione"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "or"
msgstr "ou"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "qty"
msgstr "qtd"

View File

@@ -0,0 +1,127 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quant_manual_assign
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
msgid ""
msgstr ""
"Project-Id-Version: odoomrp-wip (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-07 10:45+0000\n"
"PO-Revision-Date: 2015-09-20 19:06+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-wip-8-0/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Cancel"
msgstr "Preklic"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Confirm"
msgstr "Potrdi"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_uid:0
#: field:assign.manual.quants.lines,create_uid:0
msgid "Created by"
msgstr "Ustvaril"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_date:0
#: field:assign.manual.quants.lines,create_date:0
msgid "Created on"
msgstr "Ustvarjeno"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:25
#, python-format
msgid "Error"
msgstr "Napaka"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,id:0 field:assign.manual.quants.lines,id:0
msgid "ID"
msgstr "ID"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_uid:0
#: field:assign.manual.quants.lines,write_uid:0
msgid "Last Updated by"
msgstr "Zadnji posodobil"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_date:0
#: field:assign.manual.quants.lines,write_date:0
msgid "Last Updated on"
msgstr "Zadnjič posodobljeno"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_picking_form_view
msgid "Manual Quants"
msgstr "Ročni kvanti"
#. module: stock_quant_manual_assign
#: model:ir.actions.act_window,name:stock_quant_manual_assign.assign_manual_quants_action
msgid "Manual quants"
msgstr "Ročni kvanti"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,assign_wizard:0
msgid "Move"
msgstr "Premik"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,name:0
msgid "Name"
msgstr "Naziv"
#. module: stock_quant_manual_assign
#: model:ir.model,name:stock_quant_manual_assign.model_stock_picking
msgid "Picking List"
msgstr "Zbirnik"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,qty:0
msgid "QTY"
msgstr "KOL"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,quant:0
msgid "Quant"
msgstr "Kvant"
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:26
#, python-format
msgid "Quantity is higher than the needed one"
msgstr "Količina je višja od potrebne"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,quants_lines:0
msgid "Quants"
msgstr "Kvant"
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,selected:0
msgid "Select"
msgstr "Izbira"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "or"
msgstr "ali"
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "qty"
msgstr "kol"

View File

@@ -0,0 +1,128 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_quant_manual_assign
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-01 12:46+0000\n"
"PO-Revision-Date: 2015-10-01 12:46+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_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Cancel"
msgstr ""
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "Confirm"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_uid:0
#: field:assign.manual.quants.lines,create_uid:0
msgid "Created by"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,create_date:0
#: field:assign.manual.quants.lines,create_date:0
msgid "Created on"
msgstr ""
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:21
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:24
#, python-format
msgid "Error"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,id:0
#: field:assign.manual.quants.lines,id:0
msgid "ID"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_uid:0
#: field:assign.manual.quants.lines,write_uid:0
msgid "Last Updated by"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,write_date:0
#: field:assign.manual.quants.lines,write_date:0
msgid "Last Updated on"
msgstr ""
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_form_view
#: view:stock.move:stock_quant_manual_assign.stock_move_manual_quants_picking_form_view
msgid "Manual Quants"
msgstr ""
#. module: stock_quant_manual_assign
#: model:ir.actions.act_window,name:stock_quant_manual_assign.assign_manual_quants_action
msgid "Manual quants"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,assign_wizard:0
msgid "Move"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,name:0
msgid "Name"
msgstr ""
#. module: stock_quant_manual_assign
#: model:ir.model,name:stock_quant_manual_assign.model_stock_picking
msgid "Picking List"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,qty:0
msgid "QTY"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,quant:0
msgid "Quant"
msgstr ""
#. module: stock_quant_manual_assign
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:22
#: code:addons/stock_quant_manual_assign/wizard/assign_manual_quants.py:24
#, python-format
msgid "Quantity is higher than the needed one"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants,quants_lines:0
msgid "Quants"
msgstr ""
#. module: stock_quant_manual_assign
#: field:assign.manual.quants.lines,selected:0
msgid "Select"
msgstr ""
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "or"
msgstr ""
#. module: stock_quant_manual_assign
#: view:assign.manual.quants:stock_quant_manual_assign.assign_manual_quants_form_view
msgid "qty"
msgstr ""

View File

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

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# (c) 2015 Mikel Arregi - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import api, fields, models
class StockPicking(models.Model):
_inherit = 'stock.picking'
@api.multi
def action_assign(self):
self.mapped('pack_operation_ids').unlink()
return super(StockPicking, self).action_assign()
class StockMove(models.Model):
_inherit = 'stock.move'
picking_type_code = fields.Selection(
related='picking_type_id.code', store=True)

View File

@@ -7,19 +7,29 @@
<field name="inherit_id" ref="stock.view_move_form" />
<field name="arch" type="xml">
<button name="action_done" position="after">
<button name="%(assign_manual_quants_action)d" states="confirmed,assigned" string="Manual Quants" type="action" class="oe_highlight"/>
<button name="%(assign_manual_quants_action)d" type="action"
string="Manual Quants" class="oe_highlight"
attrs="{'invisible':['|',('picking_type_code','=','incoming'),('state','not in',('confirmed','assigned'))]}"/>
</button>
<field name="picking_type_id" position="after">
<field name="picking_type_code" invisible="1" />
</field>
</field>
</record>
<record model="ir.ui.view" id="stock_move_manual_quants_picking_form_view">
<field name="name">stock.move.form</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_picking_form" />
<field name="arch" type="xml">
<button name="force_assign" position="after">
<button name="%(assign_manual_quants_action)d" states="confirmed,assigned" string="Manual Quants" type="action" class="oe_highlight"/>
<button name="%(assign_manual_quants_action)d" type="action"
string="Manual Quants" class="oe_highlight"
attrs="{'invisible':['|',('picking_type_code','=','incoming'),('state','not in',('confirmed','assigned'))]}" />
</button>
<field name="picking_type_id" position="after">
<field name="picking_type_code" invisible="1" />
</field>
</field>
</record>
</data>

View File

@@ -1,20 +1,5 @@
# -*- encoding: utf-8 -*-
# -*- 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/.
#
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import assign_manual_quants

View File

@@ -1,59 +1,48 @@
# -*- coding: utf-8 -*-
# (c) 2015 Mikel Arregi - AvanzOSC
# (c) 2015 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
# -*- 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 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 import fields, models, api, exceptions, _
from openerp import api, exceptions, fields, models, _
import openerp.addons.decimal_precision as dp
class AssignManualQuants(models.TransientModel):
_name = 'assign.manual.quants'
@api.depends('quants_lines')
def lines_qty(self):
total_qty = 0
for line in self.quants_lines:
if line.selected:
total_qty += line.qty
return total_qty
self.lines_qty = sum(self.quants_lines.mapped('qty'))
@api.one
@api.multi
@api.constrains('quants_lines')
def check_qty(self):
if self.quants_lines:
total_qty = self.lines_qty()
move = self.env['stock.move'].browse(self.env.context['active_id'])
if total_qty > move.product_uom_qty:
raise exceptions.Warning(_('Error'),
_('Quantity is higher'
' than the needed one'))
for record in self:
if record.quants_lines:
move = self.env['stock.move'].browse(
self.env.context['active_id'])
if record.lines_qty > move.product_uom_qty:
raise exceptions.Warning(
_('Quantity is higher than the needed one'))
@api.depends('quants_lines')
def get_move_qty(self):
move = self.env['stock.move'].browse(self.env.context['active_id'])
self.move_qty = move.product_uom_qty - self.lines_qty()
self.move_qty = move.product_uom_qty - self.lines_qty
name = fields.Char(string='Name')
move_qty = fields.Float(string="Remaining qty", compute="get_move_qty")
lines_qty = fields.Float(
string='Reserved qty', compute='lines_qty',
digits=dp.get_precision('Product Unit of Measure'))
move_qty = fields.Float(string='Remaining qty', compute='get_move_qty',
digits=dp.get_precision('Product Unit of Measure'))
quants_lines = fields.One2many('assign.manual.quants.lines',
'assign_wizard', string='Quants')
@api.multi
def assign_quants(self):
move = self.env['stock.move'].browse(self.env.context['active_id'])
move.picking_id.mapped('pack_operation_ids').unlink()
quants = []
for quant_id in move.reserved_quant_ids.ids:
move.write({'reserved_quant_ids': [[3, quant_id]]})
@@ -66,41 +55,49 @@ class AssignManualQuants(models.TransientModel):
@api.model
def default_get(self, var_fields):
super(AssignManualQuants, self).default_get(var_fields)
move = self.env['stock.move'].browse(self.env.context['active_id'])
available_quants_ids = self.env['stock.quant'].search(
available_quants = self.env['stock.quant'].search(
['|', ('location_id', '=', move.location_id.id),
('location_id', 'in', move.location_id.child_ids.ids),
('product_id', '=', move.product_id.id),
('qty', '>', 0),
('reservation_id', '=', False)])
available_quants = [{'quant': x.id} for x in available_quants_ids]
available_quants.extend(
{'quant': x.id,
'selected': True,
'qty': x.qty
} for x in move.reserved_quant_ids)
return {'quants_lines': available_quants}
'|', ('reservation_id', '=', False),
('reservation_id', '=', move.id)])
quants_lines = [{
'quant': x.id,
'selected': x in move.reserved_quant_ids,
'qty': x.qty if x in move.reserved_quant_ids else 0,
'location_id': x.location_id.id,
} for x in available_quants]
return {'quants_lines': quants_lines}
class AssignManualQuantsLines(models.TransientModel):
_name = 'assign.manual.quants.lines'
_rec_name = 'quant'
@api.multi
@api.onchange('selected')
def onchange_selected(self):
if not self.selected:
self.qty = False
if self.selected and self.qty == 0:
quant_qty = self.quant.qty
remaining_qty = self.assign_wizard.move_qty
if quant_qty < remaining_qty:
self.qty = quant_qty
else:
self.qty = remaining_qty
for record in self:
if not record.selected:
record.qty = False
elif not record.qty:
quant_qty = record.quant.qty
remaining_qty = record.assign_wizard.move_qty
record.qty = (quant_qty if quant_qty < remaining_qty else
remaining_qty)
assign_wizard = fields.Many2one('assign.manual.quants', string='Move',
required=True, ondelete="cascade")
quant = fields.Many2one('stock.quant', string="Quant", required=True,
ondelete='cascade')
qty = fields.Float(string='QTY')
selected = fields.Boolean(string="Select")
assign_wizard = fields.Many2one(
comodel_name='assign.manual.quants', string='Move', required=True,
ondelete='cascade')
quant = fields.Many2one(
comodel_name='stock.quant', string='Quant', required=True,
ondelete='cascade')
location_id = fields.Many2one(
comodel_name='stock.location', string='Location',
related='quant.location_id', readonly=True)
qty = fields.Float(
string='QTY', digits=dp.get_precision('Product Unit of Measure'))
selected = fields.Boolean(string='Select')

View File

@@ -10,11 +10,13 @@
<field name='quants_lines' colspan="4">
<tree editable="top" delete="0" create="0">
<field name="quant" />
<field name="location_id" />
<field name="selected" />
<field name="qty" attrs="{'readonly':[('selected', '=' ,False)]}" sum="qty"/>
</tree>
<form>
<field name="quant" />
<field name="location_id" />
<field name="selected" />
<field name="qty"/>
</form>