From 4ba1ff7cb7db40e9b2366e615d7a55bd51d41204 Mon Sep 17 00:00:00 2001 From: campos Date: Tue, 3 Feb 2015 15:23:22 +0100 Subject: [PATCH 01/19] Views + Module name + fields. --- .../README.rst | 4 +++ .../__init__.py | 20 +++++++++++ .../__openerp__.py | 35 +++++++++++++++++++ .../models/__init__.py | 19 ++++++++++ .../models/purchase.py | 8 +++++ .../views/purchase_view.xml | 17 +++++++++ 6 files changed, 103 insertions(+) create mode 100644 purchase_order_line_stock_available/README.rst create mode 100755 purchase_order_line_stock_available/__init__.py create mode 100755 purchase_order_line_stock_available/__openerp__.py create mode 100644 purchase_order_line_stock_available/models/__init__.py create mode 100644 purchase_order_line_stock_available/models/purchase.py create mode 100644 purchase_order_line_stock_available/views/purchase_view.xml diff --git a/purchase_order_line_stock_available/README.rst b/purchase_order_line_stock_available/README.rst new file mode 100644 index 00000000000..42ff53ccb3b --- /dev/null +++ b/purchase_order_line_stock_available/README.rst @@ -0,0 +1,4 @@ +Purchase order line stock available +=================================== +This module allows to view the virtual stock quantity of a product in the +purchase order line. diff --git a/purchase_order_line_stock_available/__init__.py b/purchase_order_line_stock_available/__init__.py new file mode 100755 index 00000000000..e33756373c0 --- /dev/null +++ b/purchase_order_line_stock_available/__init__.py @@ -0,0 +1,20 @@ + +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from . import models diff --git a/purchase_order_line_stock_available/__openerp__.py b/purchase_order_line_stock_available/__openerp__.py new file mode 100755 index 00000000000..a5bda3de589 --- /dev/null +++ b/purchase_order_line_stock_available/__openerp__.py @@ -0,0 +1,35 @@ + +# -*- encoding: utf-8 -*- +############################################################################## +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +{ + "name": "Purchase order line stock available", + "version": "1.0", + "author": "OdooMRP team," + "AvanzOSC," + "Serv. Tecnol. Avanzados - Pedro M. Baeza", + 'website': "http://www.odoomrp.com", + 'contributors': ["Daniel Campos ", + "Pedro M. Baeza ", + "Ana Juaristi "], + "depends": ['purchase'], + "category": "Custom Modules", + "data": ['views/purchase_view.xml', + ], + "installable": True +} diff --git a/purchase_order_line_stock_available/models/__init__.py b/purchase_order_line_stock_available/models/__init__.py new file mode 100644 index 00000000000..cfa122f937a --- /dev/null +++ b/purchase_order_line_stock_available/models/__init__.py @@ -0,0 +1,19 @@ + +# -*- encoding: utf-8 -*- +############################################################################## +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +############################################################################## + +from . import purchase diff --git a/purchase_order_line_stock_available/models/purchase.py b/purchase_order_line_stock_available/models/purchase.py new file mode 100644 index 00000000000..5cedd30a374 --- /dev/null +++ b/purchase_order_line_stock_available/models/purchase.py @@ -0,0 +1,8 @@ + +from openerp import models, fields + + +class PurchaseOrderLine(models.Model): + _inherit = 'purchase.order.line' + + virtual_available = fields.Float(related='product_id.virtual_available') diff --git a/purchase_order_line_stock_available/views/purchase_view.xml b/purchase_order_line_stock_available/views/purchase_view.xml new file mode 100644 index 00000000000..c1bb03be1b7 --- /dev/null +++ b/purchase_order_line_stock_available/views/purchase_view.xml @@ -0,0 +1,17 @@ + + + + purchase.order.form.view.stock + purchase.order + + + + + + + + + + + From bb4f2e07498af341cee6fe3c9e5ad566746d4419 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 10 Oct 2015 20:50:33 +0200 Subject: [PATCH 02/19] OCA Transbot updated translations from Transifex --- .../__init__.py | 2 +- .../__openerp__.py | 5 +- .../i18n/es.po | 47 +++++++++++++++++++ .../i18n/pt_BR.po | 24 ++++++++++ .../i18n/sl.po | 23 +++++++++ .../models/__init__.py | 2 +- 6 files changed, 99 insertions(+), 4 deletions(-) mode change 100755 => 100644 purchase_order_line_stock_available/__init__.py mode change 100755 => 100644 purchase_order_line_stock_available/__openerp__.py create mode 100644 purchase_order_line_stock_available/i18n/es.po create mode 100644 purchase_order_line_stock_available/i18n/pt_BR.po create mode 100644 purchase_order_line_stock_available/i18n/sl.po diff --git a/purchase_order_line_stock_available/__init__.py b/purchase_order_line_stock_available/__init__.py old mode 100755 new mode 100644 index e33756373c0..ab9dc79a2b6 --- a/purchase_order_line_stock_available/__init__.py +++ b/purchase_order_line_stock_available/__init__.py @@ -1,5 +1,5 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify diff --git a/purchase_order_line_stock_available/__openerp__.py b/purchase_order_line_stock_available/__openerp__.py old mode 100755 new mode 100644 index a5bda3de589..e6656842fb6 --- a/purchase_order_line_stock_available/__openerp__.py +++ b/purchase_order_line_stock_available/__openerp__.py @@ -1,5 +1,5 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify @@ -19,7 +19,8 @@ { "name": "Purchase order line stock available", - "version": "1.0", + "version": "8.0.1.0.0", + "license": "AGPL-3", "author": "OdooMRP team," "AvanzOSC," "Serv. Tecnol. Avanzados - Pedro M. Baeza", diff --git a/purchase_order_line_stock_available/i18n/es.po b/purchase_order_line_stock_available/i18n/es.po new file mode 100644 index 00000000000..45c52dad866 --- /dev/null +++ b/purchase_order_line_stock_available/i18n/es.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_line_stock_available +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 09:11+0000\n" +"PO-Revision-Date: 2017-02-21 10:20+0100\n" +"Last-Translator: Ainara Galdona \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"X-Generator: Poedit 1.5.4\n" + +#. module: purchase_order_line_stock_available +#: field:purchase.order.line,virtual_available:0 +msgid "Forecast Quantity" +msgstr "Cantidad Prevista" + +#. module: purchase_order_line_stock_available +#: help:purchase.order.line,virtual_available:0 +msgid "" +"Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +"In a context with a single Stock Location, this includes goods stored in " +"this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the " +"Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' " +"type." +msgstr "" +"Cantidad Prevista (calculado de la siguiente forma -> stock real - salientes " +"+ entrantes)\n" +"Con una ubicación de stock en contexto, añade las cantidades existentes en " +"esa ubicación o en cualquier hijo suyo. \n" +"Con un almacén en contexto, añade las cantidades existentes en la ubicación " +"de stock de ese almacén o en cualquier hijo suyo. \n" +"En cualquiero otro caso, te añade las cantidades existentes en todas las " +"ubicaciones de tipo interno." + +#. module: purchase_order_line_stock_available +#: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Línea pedido de compra" diff --git a/purchase_order_line_stock_available/i18n/pt_BR.po b/purchase_order_line_stock_available/i18n/pt_BR.po new file mode 100644 index 00000000000..4bc7e489a88 --- /dev/null +++ b/purchase_order_line_stock_available/i18n/pt_BR.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_line_stock_available +# +# Translators: +# danimaribeiro , 2015 +msgid "" +msgstr "" +"Project-Id-Version: odoomrp-utils (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-08 08:45+0000\n" +"PO-Revision-Date: 2015-10-09 01:28+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-utils-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: purchase_order_line_stock_available +#: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Linha de compra" diff --git a/purchase_order_line_stock_available/i18n/sl.po b/purchase_order_line_stock_available/i18n/sl.po new file mode 100644 index 00000000000..31761e2b498 --- /dev/null +++ b/purchase_order_line_stock_available/i18n/sl.po @@ -0,0 +1,23 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_line_stock_available +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: odoomrp-utils (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-08 08:45+0000\n" +"PO-Revision-Date: 2015-09-28 13:12+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-utils-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: purchase_order_line_stock_available +#: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Postavka nabavnega naloga" diff --git a/purchase_order_line_stock_available/models/__init__.py b/purchase_order_line_stock_available/models/__init__.py index cfa122f937a..b059e604952 100644 --- a/purchase_order_line_stock_available/models/__init__.py +++ b/purchase_order_line_stock_available/models/__init__.py @@ -1,5 +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 From 375761c0d7f2a3903dfd36b3ddec5ccd67781ac2 Mon Sep 17 00:00:00 2001 From: cubells Date: Tue, 25 Sep 2018 12:43:42 +0200 Subject: [PATCH 03/19] [MIG] purchase_order_line_stock_available: Migration to 11.0 --- .../README.rst | 85 ++++ .../__init__.py | 19 - .../__manifest__.py | 19 + .../__openerp__.py | 36 -- .../i18n/es.po | 5 +- .../i18n/pt_BR.po | 24 +- .../purchase_order_line_stock_available.pot | 33 ++ .../i18n/sl.po | 27 +- .../models/__init__.py | 18 - .../models/purchase.py | 8 +- .../readme/CONTRIBUTORS.rst | 8 + .../readme/DESCRIPTION.rst | 2 + .../readme/USAGE.rst | 2 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 439 ++++++++++++++++++ .../views/purchase_view.xml | 30 +- 16 files changed, 654 insertions(+), 101 deletions(-) create mode 100644 purchase_order_line_stock_available/__manifest__.py delete mode 100644 purchase_order_line_stock_available/__openerp__.py create mode 100644 purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot create mode 100644 purchase_order_line_stock_available/readme/CONTRIBUTORS.rst create mode 100644 purchase_order_line_stock_available/readme/DESCRIPTION.rst create mode 100644 purchase_order_line_stock_available/readme/USAGE.rst create mode 100644 purchase_order_line_stock_available/static/description/icon.png create mode 100644 purchase_order_line_stock_available/static/description/index.html diff --git a/purchase_order_line_stock_available/README.rst b/purchase_order_line_stock_available/README.rst index 42ff53ccb3b..8255b8ec5aa 100644 --- a/purchase_order_line_stock_available/README.rst +++ b/purchase_order_line_stock_available/README.rst @@ -1,4 +1,89 @@ +=================================== Purchase order line stock available =================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/11.0/purchase_order_line_stock_available + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_order_line_stock_available + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/142/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module allows to view the virtual stock quantity of a product in the purchase order line. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +* Create a new purchase order and now you will see available stock of product + on every purchase line. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* OdooMRP team +* AvanzOSC +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `AvanzOSC `_: + + * Daniel Campos + * Ana Juaristi +* `Tecnativa `_: + + * Pedro Baeza + * Vicent Cubells + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_order_line_stock_available/__init__.py b/purchase_order_line_stock_available/__init__.py index ab9dc79a2b6..0650744f6bc 100644 --- a/purchase_order_line_stock_available/__init__.py +++ b/purchase_order_line_stock_available/__init__.py @@ -1,20 +1 @@ - -# -*- 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -############################################################################## - from . import models diff --git a/purchase_order_line_stock_available/__manifest__.py b/purchase_order_line_stock_available/__manifest__.py new file mode 100644 index 00000000000..92995368ebf --- /dev/null +++ b/purchase_order_line_stock_available/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2015 AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Purchase order line stock available", + "version": "11.0.1.0.0", + "license": "AGPL-3", + "author": "OdooMRP team," + "AvanzOSC," + "Tecnativa", + 'website': "https://github.com/OCA/purchase-workflow", + "depends": [ + 'purchase', + ], + "category": "Custom Modules", + "data": [ + 'views/purchase_view.xml', + ], + "installable": True +} diff --git a/purchase_order_line_stock_available/__openerp__.py b/purchase_order_line_stock_available/__openerp__.py deleted file mode 100644 index e6656842fb6..00000000000 --- a/purchase_order_line_stock_available/__openerp__.py +++ /dev/null @@ -1,36 +0,0 @@ - -# -*- 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -############################################################################## - -{ - "name": "Purchase order line stock available", - "version": "8.0.1.0.0", - "license": "AGPL-3", - "author": "OdooMRP team," - "AvanzOSC," - "Serv. Tecnol. Avanzados - Pedro M. Baeza", - 'website': "http://www.odoomrp.com", - 'contributors': ["Daniel Campos ", - "Pedro M. Baeza ", - "Ana Juaristi "], - "depends": ['purchase'], - "category": "Custom Modules", - "data": ['views/purchase_view.xml', - ], - "installable": True -} diff --git a/purchase_order_line_stock_available/i18n/es.po b/purchase_order_line_stock_available/i18n/es.po index 45c52dad866..5da6d972058 100644 --- a/purchase_order_line_stock_available/i18n/es.po +++ b/purchase_order_line_stock_available/i18n/es.po @@ -10,6 +10,7 @@ msgstr "" "PO-Revision-Date: 2017-02-21 10:20+0100\n" "Last-Translator: Ainara Galdona \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -17,12 +18,12 @@ msgstr "" "X-Generator: Poedit 1.5.4\n" #. module: purchase_order_line_stock_available -#: field:purchase.order.line,virtual_available:0 +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available msgid "Forecast Quantity" msgstr "Cantidad Prevista" #. module: purchase_order_line_stock_available -#: help:purchase.order.line,virtual_available:0 +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available msgid "" "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" "In a context with a single Stock Location, this includes goods stored in " diff --git a/purchase_order_line_stock_available/i18n/pt_BR.po b/purchase_order_line_stock_available/i18n/pt_BR.po index 4bc7e489a88..0805870b872 100644 --- a/purchase_order_line_stock_available/i18n/pt_BR.po +++ b/purchase_order_line_stock_available/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * purchase_order_line_stock_available -# +# # Translators: # danimaribeiro , 2015 msgid "" @@ -11,13 +11,31 @@ msgstr "" "POT-Creation-Date: 2015-10-08 08:45+0000\n" "PO-Revision-Date: 2015-10-09 01:28+0000\n" "Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-utils-8-0/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-" +"utils-8-0/language/pt_BR/)\n" +"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: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +msgid "Forecast Quantity" +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +msgid "" +"Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +"In a context with a single Stock Location, this includes goods stored in " +"this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the " +"Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' " +"type." +msgstr "" + #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" diff --git a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot new file mode 100644 index 00000000000..53faa4fac85 --- /dev/null +++ b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_line_stock_available +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \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: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +msgid "Forecast Quantity" +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +msgid "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +"In a context with a single Stock Location, this includes goods stored in this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' type." +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + diff --git a/purchase_order_line_stock_available/i18n/sl.po b/purchase_order_line_stock_available/i18n/sl.po index 31761e2b498..b4e3b80ab6b 100644 --- a/purchase_order_line_stock_available/i18n/sl.po +++ b/purchase_order_line_stock_available/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * purchase_order_line_stock_available -# +# # Translators: msgid "" msgstr "" @@ -10,12 +10,31 @@ msgstr "" "POT-Creation-Date: 2015-10-08 08:45+0000\n" "PO-Revision-Date: 2015-09-28 13:12+0000\n" "Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-utils-8-0/language/sl/)\n" +"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-utils-8-0/" +"language/sl/)\n" +"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" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +msgid "Forecast Quantity" +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +msgid "" +"Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +"In a context with a single Stock Location, this includes goods stored in " +"this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the " +"Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' " +"type." +msgstr "" #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line diff --git a/purchase_order_line_stock_available/models/__init__.py b/purchase_order_line_stock_available/models/__init__.py index b059e604952..370f577b2a2 100644 --- a/purchase_order_line_stock_available/models/__init__.py +++ b/purchase_order_line_stock_available/models/__init__.py @@ -1,19 +1 @@ - -# -*- 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -############################################################################## - from . import purchase diff --git a/purchase_order_line_stock_available/models/purchase.py b/purchase_order_line_stock_available/models/purchase.py index 5cedd30a374..15c0b0d0e5e 100644 --- a/purchase_order_line_stock_available/models/purchase.py +++ b/purchase_order_line_stock_available/models/purchase.py @@ -1,8 +1,10 @@ - -from openerp import models, fields +from odoo import fields, models class PurchaseOrderLine(models.Model): _inherit = 'purchase.order.line' - virtual_available = fields.Float(related='product_id.virtual_available') + virtual_available = fields.Float( + related='product_id.virtual_available', + readonly=True, + ) diff --git a/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst b/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..b03c12735fb --- /dev/null +++ b/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* `AvanzOSC `_: + + * Daniel Campos + * Ana Juaristi +* `Tecnativa `_: + + * Pedro Baeza + * Vicent Cubells diff --git a/purchase_order_line_stock_available/readme/DESCRIPTION.rst b/purchase_order_line_stock_available/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..426705ed794 --- /dev/null +++ b/purchase_order_line_stock_available/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows to view the virtual stock quantity of a product in the +purchase order line. diff --git a/purchase_order_line_stock_available/readme/USAGE.rst b/purchase_order_line_stock_available/readme/USAGE.rst new file mode 100644 index 00000000000..d2ad4ea3ca5 --- /dev/null +++ b/purchase_order_line_stock_available/readme/USAGE.rst @@ -0,0 +1,2 @@ +* Create a new purchase order and now you will see available stock of product + on every purchase line. diff --git a/purchase_order_line_stock_available/static/description/icon.png b/purchase_order_line_stock_available/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgk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^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/purchase_order_line_stock_available/static/description/index.html b/purchase_order_line_stock_available/static/description/index.html new file mode 100644 index 00000000000..a7e86a83a48 --- /dev/null +++ b/purchase_order_line_stock_available/static/description/index.html @@ -0,0 +1,439 @@ + + + + + + +Purchase order line stock available + + + +
+

Purchase order line stock available

+ + +

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

This module allows to view the virtual stock quantity of a product in the +purchase order line.

+

Table of contents

+ +
+

Usage

+
    +
  • Create a new purchase order and now you will see available stock of product +on every purchase line.
  • +
+
+
+

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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • OdooMRP team
  • +
  • AvanzOSC
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/purchase-workflow project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/purchase_order_line_stock_available/views/purchase_view.xml b/purchase_order_line_stock_available/views/purchase_view.xml index c1bb03be1b7..0cda9aef675 100644 --- a/purchase_order_line_stock_available/views/purchase_view.xml +++ b/purchase_order_line_stock_available/views/purchase_view.xml @@ -1,17 +1,15 @@ - - + + + - purchase.order.form.view.stock - purchase.order - - - - - - - - - - - + purchase.order.form.view.stock + purchase.order + + + + + + + + + From e3711af78c09491f8f6033f37bca66bdd2fbe945 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 16 Dec 2019 22:11:39 +0100 Subject: [PATCH 04/19] [MIG] purchase_order_line_stock_available: Migration to 12.0 * Standard procedure --- purchase_order_line_stock_available/README.rst | 11 +++++------ purchase_order_line_stock_available/__manifest__.py | 11 ++++++----- purchase_order_line_stock_available/i18n/es.po | 4 ++-- purchase_order_line_stock_available/i18n/pt_BR.po | 4 ++-- .../i18n/purchase_order_line_stock_available.pot | 6 +++--- purchase_order_line_stock_available/i18n/sl.po | 4 ++-- .../static/description/index.html | 7 +++---- 7 files changed, 23 insertions(+), 24 deletions(-) diff --git a/purchase_order_line_stock_available/README.rst b/purchase_order_line_stock_available/README.rst index 8255b8ec5aa..684c4cb679b 100644 --- a/purchase_order_line_stock_available/README.rst +++ b/purchase_order_line_stock_available/README.rst @@ -14,13 +14,13 @@ Purchase order line stock available :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/11.0/purchase_order_line_stock_available + :target: https://github.com/OCA/purchase-workflow/tree/12.0/purchase_order_line_stock_available :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_order_line_stock_available + :target: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_order_line_stock_available :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/142/11.0 + :target: https://runbot.odoo-community.org/runbot/142/12.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -55,7 +55,6 @@ Credits Authors ~~~~~~~ -* OdooMRP team * AvanzOSC * Tecnativa @@ -84,6 +83,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_order_line_stock_available/__manifest__.py b/purchase_order_line_stock_available/__manifest__.py index 92995368ebf..b91a22b6423 100644 --- a/purchase_order_line_stock_available/__manifest__.py +++ b/purchase_order_line_stock_available/__manifest__.py @@ -1,17 +1,18 @@ # Copyright 2015 AvanzOSC +# Copyright 2017-2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Purchase order line stock available", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "license": "AGPL-3", - "author": "OdooMRP team," - "AvanzOSC," - "Tecnativa", + "author": "AvanzOSC," + "Tecnativa," + "Odoo Community Association (OCA)", 'website': "https://github.com/OCA/purchase-workflow", "depends": [ 'purchase', ], - "category": "Custom Modules", + "category": "Purchases", "data": [ 'views/purchase_view.xml', ], diff --git a/purchase_order_line_stock_available/i18n/es.po b/purchase_order_line_stock_available/i18n/es.po index 5da6d972058..b1e76194f5f 100644 --- a/purchase_order_line_stock_available/i18n/es.po +++ b/purchase_order_line_stock_available/i18n/es.po @@ -18,12 +18,12 @@ msgstr "" "X-Generator: Poedit 1.5.4\n" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "Forecast Quantity" msgstr "Cantidad Prevista" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" "In a context with a single Stock Location, this includes goods stored in " diff --git a/purchase_order_line_stock_available/i18n/pt_BR.po b/purchase_order_line_stock_available/i18n/pt_BR.po index 0805870b872..fbfa712663c 100644 --- a/purchase_order_line_stock_available/i18n/pt_BR.po +++ b/purchase_order_line_stock_available/i18n/pt_BR.po @@ -20,12 +20,12 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "Forecast Quantity" msgstr "" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" "In a context with a single Stock Location, this includes goods stored in " diff --git a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot index 53faa4fac85..8b916e6bae6 100644 --- a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot +++ b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -14,12 +14,12 @@ msgstr "" "Plural-Forms: \n" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "Forecast Quantity" msgstr "" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" "In a context with a single Stock Location, this includes goods stored in this location, or any of its children.\n" "In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" diff --git a/purchase_order_line_stock_available/i18n/sl.po b/purchase_order_line_stock_available/i18n/sl.po index b4e3b80ab6b..dce249f1f6c 100644 --- a/purchase_order_line_stock_available/i18n/sl.po +++ b/purchase_order_line_stock_available/i18n/sl.po @@ -20,12 +20,12 @@ msgstr "" "%100==4 ? 2 : 3);\n" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "Forecast Quantity" msgstr "" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line_virtual_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" "In a context with a single Stock Location, this includes goods stored in " diff --git a/purchase_order_line_stock_available/static/description/index.html b/purchase_order_line_stock_available/static/description/index.html index a7e86a83a48..9eff22c7850 100644 --- a/purchase_order_line_stock_available/static/description/index.html +++ b/purchase_order_line_stock_available/static/description/index.html @@ -367,7 +367,7 @@

Purchase order line stock available

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

This module allows to view the virtual stock quantity of a product in the purchase order line.

Table of contents

@@ -395,7 +395,7 @@

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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -403,7 +403,6 @@

Credits

Authors

    -
  • OdooMRP team
  • AvanzOSC
  • Tecnativa
@@ -430,7 +429,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/purchase-workflow project on GitHub.

+

This module is part of the OCA/purchase-workflow project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From 662eb71948d8e8f0f1a2412e733d007e59ae71e9 Mon Sep 17 00:00:00 2001 From: Sudhir Arya Date: Sat, 29 Feb 2020 13:22:27 +0530 Subject: [PATCH 05/19] [IMP] purchase_order_line_stock_available: black, isort --- .../__manifest__.py | 16 +++++----------- .../models/purchase.py | 5 ++--- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/purchase_order_line_stock_available/__manifest__.py b/purchase_order_line_stock_available/__manifest__.py index b91a22b6423..0407ed161b6 100644 --- a/purchase_order_line_stock_available/__manifest__.py +++ b/purchase_order_line_stock_available/__manifest__.py @@ -5,16 +5,10 @@ "name": "Purchase order line stock available", "version": "12.0.1.0.0", "license": "AGPL-3", - "author": "AvanzOSC," - "Tecnativa," - "Odoo Community Association (OCA)", - 'website': "https://github.com/OCA/purchase-workflow", - "depends": [ - 'purchase', - ], + "author": "AvanzOSC," "Tecnativa," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/purchase-workflow", + "depends": ["purchase"], "category": "Purchases", - "data": [ - 'views/purchase_view.xml', - ], - "installable": True + "data": ["views/purchase_view.xml"], + "installable": True, } diff --git a/purchase_order_line_stock_available/models/purchase.py b/purchase_order_line_stock_available/models/purchase.py index 15c0b0d0e5e..1946e7ce2e7 100644 --- a/purchase_order_line_stock_available/models/purchase.py +++ b/purchase_order_line_stock_available/models/purchase.py @@ -2,9 +2,8 @@ class PurchaseOrderLine(models.Model): - _inherit = 'purchase.order.line' + _inherit = "purchase.order.line" virtual_available = fields.Float( - related='product_id.virtual_available', - readonly=True, + related="product_id.virtual_available", readonly=True ) From 2e9934df02d6bc3217916f4edc9fcc25c52d683d Mon Sep 17 00:00:00 2001 From: Sudhir Arya Date: Sat, 29 Feb 2020 14:01:39 +0530 Subject: [PATCH 06/19] [MIG] purchase_order_line_stock_available: Migration to 13.0 [UPD] Update purchase_order_line_stock_available.pot [UPD] README.rst --- .../README.rst | 16 +++--- .../__manifest__.py | 4 +- .../purchase_order_line_stock_available.pot | 10 ++-- .../readme/CONTRIBUTORS.rst | 6 +- .../static/description/index.html | 12 ++-- .../tests/__init__.py | 1 + .../tests/test_purchase.py | 57 +++++++++++++++++++ .../views/purchase_view.xml | 13 +++-- 8 files changed, 92 insertions(+), 27 deletions(-) create mode 100644 purchase_order_line_stock_available/tests/__init__.py create mode 100644 purchase_order_line_stock_available/tests/test_purchase.py diff --git a/purchase_order_line_stock_available/README.rst b/purchase_order_line_stock_available/README.rst index 684c4cb679b..32479e907f7 100644 --- a/purchase_order_line_stock_available/README.rst +++ b/purchase_order_line_stock_available/README.rst @@ -14,13 +14,13 @@ Purchase order line stock available :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/12.0/purchase_order_line_stock_available + :target: https://github.com/OCA/purchase-workflow/tree/13.0/purchase_order_line_stock_available :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_order_line_stock_available + :target: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_order_line_stock_available :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/142/12.0 + :target: https://runbot.odoo-community.org/runbot/142/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -67,8 +67,10 @@ Contributors * Ana Juaristi * `Tecnativa `_: - * Pedro Baeza - * Vicent Cubells + * Pedro Baeza + * Vicent Cubells + * Víctor Martínez +* Sudhir Arya Maintainers ~~~~~~~~~~~ @@ -83,6 +85,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_order_line_stock_available/__manifest__.py b/purchase_order_line_stock_available/__manifest__.py index 0407ed161b6..0a6ef333b59 100644 --- a/purchase_order_line_stock_available/__manifest__.py +++ b/purchase_order_line_stock_available/__manifest__.py @@ -3,11 +3,11 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Purchase order line stock available", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "license": "AGPL-3", "author": "AvanzOSC," "Tecnativa," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/purchase-workflow", - "depends": ["purchase"], + "depends": ["purchase_stock"], "category": "Purchases", "data": ["views/purchase_view.xml"], "installable": True, diff --git a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot index 8b916e6bae6..05249a668a1 100644 --- a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot +++ b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * purchase_order_line_stock_available +# * purchase_order_line_stock_available # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,7 +20,8 @@ msgstr "" #. module: purchase_order_line_stock_available #: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available -msgid "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +msgid "" +"Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" "In a context with a single Stock Location, this includes goods stored in this location, or any of its children.\n" "In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" "Otherwise, this includes goods stored in any Stock Location with 'internal' type." @@ -30,4 +31,3 @@ msgstr "" #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" msgstr "" - diff --git a/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst b/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst index b03c12735fb..52e4c0c1083 100644 --- a/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst +++ b/purchase_order_line_stock_available/readme/CONTRIBUTORS.rst @@ -4,5 +4,7 @@ * Ana Juaristi * `Tecnativa `_: - * Pedro Baeza - * Vicent Cubells + * Pedro Baeza + * Vicent Cubells + * Víctor Martínez +* Sudhir Arya diff --git a/purchase_order_line_stock_available/static/description/index.html b/purchase_order_line_stock_available/static/description/index.html index 9eff22c7850..220f912ec30 100644 --- a/purchase_order_line_stock_available/static/description/index.html +++ b/purchase_order_line_stock_available/static/description/index.html @@ -367,7 +367,7 @@

Purchase order line stock available

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

This module allows to view the virtual stock quantity of a product in the purchase order line.

Table of contents

@@ -395,7 +395,7 @@

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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -416,10 +416,12 @@

Contributors

  • Tecnativa:
  • +
  • Sudhir Arya <sudhir@erpharbor.com>
  • @@ -429,7 +431,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/purchase-workflow project on GitHub.

    +

    This module is part of the OCA/purchase-workflow project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/purchase_order_line_stock_available/tests/__init__.py b/purchase_order_line_stock_available/tests/__init__.py new file mode 100644 index 00000000000..5f85fc3d3a9 --- /dev/null +++ b/purchase_order_line_stock_available/tests/__init__.py @@ -0,0 +1 @@ +from . import test_purchase diff --git a/purchase_order_line_stock_available/tests/test_purchase.py b/purchase_order_line_stock_available/tests/test_purchase.py new file mode 100644 index 00000000000..f199dee7837 --- /dev/null +++ b/purchase_order_line_stock_available/tests/test_purchase.py @@ -0,0 +1,57 @@ +# Copyright 2021 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from datetime import date + +from odoo.tests import common + + +class TestPurchase(common.TransactionCase): + def setUp(self): + super().setUp() + self.company = self.env.ref("base.main_company") + self.partner = self.env["res.partner"].create({"name": "Test partner"}) + self.product = self.env["product.product"].create( + {"name": "Test product", "type": "product"} + ) + self.location_stock = self.env.ref("stock.stock_location_stock") + self.location_suppliers = self.env.ref("stock.stock_location_suppliers") + self.purchase = self.env["purchase.order"].create( + { + "partner_id": self.partner.id, + "order_line": [ + ( + 0, + 0, + { + "product_id": self.product.id, + "product_uom": self.product.uom_id.id, + "name": self.product.name, + "price_unit": self.product.standard_price, + "date_planned": date.today(), + "product_qty": 1, + }, + ) + ], + } + ) + self.purchase_line = self.purchase.order_line[0] + self._create_stock_move(10.0) + + def _create_stock_move(self, qty): + stock_move = self.env["stock.move"].create( + { + "name": self.product.display_name, + "location_id": self.location_suppliers.id, + "location_dest_id": self.location_stock.id, + "product_id": self.product.id, + "product_uom": self.product.uom_id.id, + "product_uom_qty": qty, + } + ) + stock_move._action_done() + + def test_purchase_line_virtual_available(self): + self.assertEqual(self.purchase_line.virtual_available, 10.0) + self._create_stock_move(20.0) + self.assertEqual(self.purchase_line.virtual_available, 30.0) diff --git a/purchase_order_line_stock_available/views/purchase_view.xml b/purchase_order_line_stock_available/views/purchase_view.xml index 0cda9aef675..2649ba57d37 100644 --- a/purchase_order_line_stock_available/views/purchase_view.xml +++ b/purchase_order_line_stock_available/views/purchase_view.xml @@ -1,15 +1,16 @@ - + - purchase.order.form.view.stock purchase.order - + - - + + - From fe970075cbf9973a2b694c969133e1c3840805d7 Mon Sep 17 00:00:00 2001 From: Dong Date: Sun, 21 Mar 2021 09:52:33 +0000 Subject: [PATCH 07/19] Added translation using Weblate (Chinese (Simplified)) Translated using Weblate (Chinese (Simplified)) Currently translated at 66.6% (2 of 3 strings) Translation: purchase-workflow-13.0/purchase-workflow-13.0-purchase_order_line_stock_available Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_order_line_stock_available/zh_CN/ --- .../i18n/zh_CN.po | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 purchase_order_line_stock_available/i18n/zh_CN.po diff --git a/purchase_order_line_stock_available/i18n/zh_CN.po b/purchase_order_line_stock_available/i18n/zh_CN.po new file mode 100644 index 00000000000..28b2390f867 --- /dev/null +++ b/purchase_order_line_stock_available/i18n/zh_CN.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_order_line_stock_available +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-03-21 12:46+0000\n" +"Last-Translator: Dong \n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "Forecast Quantity" +msgstr "预测库存" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "" +"Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +"In a context with a single Stock Location, this includes goods stored in this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' type." +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "采购订单明细" From 9d78d5165468f8c00fe445e8cf47d879db897a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Thu, 27 Oct 2022 11:00:23 +0200 Subject: [PATCH 08/19] [MIG] purchase_order_line_stock_available: Migration to 14.0 TT40212 [UPD] Update purchase_order_line_stock_available.pot [UPD] README.rst --- purchase_order_line_stock_available/README.rst | 10 +++++----- .../__manifest__.py | 2 +- .../purchase_order_line_stock_available.pot | 17 ++++++++++++++++- .../static/description/index.html | 6 +++--- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/purchase_order_line_stock_available/README.rst b/purchase_order_line_stock_available/README.rst index 32479e907f7..29b30caaf82 100644 --- a/purchase_order_line_stock_available/README.rst +++ b/purchase_order_line_stock_available/README.rst @@ -14,13 +14,13 @@ Purchase order line stock available :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/13.0/purchase_order_line_stock_available + :target: https://github.com/OCA/purchase-workflow/tree/14.0/purchase_order_line_stock_available :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_order_line_stock_available + :target: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_order_line_stock_available :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/142/13.0 + :target: https://runbot.odoo-community.org/runbot/142/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -85,6 +85,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_order_line_stock_available/__manifest__.py b/purchase_order_line_stock_available/__manifest__.py index 0a6ef333b59..7b4af89e721 100644 --- a/purchase_order_line_stock_available/__manifest__.py +++ b/purchase_order_line_stock_available/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Purchase order line stock available", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "license": "AGPL-3", "author": "AvanzOSC," "Tecnativa," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/purchase-workflow", diff --git a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot index 05249a668a1..fd3e7c2905b 100644 --- a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot +++ b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,6 +13,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__display_name +msgid "Display Name" +msgstr "" + #. module: purchase_order_line_stock_available #: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "Forecast Quantity" @@ -27,6 +32,16 @@ msgid "" "Otherwise, this includes goods stored in any Stock Location with 'internal' type." msgstr "" +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__id +msgid "ID" +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line____last_update +msgid "Last Modified on" +msgstr "" + #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" diff --git a/purchase_order_line_stock_available/static/description/index.html b/purchase_order_line_stock_available/static/description/index.html index 220f912ec30..c928d4132d3 100644 --- a/purchase_order_line_stock_available/static/description/index.html +++ b/purchase_order_line_stock_available/static/description/index.html @@ -367,7 +367,7 @@

    Purchase order line stock available

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

    +

    Beta License: AGPL-3 OCA/purchase-workflow Translate me on Weblate Try me on Runbot

    This module allows to view the virtual stock quantity of a product in the purchase order line.

    Table of contents

    @@ -395,7 +395,7 @@

    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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -431,7 +431,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/purchase-workflow project on GitHub.

    +

    This module is part of the OCA/purchase-workflow project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    From 2661feeb9f46ed241d47983134808fdd4c8e274f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Thu, 27 Oct 2022 14:03:56 +0200 Subject: [PATCH 09/19] [MIG] purchase_order_line_stock_available: Migration to 15.0 TT36980 [UPD] Update purchase_order_line_stock_available.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-15.0/purchase-workflow-15.0-purchase_order_line_stock_available Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_order_line_stock_available/ [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-15.0/purchase-workflow-15.0-purchase_order_line_stock_available Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_order_line_stock_available/ --- .../README.rst | 23 +++++----- .../__manifest__.py | 2 +- .../i18n/es.po | 13 +++--- .../i18n/pt_BR.po | 10 ++--- .../purchase_order_line_stock_available.pot | 21 ++-------- .../i18n/sl.po | 10 ++--- .../i18n/zh_CN.po | 22 ++++++---- .../static/description/index.html | 42 ++++++++++--------- .../tests/test_purchase.py | 2 +- 9 files changed, 72 insertions(+), 73 deletions(-) diff --git a/purchase_order_line_stock_available/README.rst b/purchase_order_line_stock_available/README.rst index 29b30caaf82..1f8715ffb2e 100644 --- a/purchase_order_line_stock_available/README.rst +++ b/purchase_order_line_stock_available/README.rst @@ -2,10 +2,13 @@ Purchase order line stock available =================================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:e7b843ac5ffb0540581972a7009977fe5c42f59c91538f7fc6002b6c2f94536b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Purchase order line stock available :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/14.0/purchase_order_line_stock_available + :target: https://github.com/OCA/purchase-workflow/tree/15.0/purchase_order_line_stock_available :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-14-0/purchase-workflow-14-0-purchase_order_line_stock_available + :target: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_order_line_stock_available :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/142/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows to view the virtual stock quantity of a product in the purchase order line. @@ -44,8 +47,8 @@ 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 `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -85,6 +88,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_order_line_stock_available/__manifest__.py b/purchase_order_line_stock_available/__manifest__.py index 7b4af89e721..0b40bb1adf7 100644 --- a/purchase_order_line_stock_available/__manifest__.py +++ b/purchase_order_line_stock_available/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Purchase order line stock available", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "license": "AGPL-3", "author": "AvanzOSC," "Tecnativa," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/purchase-workflow", diff --git a/purchase_order_line_stock_available/i18n/es.po b/purchase_order_line_stock_available/i18n/es.po index b1e76194f5f..5a8731def4e 100644 --- a/purchase_order_line_stock_available/i18n/es.po +++ b/purchase_order_line_stock_available/i18n/es.po @@ -17,11 +17,6 @@ msgstr "" "Plural-Forms: \n" "X-Generator: Poedit 1.5.4\n" -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available -msgid "Forecast Quantity" -msgstr "Cantidad Prevista" - #. module: purchase_order_line_stock_available #: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" @@ -42,7 +37,15 @@ msgstr "" "En cualquiero otro caso, te añade las cantidades existentes en todas las " "ubicaciones de tipo interno." +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "Forecasted Quantity" +msgstr "" + #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" msgstr "Línea pedido de compra" + +#~ msgid "Forecast Quantity" +#~ msgstr "Cantidad Prevista" diff --git a/purchase_order_line_stock_available/i18n/pt_BR.po b/purchase_order_line_stock_available/i18n/pt_BR.po index fbfa712663c..7adba4e2edd 100644 --- a/purchase_order_line_stock_available/i18n/pt_BR.po +++ b/purchase_order_line_stock_available/i18n/pt_BR.po @@ -19,11 +19,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available -msgid "Forecast Quantity" -msgstr "" - #. module: purchase_order_line_stock_available #: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" @@ -36,6 +31,11 @@ msgid "" "type." msgstr "" +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "Forecasted Quantity" +msgstr "" + #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" diff --git a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot index fd3e7c2905b..66b8edaea61 100644 --- a/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot +++ b/purchase_order_line_stock_available/i18n/purchase_order_line_stock_available.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,16 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__display_name -msgid "Display Name" -msgstr "" - -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available -msgid "Forecast Quantity" -msgstr "" - #. module: purchase_order_line_stock_available #: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" @@ -33,13 +23,8 @@ msgid "" msgstr "" #. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__id -msgid "ID" -msgstr "" - -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line____last_update -msgid "Last Modified on" +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "Forecasted Quantity" msgstr "" #. module: purchase_order_line_stock_available diff --git a/purchase_order_line_stock_available/i18n/sl.po b/purchase_order_line_stock_available/i18n/sl.po index dce249f1f6c..faf5daab0e0 100644 --- a/purchase_order_line_stock_available/i18n/sl.po +++ b/purchase_order_line_stock_available/i18n/sl.po @@ -19,11 +19,6 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available -msgid "Forecast Quantity" -msgstr "" - #. module: purchase_order_line_stock_available #: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" @@ -36,6 +31,11 @@ msgid "" "type." msgstr "" +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "Forecasted Quantity" +msgstr "" + #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" diff --git a/purchase_order_line_stock_available/i18n/zh_CN.po b/purchase_order_line_stock_available/i18n/zh_CN.po index 28b2390f867..78754fd7cf3 100644 --- a/purchase_order_line_stock_available/i18n/zh_CN.po +++ b/purchase_order_line_stock_available/i18n/zh_CN.po @@ -16,21 +16,27 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 4.3.2\n" -#. module: purchase_order_line_stock_available -#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available -msgid "Forecast Quantity" -msgstr "预测库存" - #. module: purchase_order_line_stock_available #: model:ir.model.fields,help:purchase_order_line_stock_available.field_purchase_order_line__virtual_available msgid "" "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" -"In a context with a single Stock Location, this includes goods stored in this location, or any of its children.\n" -"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" -"Otherwise, this includes goods stored in any Stock Location with 'internal' type." +"In a context with a single Stock Location, this includes goods stored in " +"this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the " +"Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' " +"type." +msgstr "" + +#. module: purchase_order_line_stock_available +#: model:ir.model.fields,field_description:purchase_order_line_stock_available.field_purchase_order_line__virtual_available +msgid "Forecasted Quantity" msgstr "" #. module: purchase_order_line_stock_available #: model:ir.model,name:purchase_order_line_stock_available.model_purchase_order_line msgid "Purchase Order Line" msgstr "采购订单明细" + +#~ msgid "Forecast Quantity" +#~ msgstr "预测库存" diff --git a/purchase_order_line_stock_available/static/description/index.html b/purchase_order_line_stock_available/static/description/index.html index c928d4132d3..6721107dd4a 100644 --- a/purchase_order_line_stock_available/static/description/index.html +++ b/purchase_order_line_stock_available/static/description/index.html @@ -1,20 +1,20 @@ - + - + Purchase order line stock available