diff --git a/stock_change_qty_reason/README.rst b/stock_change_qty_reason/README.rst index 74fb7a436..604e892a0 100644 --- a/stock_change_qty_reason/README.rst +++ b/stock_change_qty_reason/README.rst @@ -1,35 +1,47 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +============================ Stock Change Quantity Reason ============================ This module extends the product stock management and allows to set a reason in the wizard when changing the product quantity. -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. +Installation +============ +To install this module, simply click on the installation button Usage ===== .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/167/8.0 + :target: https://runbot.odoo-community.org/runbot/153/10.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. Credits ======= +Images +------ + +* Odoo Community Association: `Icon `_. + Contributors ------------ * Denis Roussel +* Meyomesse Gilles Maintainer ---------- diff --git a/stock_change_qty_reason/__init__.py b/stock_change_qty_reason/__init__.py index 408a6001b..2eb723313 100644 --- a/stock_change_qty_reason/__init__.py +++ b/stock_change_qty_reason/__init__.py @@ -1,3 +1,5 @@ # -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import models from . import wizard diff --git a/stock_change_qty_reason/__openerp__.py b/stock_change_qty_reason/__manifest__.py similarity index 69% rename from stock_change_qty_reason/__openerp__.py rename to stock_change_qty_reason/__manifest__.py index b3447b4f4..fb13405d0 100644 --- a/stock_change_qty_reason/__openerp__.py +++ b/stock_change_qty_reason/__manifest__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# © 2016 ACSONE SA/NV () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2016-2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': "Stock Change Quantity Reason", 'summary': """ @@ -8,7 +8,7 @@ 'author': 'ACSONE SA/NV, Odoo Community Association (OCA)', 'website': "http://acsone.eu", 'category': 'Warehouse Management', - 'version': '8.0.1.0.0', + 'version': '10.0.1.0.0', 'license': 'AGPL-3', 'depends': [ 'stock', @@ -16,4 +16,5 @@ 'data': [ 'wizard/stock_product_change_qty.xml' ], + 'installable': True, } diff --git a/stock_change_qty_reason/i18n/ar.po b/stock_change_qty_reason/i18n/ar.po index a8ebcbbdc..36a4d0533 100644 --- a/stock_change_qty_reason/i18n/ar.po +++ b/stock_change_qty_reason/i18n/ar.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/bs.po b/stock_change_qty_reason/i18n/bs.po index 25101b207..097f68368 100644 --- a/stock_change_qty_reason/i18n/bs.po +++ b/stock_change_qty_reason/i18n/bs.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Bosnian (https://www.transifex.com/oca/teams/23907/bs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/ca.po b/stock_change_qty_reason/i18n/ca.po index 63aa290d6..1eec347d5 100644 --- a/stock_change_qty_reason/i18n/ca.po +++ b/stock_change_qty_reason/i18n/ca.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/cs.po b/stock_change_qty_reason/i18n/cs.po index 94986cc31..6fcd94878 100644 --- a/stock_change_qty_reason/i18n/cs.po +++ b/stock_change_qty_reason/i18n/cs.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Czech (https://www.transifex.com/oca/teams/23907/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/de.po b/stock_change_qty_reason/i18n/de.po index 9785e9b71..6b3da55e7 100644 --- a/stock_change_qty_reason/i18n/de.po +++ b/stock_change_qty_reason/i18n/de.po @@ -3,11 +3,11 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 # Rudolf Schnapka , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-03-29 09:21+0000\n" "PO-Revision-Date: 2017-03-29 09:21+0000\n" diff --git a/stock_change_qty_reason/i18n/en_GB.po b/stock_change_qty_reason/i18n/en_GB.po index f186934e9..cdac40d93 100644 --- a/stock_change_qty_reason/i18n/en_GB.po +++ b/stock_change_qty_reason/i18n/en_GB.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: English (United Kingdom) (https://www.transifex.com/oca/teams/23907/en_GB/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/es.po b/stock_change_qty_reason/i18n/es.po index 8ec1a2a02..c3bcb285e 100644 --- a/stock_change_qty_reason/i18n/es.po +++ b/stock_change_qty_reason/i18n/es.po @@ -3,15 +3,15 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 -# Pedro M. Baeza , 2016 +# OCA Transbot , 2017 +# Pedro M. Baeza , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-12-23 02:05+0000\n" "PO-Revision-Date: 2016-12-23 02:05+0000\n" -"Last-Translator: Pedro M. Baeza , 2016\n" +"Last-Translator: Pedro M. Baeza , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/es_CR.po b/stock_change_qty_reason/i18n/es_CR.po index aee32bc0f..9e1b64343 100644 --- a/stock_change_qty_reason/i18n/es_CR.po +++ b/stock_change_qty_reason/i18n/es_CR.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (Costa Rica) (https://www.transifex.com/oca/teams/23907/es_CR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/es_EC.po b/stock_change_qty_reason/i18n/es_EC.po index b7b78b4fb..d7e6c6319 100644 --- a/stock_change_qty_reason/i18n/es_EC.po +++ b/stock_change_qty_reason/i18n/es_EC.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (Ecuador) (https://www.transifex.com/oca/teams/23907/es_EC/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/es_MX.po b/stock_change_qty_reason/i18n/es_MX.po index 988fd90c8..03d715ac8 100644 --- a/stock_change_qty_reason/i18n/es_MX.po +++ b/stock_change_qty_reason/i18n/es_MX.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/es_VE.po b/stock_change_qty_reason/i18n/es_VE.po index 951f5eccc..d8b783041 100644 --- a/stock_change_qty_reason/i18n/es_VE.po +++ b/stock_change_qty_reason/i18n/es_VE.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (Venezuela) (https://www.transifex.com/oca/teams/23907/es_VE/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/et.po b/stock_change_qty_reason/i18n/et.po index b26a40818..56a1433be 100644 --- a/stock_change_qty_reason/i18n/et.po +++ b/stock_change_qty_reason/i18n/et.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Estonian (https://www.transifex.com/oca/teams/23907/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/fi.po b/stock_change_qty_reason/i18n/fi.po index 845bbeb62..c13b18677 100644 --- a/stock_change_qty_reason/i18n/fi.po +++ b/stock_change_qty_reason/i18n/fi.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/fr.po b/stock_change_qty_reason/i18n/fr.po index 3fb36ca1a..426bb7137 100644 --- a/stock_change_qty_reason/i18n/fr.po +++ b/stock_change_qty_reason/i18n/fr.po @@ -3,11 +3,11 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 # Christophe CHAUVET , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-03-04 08:31+0000\n" "PO-Revision-Date: 2017-03-04 08:31+0000\n" diff --git a/stock_change_qty_reason/i18n/hr.po b/stock_change_qty_reason/i18n/hr.po index e708303af..6e7ddd8ae 100644 --- a/stock_change_qty_reason/i18n/hr.po +++ b/stock_change_qty_reason/i18n/hr.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# Ana-Maria Olujić , 2016 +# Ana-Maria Olujić , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: Ana-Maria Olujić , 2016\n" +"Last-Translator: Ana-Maria Olujić , 2017\n" "Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/hu.po b/stock_change_qty_reason/i18n/hu.po index 970549593..17fa516ea 100644 --- a/stock_change_qty_reason/i18n/hu.po +++ b/stock_change_qty_reason/i18n/hu.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/it.po b/stock_change_qty_reason/i18n/it.po index 49e39d2e1..18150dc15 100644 --- a/stock_change_qty_reason/i18n/it.po +++ b/stock_change_qty_reason/i18n/it.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# Paolo Valier , 2016 +# Paolo Valier , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: Paolo Valier , 2016\n" +"Last-Translator: Paolo Valier , 2017\n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/ja.po b/stock_change_qty_reason/i18n/ja.po index 15abfd608..2d851a37f 100644 --- a/stock_change_qty_reason/i18n/ja.po +++ b/stock_change_qty_reason/i18n/ja.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Japanese (https://www.transifex.com/oca/teams/23907/ja/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/lt.po b/stock_change_qty_reason/i18n/lt.po index 8791cc7cb..962d5db31 100644 --- a/stock_change_qty_reason/i18n/lt.po +++ b/stock_change_qty_reason/i18n/lt.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/mk.po b/stock_change_qty_reason/i18n/mk.po index 1340958c4..6183b6474 100644 --- a/stock_change_qty_reason/i18n/mk.po +++ b/stock_change_qty_reason/i18n/mk.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Macedonian (https://www.transifex.com/oca/teams/23907/mk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/mn.po b/stock_change_qty_reason/i18n/mn.po index 52de322e4..de3929bb1 100644 --- a/stock_change_qty_reason/i18n/mn.po +++ b/stock_change_qty_reason/i18n/mn.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Mongolian (https://www.transifex.com/oca/teams/23907/mn/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/nb.po b/stock_change_qty_reason/i18n/nb.po index bd471f1de..cff69119b 100644 --- a/stock_change_qty_reason/i18n/nb.po +++ b/stock_change_qty_reason/i18n/nb.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Norwegian Bokmål (https://www.transifex.com/oca/teams/23907/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/nl.po b/stock_change_qty_reason/i18n/nl.po index d68004198..cfdc65e71 100644 --- a/stock_change_qty_reason/i18n/nl.po +++ b/stock_change_qty_reason/i18n/nl.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/nl_BE.po b/stock_change_qty_reason/i18n/nl_BE.po index 7ee66ba9d..e10e1e71e 100644 --- a/stock_change_qty_reason/i18n/nl_BE.po +++ b/stock_change_qty_reason/i18n/nl_BE.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Dutch (Belgium) (https://www.transifex.com/oca/teams/23907/nl_BE/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/pl.po b/stock_change_qty_reason/i18n/pl.po index dff838930..8dfc4cfa7 100644 --- a/stock_change_qty_reason/i18n/pl.po +++ b/stock_change_qty_reason/i18n/pl.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Polish (https://www.transifex.com/oca/teams/23907/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/pt.po b/stock_change_qty_reason/i18n/pt.po index 5f5e7db4d..0a99866f6 100644 --- a/stock_change_qty_reason/i18n/pt.po +++ b/stock_change_qty_reason/i18n/pt.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/pt_BR.po b/stock_change_qty_reason/i18n/pt_BR.po index 40b24bd50..900040947 100644 --- a/stock_change_qty_reason/i18n/pt_BR.po +++ b/stock_change_qty_reason/i18n/pt_BR.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# danimaribeiro , 2016 +# danimaribeiro , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: danimaribeiro , 2016\n" +"Last-Translator: danimaribeiro , 2017\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/pt_PT.po b/stock_change_qty_reason/i18n/pt_PT.po index 5493ac627..af558b6d5 100644 --- a/stock_change_qty_reason/i18n/pt_PT.po +++ b/stock_change_qty_reason/i18n/pt_PT.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# Pedro Castro Silva , 2016 +# Pedro Castro Silva , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: Pedro Castro Silva , 2016\n" +"Last-Translator: Pedro Castro Silva , 2017\n" "Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/ro.po b/stock_change_qty_reason/i18n/ro.po index 887be9b21..34746c400 100644 --- a/stock_change_qty_reason/i18n/ro.po +++ b/stock_change_qty_reason/i18n/ro.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/ru.po b/stock_change_qty_reason/i18n/ru.po index fbeaab412..f2d7a5af9 100644 --- a/stock_change_qty_reason/i18n/ru.po +++ b/stock_change_qty_reason/i18n/ru.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Russian (https://www.transifex.com/oca/teams/23907/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/sl.po b/stock_change_qty_reason/i18n/sl.po index e53980271..778731f0f 100644 --- a/stock_change_qty_reason/i18n/sl.po +++ b/stock_change_qty_reason/i18n/sl.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# Matjaž Mozetič , 2016 +# Matjaž Mozetič , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: Matjaž Mozetič , 2016\n" +"Last-Translator: Matjaž Mozetič , 2017\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/sr@latin.po b/stock_change_qty_reason/i18n/sr@latin.po index 360ab1bb5..f2f4d410c 100644 --- a/stock_change_qty_reason/i18n/sr@latin.po +++ b/stock_change_qty_reason/i18n/sr@latin.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Serbian (Latin) (https://www.transifex.com/oca/teams/23907/sr@latin/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/sv.po b/stock_change_qty_reason/i18n/sv.po index 063f31070..8a8c1ccd7 100644 --- a/stock_change_qty_reason/i18n/sv.po +++ b/stock_change_qty_reason/i18n/sv.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Swedish (https://www.transifex.com/oca/teams/23907/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/th.po b/stock_change_qty_reason/i18n/th.po index b31bbc912..4185ffb4e 100644 --- a/stock_change_qty_reason/i18n/th.po +++ b/stock_change_qty_reason/i18n/th.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Thai (https://www.transifex.com/oca/teams/23907/th/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/tr.po b/stock_change_qty_reason/i18n/tr.po index 90f976726..acf28e253 100644 --- a/stock_change_qty_reason/i18n/tr.po +++ b/stock_change_qty_reason/i18n/tr.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# Ahmet Altinisik , 2016 +# Ahmet Altinisik , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: Ahmet Altinisik , 2016\n" +"Last-Translator: Ahmet Altinisik , 2017\n" "Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/tr_TR.po b/stock_change_qty_reason/i18n/tr_TR.po index e02c27b17..e63fca7bb 100644 --- a/stock_change_qty_reason/i18n/tr_TR.po +++ b/stock_change_qty_reason/i18n/tr_TR.po @@ -6,7 +6,7 @@ # Ozge Altinisik , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-04 11:45+0000\n" "PO-Revision-Date: 2017-01-04 11:45+0000\n" diff --git a/stock_change_qty_reason/i18n/vi.po b/stock_change_qty_reason/i18n/vi.po index af4ca2aca..3b3a01a32 100644 --- a/stock_change_qty_reason/i18n/vi.po +++ b/stock_change_qty_reason/i18n/vi.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Vietnamese (https://www.transifex.com/oca/teams/23907/vi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/zh_CN.po b/stock_change_qty_reason/i18n/zh_CN.po index 8a9240348..6f625858e 100644 --- a/stock_change_qty_reason/i18n/zh_CN.po +++ b/stock_change_qty_reason/i18n/zh_CN.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/i18n/zh_TW.po b/stock_change_qty_reason/i18n/zh_TW.po index 469d392e3..813547681 100644 --- a/stock_change_qty_reason/i18n/zh_TW.po +++ b/stock_change_qty_reason/i18n/zh_TW.po @@ -3,14 +3,14 @@ # * stock_change_qty_reason # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-11-18 03:43+0000\n" "PO-Revision-Date: 2016-11-18 03:43+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Chinese (Taiwan) (https://www.transifex.com/oca/teams/23907/zh_TW/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/stock_change_qty_reason/models/__init__.py b/stock_change_qty_reason/models/__init__.py index cdc73095f..351afa051 100644 --- a/stock_change_qty_reason/models/__init__.py +++ b/stock_change_qty_reason/models/__init__.py @@ -1,2 +1,4 @@ # -*- coding: utf-8 -*- -from . import stock +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import stock_inventory_line diff --git a/stock_change_qty_reason/models/stock.py b/stock_change_qty_reason/models/stock.py deleted file mode 100644 index 5f6ffa7f7..000000000 --- a/stock_change_qty_reason/models/stock.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2016 ACSONE SA/NV () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, api - - -class StockInventoryLine(models.Model): - _inherit = "stock.inventory.line" - - @api.model - def _resolve_inventory_line(self, inventory_line): - - move_id = super(StockInventoryLine, - self)._resolve_inventory_line(inventory_line) - - reason = self.env.context.get('change_quantity_reason', False) - if reason and move_id: - move = self.env['stock.move'].browse(move_id) - - if move.origin: - move.origin = ' ,'.join([move.origin, reason]) - else: - move.origin = reason - - return move_id diff --git a/stock_change_qty_reason/models/stock_inventory_line.py b/stock_change_qty_reason/models/stock_inventory_line.py new file mode 100644 index 000000000..2d996412f --- /dev/null +++ b/stock_change_qty_reason/models/stock_inventory_line.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2016-2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockInventoryLine(models.Model): + _inherit = "stock.inventory.line" + + def _get_move_values(self, qty, location_id, location_dest_id): + res = super(StockInventoryLine, self)._get_move_values( + qty, location_id, location_dest_id) + if res.get('origin'): + res['origin'] = ' ,'.join( + [res.get('origin'), + self.env.context.get('change_quantity_reason', False)]) + else: + res['origin'] = self.env.context.get('change_quantity_reason', + False) + return res diff --git a/stock_change_qty_reason/tests/__init__.py b/stock_change_qty_reason/tests/__init__.py index aaa5518ba..955016f34 100644 --- a/stock_change_qty_reason/tests/__init__.py +++ b/stock_change_qty_reason/tests/__init__.py @@ -1,2 +1,4 @@ # -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/license + from . import test_stock_change_qty_reason diff --git a/stock_change_qty_reason/tests/test_stock_change_qty_reason.py b/stock_change_qty_reason/tests/test_stock_change_qty_reason.py index 4a5cf19ff..2b3ffc036 100644 --- a/stock_change_qty_reason/tests/test_stock_change_qty_reason.py +++ b/stock_change_qty_reason/tests/test_stock_change_qty_reason.py @@ -1,54 +1,68 @@ # -*- coding: utf-8 -*- -# © 2016 Denis Roussel, Acsone SA/NV (http://www.acsone.eu) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2016-2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import openerp.tests.common as common +from odoo.tests.common import SavepointCase -class TestStockQuantityChangeReason(common.TransactionCase): +class TestStockQuantityChangeReason(SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestStockQuantityChangeReason, cls).setUpClass() + + # MODELS + cls.product_product_model = cls.env['product.product'] + cls.product_category_model = cls.env['product.category'] + cls.wizard_model = cls.env['stock.change.product.qty'] + + # INSTANCES + cls.category = cls.product_category_model.create({ + 'name': 'Physical (test)'}) + + def _create_product(self, name): + return self.product_product_model.create({ + 'name': name, + 'categ_id': self.category.id}) def _product_change_qty(self, product, new_qty, reason): - wizard_model = self.env['stock.change.product.qty'] - wizard = wizard_model.create({'product_id': product.id, - 'new_quantity': new_qty, - 'reason': reason}) + wizard = self.wizard_model.create({'product_id': product.id, + 'new_quantity': new_qty, + 'reason': reason}) wizard.change_product_qty() def test_product_change_qty(self): """ Check product quantity update move reason is well set """ - # set product in each period - product2 = self.env.ref('product.product_product_37') - product3 = self.env.ref('product.product_product_38') - product4 = self.env.ref('product.product_product_39') - product5 = self.env.ref('product.product_product_40') - product6 = self.env.ref('product.product_product_41') + # create products + product2 = self._create_product('product_product_2') + product3 = self._create_product('product_product_3') + product4 = self._create_product('product_product_4') + product5 = self._create_product('product_product_5') + product6 = self._create_product('product_product_6') - self._product_change_qty(product2, 10, 'product_37_reason') - self._product_change_qty(product3, 0, 'product_38_reason') - self._product_change_qty(product4, 0, 'product_39_reason') - self._product_change_qty(product5, 10, 'product_40_reason') - self._product_change_qty(product6, 0, 'product_41_reason') + # update qty on hand and add reason + self._product_change_qty(product2, 10, 'product_2_reason') + self._product_change_qty(product3, 0, 'product_3_reason') + self._product_change_qty(product4, 0, 'product_4_reason') + self._product_change_qty(product5, 10, 'product_5_reason') + self._product_change_qty(product6, 0, 'product_6_reason') + # check stock moves created move2 = self.env['stock.move'].search([('product_id', '=', - product2.id)], limit=1, - order='id desc') + product2.id)]) move3 = self.env['stock.move'].search([('product_id', '=', - product3.id)], - limit=1, order='id desc') + product3.id)]) move4 = self.env['stock.move'].search([('product_id', '=', - product4.id)], - limit=1, order='id desc') + product4.id)]) move5 = self.env['stock.move'].search([('product_id', '=', - product5.id)], - limit=1, order='id desc') + product5.id)]) move6 = self.env['stock.move'].search([('product_id', '=', - product6.id)], - limit=1, order='id desc') + product6.id)]) - self.assertEqual(move2.origin, 'product_37_reason') + self.assertEqual(move2.origin, 'product_2_reason') self.assertFalse(move3) self.assertFalse(move4) - self.assertEqual(move5.origin, 'product_40_reason') + self.assertEqual(move5.origin, 'product_5_reason') self.assertFalse(move6) diff --git a/stock_change_qty_reason/wizard/__init__.py b/stock_change_qty_reason/wizard/__init__.py index 2bce51f06..d641ab993 100644 --- a/stock_change_qty_reason/wizard/__init__.py +++ b/stock_change_qty_reason/wizard/__init__.py @@ -1 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/license + from . import stock_change_product_qty diff --git a/stock_change_qty_reason/wizard/stock_change_product_qty.py b/stock_change_qty_reason/wizard/stock_change_product_qty.py index d4807bda2..01ce26c7b 100644 --- a/stock_change_qty_reason/wizard/stock_change_product_qty.py +++ b/stock_change_qty_reason/wizard/stock_change_product_qty.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# © 2016 ACSONE SA/NV () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields, api +# Copyright 2016-2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, fields, api class StockChangeProductQty(models.TransientModel): @@ -15,7 +16,5 @@ class StockChangeProductQty(models.TransientModel): def change_product_qty(self): if self.reason: this = self.with_context(change_quantity_reason=self.reason) - return super(StockChangeProductQty, this).change_product_qty() - return super(StockChangeProductQty, self).change_product_qty() diff --git a/stock_change_qty_reason/wizard/stock_product_change_qty.xml b/stock_change_qty_reason/wizard/stock_product_change_qty.xml index 9aeffba0d..4ba0ddd1a 100644 --- a/stock_change_qty_reason/wizard/stock_product_change_qty.xml +++ b/stock_change_qty_reason/wizard/stock_product_change_qty.xml @@ -1,5 +1,8 @@ - + + + Change Product Quantity Reason @@ -12,4 +15,4 @@ - +