diff --git a/stock_request_picking_type/README.rst b/stock_request_picking_type/README.rst new file mode 100644 index 00000000..903f08d6 --- /dev/null +++ b/stock_request_picking_type/README.rst @@ -0,0 +1,97 @@ +========================== +Stock Request Picking Type +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ee201635a3febbcba6e6023c0a23b866ec29c66e143a839b7bd41970e6a2ce46 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--request-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-request/tree/17.0/stock_request_picking_type + :alt: OCA/stock-logistics-request +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-request-17-0/stock-logistics-request-17-0-stock_request_picking_type + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-request&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds stock request orders within the Inventory app with a +new operation type. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +- Go to Inventory +- Click on the Stock Request Orders tile to process stock requests +- You can also go to Inventory > Operations > Stock Request Orders + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Open Source Integrators + +Contributors +------------ + +- Maxime Chambreuil +- Pimolnat Suntian +- Raphael Lee +- [APSL-Nagarro](https://apsl.tech): + + - Antoni Marroig + +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. + +.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 + +Current `maintainer `__: + +|maintainer-max3903| + +This module is part of the `OCA/stock-logistics-request `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_request_picking_type/__init__.py b/stock_request_picking_type/__init__.py new file mode 100644 index 00000000..dbf87a2f --- /dev/null +++ b/stock_request_picking_type/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from . import models diff --git a/stock_request_picking_type/__manifest__.py b/stock_request_picking_type/__manifest__.py new file mode 100644 index 00000000..bfd819d2 --- /dev/null +++ b/stock_request_picking_type/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +{ + "name": "Stock Request Picking Type", + "summary": "Add Stock Requests to the Inventory App", + "version": "17.0.1.0.0", + "license": "LGPL-3", + "website": "https://github.com/OCA/stock-logistics-request", + "author": "Open Source Integrators, Odoo Community Association (OCA)", + "category": "Warehouse", + "depends": ["stock_request"], + "data": [ + "data/stock_picking_type.xml", + "views/stock_request_order_views.xml", + "views/stock_picking_views.xml", + ], + "development_status": "Beta", + "maintainers": ["max3903"], +} diff --git a/stock_request_picking_type/data/stock_picking_type.xml b/stock_request_picking_type/data/stock_picking_type.xml new file mode 100644 index 00000000..136e087d --- /dev/null +++ b/stock_request_picking_type/data/stock_picking_type.xml @@ -0,0 +1,8 @@ + + + Stock Requests + + stock_request_order + SRO + + diff --git a/stock_request_picking_type/i18n/es.po b/stock_request_picking_type/i18n/es.po new file mode 100644 index 00000000..445e4850 --- /dev/null +++ b/stock_request_picking_type/i18n/es.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_picking_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-01-17 05:13+0000\n" +"Last-Translator: Nelson Ramírez Sánchez \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "" +"" +msgstr "" +"" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "New" +msgstr "Nuevo" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "View" +msgstr "Ver" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "All" +msgstr "Todo" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__display_name +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Done" +msgstr "Hecho" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__id +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__id +msgid "ID" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_open +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "In Progress" +msgstr "En Progreso" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type____last_update +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_late +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Late" +msgstr "Tarde" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_order_search +msgid "Operation Type" +msgstr "Tipo de Operación" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_picking_type +msgid "Picking Type" +msgstr "Tipo de Picking" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Settings" +msgstr "Configuración" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model:ir.model.fields.selection,name:stock_request_picking_type.selection__stock_picking_type__code__stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Stock Request Order" +msgstr "Pedido de Solicitud de Stock" + +#. module: stock_request_picking_type +#: model:ir.actions.act_window,name:stock_request_picking_type.action_picking_dashboard +#: model:ir.actions.act_window,name:stock_request_picking_type.action_stock_request_order_form +#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request_order +msgid "Stock Request Orders" +msgstr "Pedidos de Solicitud de Stock" + +#. module: stock_request_picking_type +#: model:stock.picking.type,name:stock_request_picking_type.stock_request_order +msgid "Stock Requests" +msgstr "Solicitudes de Stock" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_todo +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Do" +msgstr "Por Hacer" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Process" +msgstr "A Procesar" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__code +msgid "Type of Operation" +msgstr "Tipo de Operación" + +#~ msgid "Customers" +#~ msgstr "Clientes" + +#~ msgid "Expected Date" +#~ msgstr "Fecha Esperada" + +#~ msgid "Expected Date by Month" +#~ msgstr "Fecha Esperada por Mes" + +#~ msgid "Group By..." +#~ msgstr "Agrupar por..." + +#~ msgid "Internal" +#~ msgstr "Interno" + +#~ msgid "Late Stock Requests" +#~ msgstr "Solicitudes de Stock Tardías" + +#~ msgid "Manufacturing Operation" +#~ msgstr "Operación de Fabricación" + +#~ msgid "Search Stock Request Orders" +#~ msgstr "Buscar Pedidos de Solicitud de Stock" + +#~ msgid "State" +#~ msgstr "Estado" + +#~ msgid "Stock Requests To Do." +#~ msgstr "Solicitudes de acciones para hacer." + +#~ msgid "Stock Requests in Progress." +#~ msgstr "Solicitudes de stock en curso." + +#~ msgid "Vendors" +#~ msgstr "Proveedores" diff --git a/stock_request_picking_type/i18n/it.po b/stock_request_picking_type/i18n/it.po new file mode 100644 index 00000000..e4c554bd --- /dev/null +++ b/stock_request_picking_type/i18n/it.po @@ -0,0 +1,121 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_picking_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "New" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "View" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "All" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__display_name +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Done" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__id +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__id +msgid "ID" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_open +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "In Progress" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type____last_update +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_late +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Late" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_order_search +msgid "Operation Type" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_picking_type +msgid "Picking Type" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Settings" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model:ir.model.fields.selection,name:stock_request_picking_type.selection__stock_picking_type__code__stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Stock Request Order" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.actions.act_window,name:stock_request_picking_type.action_picking_dashboard +#: model:ir.actions.act_window,name:stock_request_picking_type.action_stock_request_order_form +#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request_order +msgid "Stock Request Orders" +msgstr "" + +#. module: stock_request_picking_type +#: model:stock.picking.type,name:stock_request_picking_type.stock_request_order +msgid "Stock Requests" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_todo +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Do" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Process" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__code +msgid "Type of Operation" +msgstr "" diff --git a/stock_request_picking_type/i18n/pt_BR.po b/stock_request_picking_type/i18n/pt_BR.po new file mode 100644 index 00000000..eecd1821 --- /dev/null +++ b/stock_request_picking_type/i18n/pt_BR.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_picking_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-24 18:22+0000\n" +"Last-Translator: Marcel Savegnago \n" +"Language-Team: none\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "" +"" +msgstr "" +"" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "New" +msgstr "Novo" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "View" +msgstr "Visualizar" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "All" +msgstr "Tudo" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__display_name +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Done" +msgstr "Concluído" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__id +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__id +msgid "ID" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_open +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "In Progress" +msgstr "Em Andamento" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type____last_update +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_late +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Late" +msgstr "Atrasado" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_order_search +msgid "Operation Type" +msgstr "Tipo da Operação" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_picking_type +msgid "Picking Type" +msgstr "Tipo de Separação" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Settings" +msgstr "Configurações" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model:ir.model.fields.selection,name:stock_request_picking_type.selection__stock_picking_type__code__stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Stock Request Order" +msgstr "Ordens de Requisição de Estoque" + +#. module: stock_request_picking_type +#: model:ir.actions.act_window,name:stock_request_picking_type.action_picking_dashboard +#: model:ir.actions.act_window,name:stock_request_picking_type.action_stock_request_order_form +#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request_order +msgid "Stock Request Orders" +msgstr "Ordens de Requisição de Estoque" + +#. module: stock_request_picking_type +#: model:stock.picking.type,name:stock_request_picking_type.stock_request_order +msgid "Stock Requests" +msgstr "Requisições de Estoque" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_todo +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Do" +msgstr "A Fazer" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Process" +msgstr "Para Processar" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__code +msgid "Type of Operation" +msgstr "Tipo de Operação" + +#~ msgid "Customers" +#~ msgstr "Clientes" + +#~ msgid "Expected Date" +#~ msgstr "Data Prevista" + +#~ msgid "Expected Date by Month" +#~ msgstr "Data Prevista por Mês" + +#~ msgid "Group By..." +#~ msgstr "Agrupar por..." + +#~ msgid "Internal" +#~ msgstr "Interno" + +#~ msgid "Late Stock Requests" +#~ msgstr "Requisições de Estoque em Atrasado" + +#~ msgid "Manufacturing Operation" +#~ msgstr "Operação de Fabricação" + +#~ msgid "Search Stock Request Orders" +#~ msgstr "Pesquisar Ordens de Requisição de Estoque" + +#~ msgid "State" +#~ msgstr "Estado" + +#~ msgid "Stock Requests To Do." +#~ msgstr "Requisições de Estoque A Fazer." + +#~ msgid "Stock Requests in Progress." +#~ msgstr "Requisições de Estoque em Andamento." + +#~ msgid "Vendors" +#~ msgstr "Fornecedores" diff --git a/stock_request_picking_type/i18n/stock_request_picking_type.pot b/stock_request_picking_type/i18n/stock_request_picking_type.pot new file mode 100644 index 00000000..184aa8b7 --- /dev/null +++ b/stock_request_picking_type/i18n/stock_request_picking_type.pot @@ -0,0 +1,102 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_picking_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "New" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "View" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "All" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Done" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_open +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "In Progress" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_late +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Late" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_order_search +msgid "Operation Type" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_picking_type +msgid "Picking Type" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Settings" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model:ir.model.fields.selection,name:stock_request_picking_type.selection__stock_picking_type__code__stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Stock Request Order" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.actions.act_window,name:stock_request_picking_type.action_picking_dashboard +#: model:ir.actions.act_window,name:stock_request_picking_type.action_stock_request_order_form +#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request_order +msgid "Stock Request Orders" +msgstr "" + +#. module: stock_request_picking_type +#: model:stock.picking.type,name:stock_request_picking_type.stock_request_order +msgid "Stock Requests" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_todo +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Do" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Process" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__code +msgid "Type of Operation" +msgstr "" diff --git a/stock_request_picking_type/i18n/zh_CN.po b/stock_request_picking_type/i18n/zh_CN.po new file mode 100644 index 00000000..ca9fa5a1 --- /dev/null +++ b/stock_request_picking_type/i18n/zh_CN.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_picking_type +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-10-16 15:58+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\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 3.8\n" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "" +"" +msgstr "" +"" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "New" +msgstr "新建" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "View" +msgstr "视图" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "All" +msgstr "所有" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__display_name +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Done" +msgstr "完成" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__id +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__id +msgid "ID" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_open +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "In Progress" +msgstr "进行中" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type____last_update +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_late +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Late" +msgstr "迟到" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_order_search +msgid "Operation Type" +msgstr "作业类型" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_picking_type +msgid "Picking Type" +msgstr "拣货类型" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Settings" +msgstr "设置" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model:ir.model.fields.selection,name:stock_request_picking_type.selection__stock_picking_type__code__stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Stock Request Order" +msgstr "库存请求单" + +#. module: stock_request_picking_type +#: model:ir.actions.act_window,name:stock_request_picking_type.action_picking_dashboard +#: model:ir.actions.act_window,name:stock_request_picking_type.action_stock_request_order_form +#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request_order +msgid "Stock Request Orders" +msgstr "库存请求单" + +#. module: stock_request_picking_type +#: model:stock.picking.type,name:stock_request_picking_type.stock_request_order +msgid "Stock Requests" +msgstr "库存请求" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__count_sr_todo +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Do" +msgstr "去做" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "To Process" +msgstr "处理" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_picking_type__code +msgid "Type of Operation" +msgstr "作业的类型" + +#~ msgid "Customers" +#~ msgstr "客户" + +#~ msgid "Expected Date" +#~ msgstr "预计日期" + +#~ msgid "Expected Date by Month" +#~ msgstr "每月预期日期" + +#~ msgid "Group By..." +#~ msgstr "分组..." + +#~ msgid "Internal" +#~ msgstr "内部" + +#~ msgid "Late Stock Requests" +#~ msgstr "迟到的库存请求" + +#~ msgid "Manufacturing Operation" +#~ msgstr "制造作业" + +#~ msgid "Search Stock Request Orders" +#~ msgstr "搜索库存请求单" + +#~ msgid "State" +#~ msgstr "状态" + +#~ msgid "Stock Requests To Do." +#~ msgstr "库存请求去做。" + +#~ msgid "Stock Requests in Progress." +#~ msgstr "库存请求正在进行中。" + +#~ msgid "Vendors" +#~ msgstr "供应商" diff --git a/stock_request_picking_type/models/__init__.py b/stock_request_picking_type/models/__init__.py new file mode 100644 index 00000000..bed61e44 --- /dev/null +++ b/stock_request_picking_type/models/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from . import stock_request_order +from . import stock_picking_type diff --git a/stock_request_picking_type/models/stock_picking_type.py b/stock_request_picking_type/models/stock_picking_type.py new file mode 100644 index 00000000..85e8e174 --- /dev/null +++ b/stock_request_picking_type/models/stock_picking_type.py @@ -0,0 +1,57 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class StockPickingType(models.Model): + _inherit = "stock.picking.type" + + code = fields.Selection( + selection_add=[("stock_request_order", "Stock Request Order")], + ondelete={"stock_request_order": "cascade"}, + ) + count_sr_todo = fields.Integer(string="To Do", compute="_compute_sr_count") + count_sr_open = fields.Integer(string="In Progress", compute="_compute_sr_count") + count_sr_late = fields.Integer(string="Late", compute="_compute_sr_count") + + def _compute_sr_count(self): + domains = { + "count_sr_todo": [("state", "=", "submitted")], + "count_sr_open": [("state", "=", "open")], + "count_sr_late": [ + ("expected_date", "<", fields.Date.today()), + ("state", "in", ("submitted", "open")), + ], + } + for field in domains: + data = self.env["stock.request.order"].read_group( + domains[field] + + [ + ("state", "not in", ("done", "cancel")), + ("picking_type_id", "in", self.ids), + ], + ["picking_type_id"], + ["picking_type_id"], + ) + count = { + x["picking_type_id"] and x["picking_type_id"][0]: x[ + "picking_type_id_count" + ] + for x in data + } + for record in self: + record[field] = count.get(record.id, 0) + + def get_stock_request_order_picking_type_action(self): + return self._get_action("stock_request_picking_type.action_picking_dashboard") + + @api.depends("code") + def _compute_show_picking_type(self): + for record in self: + record.show_picking_type = record.code in [ + "incoming", + "outgoing", + "internal", + "stock_request_order", + ] diff --git a/stock_request_picking_type/models/stock_request_order.py b/stock_request_picking_type/models/stock_request_order.py new file mode 100644 index 00000000..9782f292 --- /dev/null +++ b/stock_request_picking_type/models/stock_request_order.py @@ -0,0 +1,37 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class StockRequestOrder(models.Model): + _inherit = "stock.request.order" + + picking_type_id = fields.Many2one( + comodel_name="stock.picking.type", + string="Operation Type", + compute="_compute_picking_type_id", + required=True, + store=True, + readonly=False, + precompute=True, + ) + + @api.depends("warehouse_id") + def _compute_picking_type_id(self): + companies = self.env.context.get("allowed_company_ids", []).copy() + companies.append(False) + for order in self: + order.picking_type_id = ( + self.env["stock.picking.type"] + .search( + [ + ("code", "=", "stock_request_order"), + "|", + ("warehouse_id.company_id", "in", companies), + ("warehouse_id", "=", self.warehouse_id.id or False), + ], + limit=1, + ) + .id + ) diff --git a/stock_request_picking_type/pyproject.toml b/stock_request_picking_type/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/stock_request_picking_type/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_request_picking_type/readme/CONTRIBUTORS.md b/stock_request_picking_type/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..f6a05835 --- /dev/null +++ b/stock_request_picking_type/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- Maxime Chambreuil \<\> +- Pimolnat Suntian \<\> +- Raphael Lee \<\> +- \[APSL-Nagarro\](): + - Antoni Marroig \<\> diff --git a/stock_request_picking_type/readme/DESCRIPTION.md b/stock_request_picking_type/readme/DESCRIPTION.md new file mode 100644 index 00000000..47e39cc1 --- /dev/null +++ b/stock_request_picking_type/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds stock request orders within the Inventory app with a +new operation type. diff --git a/stock_request_picking_type/readme/USAGE.md b/stock_request_picking_type/readme/USAGE.md new file mode 100644 index 00000000..777ae4f8 --- /dev/null +++ b/stock_request_picking_type/readme/USAGE.md @@ -0,0 +1,3 @@ +- Go to Inventory +- Click on the Stock Request Orders tile to process stock requests +- You can also go to Inventory \> Operations \> Stock Request Orders diff --git a/stock_request_picking_type/static/description/icon.png b/stock_request_picking_type/static/description/icon.png new file mode 100644 index 00000000..d4f6a65a Binary files /dev/null and b/stock_request_picking_type/static/description/icon.png differ diff --git a/stock_request_picking_type/static/description/index.html b/stock_request_picking_type/static/description/index.html new file mode 100644 index 00000000..dcec2f76 --- /dev/null +++ b/stock_request_picking_type/static/description/index.html @@ -0,0 +1,438 @@ + + + + + +Stock Request Picking Type + + + +
+

Stock Request Picking Type

+ + +

Beta License: LGPL-3 OCA/stock-logistics-request Translate me on Weblate Try me on Runboat

+

This module adds stock request orders within the Inventory app with a +new operation type.

+

Table of contents

+ +
+

Usage

+
    +
  • Go to Inventory
  • +
  • Click on the Stock Request Orders tile to process stock requests
  • +
  • You can also go to Inventory > Operations > Stock Request Orders
  • +
+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
+
+
+

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.

+

Current maintainer:

+

max3903

+

This module is part of the OCA/stock-logistics-request project on GitHub.

+

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

+
+
+
+ + diff --git a/stock_request_picking_type/tests/__init__.py b/stock_request_picking_type/tests/__init__.py new file mode 100644 index 00000000..c6e97bd0 --- /dev/null +++ b/stock_request_picking_type/tests/__init__.py @@ -0,0 +1,2 @@ +from . import test_stock_request +from . import test_stock_picking_type diff --git a/stock_request_picking_type/tests/test_stock_picking_type.py b/stock_request_picking_type/tests/test_stock_picking_type.py new file mode 100644 index 00000000..d52dd629 --- /dev/null +++ b/stock_request_picking_type/tests/test_stock_picking_type.py @@ -0,0 +1,158 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from dateutil.relativedelta import relativedelta + +from odoo import fields +from odoo.tests import common + + +class TestStockRequest(common.TransactionCase): + @classmethod + def _create_user(cls, name, group_ids, company_ids): + return ( + cls.env["res.users"] + .with_context(**{"no_reset_password": True}) + .create( + { + "name": name, + "password": "demo", + "login": name, + "email": "@".join([name, "test.com"]), + "groups_id": [(6, 0, group_ids)], + "company_ids": [(6, 0, company_ids)], + } + ) + ) + + @classmethod + def _create_product(cls, default_code, name, company_id, **vals): + return cls.env["product.product"].create( + dict( + name=name, + default_code=default_code, + uom_id=cls.env.ref("uom.product_uom_unit").id, + company_id=company_id, + type="product", + **vals, + ) + ) + + @classmethod + def setUpClass(cls): + super().setUpClass() + + # common models + cls.stock_request = cls.env["stock.request"] + cls.request_order = cls.env["stock.request.order"] + + # refs + cls.stock_request_user_group = cls.env.ref( + "stock_request.group_stock_request_user" + ) + cls.stock_request_manager_group = cls.env.ref( + "stock_request.group_stock_request_manager" + ) + cls.main_company = cls.env.ref("base.main_company") + cls.warehouse = cls.env.ref("stock.warehouse0") + cls.categ_unit = cls.env.ref("uom.product_uom_categ_unit") + cls.default_picking_type = cls.env.ref( + "stock_request_picking_type.stock_request_order" + ) + + cls.product = cls._create_product("Shoes", "SH", False) + cls.stock_request_manager = cls._create_user( + "stock_request_manager", + [cls.stock_request_manager_group.id], + [cls.main_company.id], + ) + + cls.ressuply_loc = cls.env["stock.location"].create( + { + "name": "Ressuply", + "location_id": cls.warehouse.view_location_id.id, + "usage": "internal", + "company_id": cls.main_company.id, + } + ) + + cls.route = cls.env["stock.route"].create( + { + "name": "Transfer", + "product_categ_selectable": False, + "product_selectable": True, + "company_id": cls.main_company.id, + "sequence": 10, + } + ) + + cls.rule = cls.env["stock.rule"].create( + { + "name": "Transfer", + "route_id": cls.route.id, + "location_src_id": cls.ressuply_loc.id, + "location_dest_id": cls.warehouse.lot_stock_id.id, + "action": "pull", + "picking_type_id": cls.warehouse.int_type_id.id, + "procure_method": "make_to_stock", + "warehouse_id": cls.warehouse.id, + "company_id": cls.main_company.id, + } + ) + + cls.env["ir.config_parameter"].sudo().set_param( + "stock.no_auto_scheduler", "True" + ) + + +class TestStockPickingType(TestStockRequest): + @classmethod + def setUpClass(cls): + super().setUpClass() + + def test_compute_sr_count(self): + expected_date = fields.Datetime.now() + late_expected_date = fields.Datetime.now() - relativedelta(days=1) + order_vals = { + "company_id": self.main_company.id, + "warehouse_id": self.warehouse.id, + "location_id": self.warehouse.lot_stock_id.id, + "expected_date": expected_date, + "stock_request_ids": [ + ( + 0, + 0, + { + "product_id": self.product.id, + "product_uom_id": self.product.uom_id.id, + "product_uom_qty": 5.0, + "company_id": self.main_company.id, + "warehouse_id": self.warehouse.id, + "location_id": self.warehouse.lot_stock_id.id, + "expected_date": expected_date, + }, + ) + ], + } + + order = self.request_order.with_user(self.stock_request_manager).create( + order_vals + ) + self.product.route_ids = [(6, 0, self.route.ids)] + self.assertEqual(order.picking_type_id.count_sr_todo, 0) + self.assertEqual(order.picking_type_id.count_sr_open, 0) + self.assertEqual(order.picking_type_id.count_sr_late, 0) + + order.with_user(self.stock_request_manager).action_confirm() + order.picking_type_id.sudo()._compute_sr_count() + + # check count_sr_open + self.assertEqual(order.picking_type_id.count_sr_todo, 0) + self.assertEqual(order.picking_type_id.count_sr_open, 1) + self.assertEqual(order.picking_type_id.count_sr_late, 0) + + order.expected_date = late_expected_date + order.picking_type_id.sudo()._compute_sr_count() + self.assertEqual(order.picking_type_id.count_sr_todo, 0) + self.assertEqual(order.picking_type_id.count_sr_open, 1) + self.assertEqual(order.picking_type_id.count_sr_late, 1) diff --git a/stock_request_picking_type/tests/test_stock_request.py b/stock_request_picking_type/tests/test_stock_request.py new file mode 100644 index 00000000..083ad623 --- /dev/null +++ b/stock_request_picking_type/tests/test_stock_request.py @@ -0,0 +1,145 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + + +from odoo import fields +from odoo.tests import Form, common + + +class TestStockRequest(common.TransactionCase): + @classmethod + def _create_user(cls, name, group_ids, company_ids): + return ( + cls.env["res.users"] + .with_context(no_reset_password=True) + .create( + { + "name": name, + "password": "demo", + "login": name, + "email": "@".join([name, "test.com"]), + "groups_id": [(6, 0, group_ids)], + "company_ids": [(6, 0, company_ids)], + } + ) + ) + + @classmethod + def _create_product(cls, default_code, name, company_id, **vals): + return cls.env["product.product"].create( + dict( + name=name, + default_code=default_code, + uom_id=cls.env.ref("uom.product_uom_unit").id, + company_id=company_id, + type="product", + **vals, + ) + ) + + @classmethod + def setUpClass(cls): + super().setUpClass() + + # common models + cls.stock_request = cls.env["stock.request"] + cls.request_order = cls.env["stock.request.order"] + + # refs + cls.stock_request_user_group = cls.env.ref( + "stock_request.group_stock_request_user" + ) + cls.main_company = cls.env.ref("base.main_company") + cls.warehouse = cls.env.ref("stock.warehouse0") + cls.default_picking_type = cls.env.ref( + "stock_request_picking_type.stock_request_order" + ) + + # common data + cls.company_2 = cls.env["res.company"].create( + {"name": "Comp2", "parent_id": cls.main_company.id} + ) + cls.company_2_address = ( + cls.env["res.partner"] + .with_context(company_id=cls.company_2.id) + .create({"name": "Peñiscola"}) + ) + + cls.product = cls._create_product("SH", "Shoes", False) + cls.product_company_2 = cls._create_product("SH_2", "Shoes", cls.company_2.id) + cls.stock_request_user = cls._create_user( + "stock_request_user", + [cls.stock_request_user_group.id], + [cls.main_company.id, cls.company_2.id], + ) + + +class TestStockRequestOrder(TestStockRequest): + @classmethod + def setUpClass(cls): + super().setUpClass() + + def test_onchanges_order(self): + expected_date = fields.Datetime.now() + + wh = ( + self.env["stock.warehouse"] + .with_context(company_id=self.main_company.id) + .create( + { + "name": "Warehouse", + "code": "Warehouse", + "company_id": self.main_company.id, + "partner_id": self.main_company.id, + } + ) + ) + + new_pick_type = ( + self.env["stock.picking.type"] + .with_context(company_id=self.main_company.id) + .create( + { + "name": "Stock Request wh", + "sequence_id": self.env.ref( + "stock_request.seq_stock_request_order" + ).id, + "code": "stock_request_order", + "sequence_code": "SRO", + "warehouse_id": wh.id, + } + ) + ) + + stock_request_order_obj = self.env["stock.request.order"] + vals = { + "company_id": self.main_company.id, + "expected_date": expected_date, + "warehouse_id": self.warehouse.id, + "location_id": self.warehouse.lot_stock_id.id, + } + stock_request_order_new = stock_request_order_obj.new(vals) + + # Test setting warehouse + vals.update( + stock_request_order_new.sudo()._convert_to_write( + { + name: stock_request_order_new[name] + for name in stock_request_order_new._cache + } + ) + ) + vals.update({"warehouse_id": wh.id}) + stock_request_order = stock_request_order_obj.create(vals) + + self.assertEqual(stock_request_order.picking_type_id, new_pick_type) + + def test_create(self): + expected_date = fields.Datetime.now() + form = Form( + self.request_order.with_context(allowed_company_ids=[self.main_company.id]) + ) + form.expected_date = expected_date + + # # test _getdefault_picking_type() + self.assertEqual(form.picking_type_id, self.default_picking_type) diff --git a/stock_request_picking_type/views/stock_picking_views.xml b/stock_request_picking_type/views/stock_picking_views.xml new file mode 100644 index 00000000..5c711d80 --- /dev/null +++ b/stock_request_picking_type/views/stock_picking_views.xml @@ -0,0 +1,215 @@ + + + stock.picking.type.kanban + stock.picking.type + + + + + + + + + + + All + + + All + + + + + To Do + + + Ready + + + + + In Progress + + + Waiting + + + + + Done + + + Operations + + + +
+ +
+
+ + + + + + + + + + + + +
+
+
+
+
+ + + + + +
+ +
+
+ +
+
+
+ code == "stock_request_order" and record.count_picking_backorders.raw_value > 0 +
+
+
+
diff --git a/stock_request_picking_type/views/stock_request_order_views.xml b/stock_request_picking_type/views/stock_request_order_views.xml new file mode 100644 index 00000000..9b132a1e --- /dev/null +++ b/stock_request_picking_type/views/stock_request_order_views.xml @@ -0,0 +1,60 @@ + + + + stock.request.order.search + stock.request.order + + + + + + + + + + stock.request.order.form.picking.type + stock.request.order + + + + + + + + + + Stock Request Orders + ir.actions.act_window + stock.request.order + tree,form + + + [('picking_type_id', '=', active_id)] + + + + Stock Request Orders + ir.actions.act_window + stock.request.order + form + + + + +