From 9d4a551eb75dac6a2c020aae0ebcac4121ec09fe Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Fri, 10 May 2019 18:18:58 -0500 Subject: [PATCH 01/24] [ADD] stock_request_picking_type (#590) [UPD] README.rst [UPD] Update stock_request_picking_type.pot [UPD] README.rst [UPD] Update stock_request_picking_type.pot --- stock_request_picking_type/README.rst | 88 ++++ stock_request_picking_type/__init__.py | 4 + stock_request_picking_type/__manifest__.py | 23 + .../data/stock_picking_type.xml | 11 + .../i18n/stock_request_picking_type.pot | 171 +++++++ stock_request_picking_type/models/__init__.py | 5 + .../models/stock_picking_type.py | 43 ++ .../models/stock_request.py | 21 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 1 + stock_request_picking_type/readme/USAGE.rst | 3 + .../static/description/icon.png | Bin 0 -> 7510 bytes .../static/description/index.html | 430 ++++++++++++++++++ .../views/stock_picking_views.xml | 117 +++++ .../views/stock_request_views.xml | 53 +++ 15 files changed, 971 insertions(+) create mode 100644 stock_request_picking_type/README.rst create mode 100644 stock_request_picking_type/__init__.py create mode 100644 stock_request_picking_type/__manifest__.py create mode 100644 stock_request_picking_type/data/stock_picking_type.xml create mode 100644 stock_request_picking_type/i18n/stock_request_picking_type.pot create mode 100644 stock_request_picking_type/models/__init__.py create mode 100644 stock_request_picking_type/models/stock_picking_type.py create mode 100644 stock_request_picking_type/models/stock_request.py create mode 100644 stock_request_picking_type/readme/CONTRIBUTORS.rst create mode 100644 stock_request_picking_type/readme/DESCRIPTION.rst create mode 100644 stock_request_picking_type/readme/USAGE.rst create mode 100644 stock_request_picking_type/static/description/icon.png create mode 100644 stock_request_picking_type/static/description/index.html create mode 100644 stock_request_picking_type/views/stock_picking_views.xml create mode 100644 stock_request_picking_type/views/stock_request_views.xml diff --git a/stock_request_picking_type/README.rst b/stock_request_picking_type/README.rst new file mode 100644 index 000000000..443e71982 --- /dev/null +++ b/stock_request_picking_type/README.rst @@ -0,0 +1,88 @@ +========================== +Stock Request Picking Type +========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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-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--warehouse-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_request_picking_type + :alt: OCA/stock-logistics-warehouse +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_picking_type + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/153/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds stock requests within the Inventory app with a new operation type. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +* Go to Inventory +* Click on the Stock Requests tile to process stock requests +* You can also go to Inventory > Operations > Stock Requests + +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 +~~~~~~~ + +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Maxime Chambreuil + +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-warehouse `_ 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 000000000..dbf87a2fe --- /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 000000000..bccedbc55 --- /dev/null +++ b/stock_request_picking_type/__manifest__.py @@ -0,0 +1,23 @@ +# 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': '12.0.1.0.0', + 'license': 'LGPL-3', + 'website': 'https://github.com/stock-logistics-warehouse', + 'author': 'Open Source Integrators, ' + 'Odoo Community Association (OCA)', + 'category': 'Warehouse Management', + 'depends': [ + 'stock_request', + ], + 'data': [ + 'data/stock_picking_type.xml', + 'views/stock_request_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 000000000..0c2bca50b --- /dev/null +++ b/stock_request_picking_type/data/stock_picking_type.xml @@ -0,0 +1,11 @@ + + + + + Stock Requests + + stock_request + 0 + + + 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 000000000..e271851d0 --- /dev/null +++ b/stock_request_picking_type/i18n/stock_request_picking_type.pot @@ -0,0 +1,171 @@ +# 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" +"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 +#: selection:stock.picking.type,code:0 +msgid "Customers" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Done" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +msgid "Draft" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Expected Date" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Expected Date by Month" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Group By..." +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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "In Progress" +msgstr "" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Internal" +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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Late" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Late Stock Requests" +msgstr "" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Manufacturing Operation" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request__picking_type_id +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.view_stock_request_filter +msgid "Product" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Search Stock Request" +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_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "State" +msgstr "" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: selection:stock.picking.type,code:0 +msgid "Stock Request" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Stock Requesta in Progress." +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_form +#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request +#: model:stock.picking.type,name:stock_request_picking_type.stock_request +msgid "Stock Requests" +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +msgid "Stock Requests in draft." +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.view_stock_request_filter +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 "" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +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 000000000..1953de94f --- /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 +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 000000000..9c7eb4a13 --- /dev/null +++ b/stock_request_picking_type/models/stock_picking_type.py @@ -0,0 +1,43 @@ +# Copyright 2019 Open Source Integrators +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import fields, models + + +class StockPickingType(models.Model): + _inherit = 'stock.picking.type' + + code = fields.Selection(selection_add=[('stock_request', + 'Stock Request')]) + 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): + types = self.filtered(lambda picking: picking.code == 'stock_request') + if not types: + return + domains = { + 'count_sr_todo': [('state', '=', 'draft')], + 'count_sr_open': [('state', '=', 'open')], + 'count_sr_late': [('expected_date', '<', fields.Date.today()), + ('state', 'in', ('draft', 'open'))], + } + for field in domains: + data = self.env['stock.request'].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 types: + record[field] = count.get(record.id, 0) + + def get_stock_request_picking_type_action(self): + return self._get_action( + 'stock_request_picking_type.action_picking_dashboard') diff --git a/stock_request_picking_type/models/stock_request.py b/stock_request_picking_type/models/stock_request.py new file mode 100644 index 000000000..f37e82dd5 --- /dev/null +++ b/stock_request_picking_type/models/stock_request.py @@ -0,0 +1,21 @@ +# 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 StockRequest(models.Model): + _inherit = 'stock.request' + + @api.model + def _get_default_picking_type(self): + return self.env['stock.picking.type'].search([ + ('code', '=', 'stock_request'), + ('warehouse_id.company_id', 'in', + [self.env.context.get('company_id', self.env.user.company_id.id), + False])], + limit=1).id + + picking_type_id = fields.Many2one( + 'stock.picking.type', 'Operation Type', + default=_get_default_picking_type, required=True) diff --git a/stock_request_picking_type/readme/CONTRIBUTORS.rst b/stock_request_picking_type/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..ab792860d --- /dev/null +++ b/stock_request_picking_type/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Maxime Chambreuil diff --git a/stock_request_picking_type/readme/DESCRIPTION.rst b/stock_request_picking_type/readme/DESCRIPTION.rst new file mode 100644 index 000000000..5d16cd18e --- /dev/null +++ b/stock_request_picking_type/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds stock requests within the Inventory app with a new operation type. diff --git a/stock_request_picking_type/readme/USAGE.rst b/stock_request_picking_type/readme/USAGE.rst new file mode 100644 index 000000000..e785e49f6 --- /dev/null +++ b/stock_request_picking_type/readme/USAGE.rst @@ -0,0 +1,3 @@ +* Go to Inventory +* Click on the Stock Requests tile to process stock requests +* You can also go to Inventory > Operations > Stock Requests 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 0000000000000000000000000000000000000000..c31ecfd9f58e3ab7e0ede0f1d56185d51074099c GIT binary patch literal 7510 zcmc(EWmJ@1^e>%52uPRGih$(MgCO0ggp`5|B{d@mNQ_8#3k>ywA}tIxq)OKSQUU@3 z!VD!6gEaTS_r2?X@2C6mu359rv(DaU$8Yab`$QWXYSB=!QxOml(CBDum=X{WI$!-M z$bg=J)hClcL-tfpOM~F@>Q~TKk_z-tdTCq22neVdul|Gt*+^EPlN_#NaG!jcgpyi} zmv2ke3Fu;j-?xCPdp>{u%mYrK?(^&k{Fx)Kp9|cXS4+ph*c?I2LO{UTuA`y$;N|T0 zyuW+S`V;Ifk4}HFV}C~FXSS;QnwW1d08q*cV{GO35dZ|j=C z?n|9uRmeqOsBAP=pdHnevOu*RxgZe)rfU*BW{eLR>PyPRY1(3Yk_7nt4rb>d{ttn4? z-Wp}=@u!AEh(G0R=$ucQi{sK`BSE_X`t^(H`j084LzP&5O^>yiY*&fPjK*4F%GE!y zONT~wp^c~($CB04XHhL*AmT$B1%y8XkvqD(Nwho_V;Of|jR}qtfUaZD18={ux4Z6e zuYk}|1#|vqMO26U@Zsi<3)dcju%ll@5Gp$DLPMRU)5~?BZyQQx05D2od_^X1i0oZ< zSmo#|zzeLLr0i+|Q--2Ix`nURGMD5E@oVP5s8@2TN#H(!QsDQ>kjR!Yj5 zcX64MEB!SM&+*6EY)LK^i_}r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G5b3rmvZmw*jZNKi$xRU~PT93{Ub5Z8;#D(=y^M#YVcDx^r5A=t7 zvNhI*s_b~JAmGG$*2;0RFl;g>`+msfw(R*5Pe*mfah1+~Y=t~_=S}4S?5xP$>#Dko zTT%!*VKKrjqa74{z%_VG@|b1N<+g7dP{(N80n4}+#Ao@;IN%lWTjPNT8+t}KVBxse z!c(q|8^Pm^aIOxCSKA4GHjF(_{#KSAn=w(myKxOl<3+vV1M?R3l7yY{rLg*2VhcW( z7&Q8f0Jxs8xi-Cf;qR8*c zH60^e1`*NFLmi1Tz@c$HSu#+GFftH37S_c!R6wX+^FX%&h14Y{qG7#_d6=>d@&;;B zao4e~{fA2beX{ra#(={h#62;vN=HSJtj4>{yrZGs%hp1ciHuNs=T8>iRhbndx*6MX zq!iNjNF(#Mx>d`5(;f?Z^(JFdUJUOjB<~~r73W*;28OHF-n)tqqkSuwpCp9=o1Jd9 z4t@-rdkBlVkNLgHr2a~@YI~IvYYe=Z5O1mK86>Cc-?fEh2n zt5V!Y{a7V??1@=BG zQEy(Y#hKM|pzL`C3uI@5%XEyoi_J1ofcB?75*^74l)uRW(L4XNMV3cN{jT=nmIg6k z&48ql2#Wv!Q9}|E(X6zc4w%cT+{AoRujxX7y8R;^6$g8?2&9~Wb0(16pFr$@-&sH; z&XI&pqY_gs&rdg$NumMaPYV2IWlM4QuXF&+EYVUQ4J*|6y1f@LLu|aG61K=e3m6%N zbQ}wI(ro?8oF~QLoiulGue_`83UH=ggH+cQCzIYgN9ExKb^^qeU4X+3P~I#%Z8jo) zallVHz+A+#^>D5+@TRxYjn=GH5wi4^WQI_E?E32k-dY?22sFp2g| qJBnmc1b^FaQP%UBXsGmY2o3DoX1di35AfVcpmX0)qw1dh>;DBm+(G~V literal 0 HcmV?d00001 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 000000000..75ca00260 --- /dev/null +++ b/stock_request_picking_type/static/description/index.html @@ -0,0 +1,430 @@ + + + + + + +Stock Request Picking Type + + + +
+

Stock Request Picking Type

+ + +

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

This module adds stock requests within the Inventory app with a new operation type.

+

Table of contents

+ +
+

Usage

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

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

+
    +
  • Open Source Integrators
  • +
+
+ +
+

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-warehouse 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/views/stock_picking_views.xml b/stock_request_picking_type/views/stock_picking_views.xml new file mode 100644 index 000000000..01e9a511e --- /dev/null +++ b/stock_request_picking_type/views/stock_picking_views.xml @@ -0,0 +1,117 @@ + + + + + stock.picking.type.kanban + stock.picking.type + + + + + + + + + +
+
+
+
+ + + +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+ + + Operation Types + stock.picking.type + + + + {"invisible": [("code", "=", "stock_request")]} + + + {"invisible": [("code", "=", "stock_request")]} + + + + +
diff --git a/stock_request_picking_type/views/stock_request_views.xml b/stock_request_picking_type/views/stock_request_views.xml new file mode 100644 index 000000000..fff0146fe --- /dev/null +++ b/stock_request_picking_type/views/stock_request_views.xml @@ -0,0 +1,53 @@ + + + + + stock.request.select + stock.request + + + + + + + + + + + + + + + + + + + Stock Requests + ir.actions.act_window + stock.request + form + tree,form + + + [('picking_type_id', '=', active_id)] + {'default_picking_type_id': active_id} + + + + Stock Requests + ir.actions.act_window + stock.request + form + form + + + + + From 27beb973d3c8be0cbb930a7534d5c4aa47ae93d6 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Tue, 28 May 2019 08:59:38 -0500 Subject: [PATCH 02/24] [IMP] stock_request_picking_type: Use Submitted state --- stock_request_picking_type/models/stock_picking_type.py | 4 ++-- stock_request_picking_type/views/stock_picking_views.xml | 2 +- stock_request_picking_type/views/stock_request_views.xml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stock_request_picking_type/models/stock_picking_type.py b/stock_request_picking_type/models/stock_picking_type.py index 9c7eb4a13..66af76884 100644 --- a/stock_request_picking_type/models/stock_picking_type.py +++ b/stock_request_picking_type/models/stock_picking_type.py @@ -21,10 +21,10 @@ class StockPickingType(models.Model): if not types: return domains = { - 'count_sr_todo': [('state', '=', 'draft')], + 'count_sr_todo': [('state', '=', 'submitted')], 'count_sr_open': [('state', '=', 'open')], 'count_sr_late': [('expected_date', '<', fields.Date.today()), - ('state', 'in', ('draft', 'open'))], + ('state', 'in', ('submitted', 'open'))], } for field in domains: data = self.env['stock.request'].read_group( diff --git a/stock_request_picking_type/views/stock_picking_views.xml b/stock_request_picking_type/views/stock_picking_views.xml index 01e9a511e..628041667 100644 --- a/stock_request_picking_type/views/stock_picking_views.xml +++ b/stock_request_picking_type/views/stock_picking_views.xml @@ -66,7 +66,7 @@ All
- Draft + To Do
In Progress diff --git a/stock_request_picking_type/views/stock_request_views.xml b/stock_request_picking_type/views/stock_request_views.xml index fff0146fe..5ba1d9b5f 100644 --- a/stock_request_picking_type/views/stock_request_views.xml +++ b/stock_request_picking_type/views/stock_request_views.xml @@ -8,11 +8,11 @@ - + - + From 58412bf4ac5adb78c82060c259803c745c52f861 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Tue, 28 May 2019 09:19:24 -0500 Subject: [PATCH 03/24] [IMP] Bump version --- stock_request_picking_type/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_request_picking_type/__manifest__.py b/stock_request_picking_type/__manifest__.py index bccedbc55..abba854be 100644 --- a/stock_request_picking_type/__manifest__.py +++ b/stock_request_picking_type/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Stock Request Picking Type', 'summary': 'Add Stock Requests to the Inventory App', - 'version': '12.0.1.0.0', + 'version': '12.0.1.1.0', 'license': 'LGPL-3', 'website': 'https://github.com/stock-logistics-warehouse', 'author': 'Open Source Integrators, ' From a96d9c3c4841ca8aed2facb5e941e9f81542e472 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Mon, 8 Jul 2019 20:03:20 -0500 Subject: [PATCH 04/24] [FIX] stock_request_picking_type --- stock_request_picking_type/__manifest__.py | 4 +-- .../data/stock_picking_type.xml | 7 ++--- .../migrations/12.0.2.0.0/pre-migration.py | 14 +++++++++ stock_request_picking_type/models/__init__.py | 2 +- .../models/stock_picking_type.py | 11 +++---- ...tock_request.py => stock_request_order.py} | 6 ++-- .../readme/DESCRIPTION.rst | 2 +- stock_request_picking_type/readme/USAGE.rst | 4 +-- .../views/stock_picking_views.xml | 14 ++++----- ...iews.xml => stock_request_order_views.xml} | 29 +++++++++---------- 10 files changed, 52 insertions(+), 41 deletions(-) create mode 100644 stock_request_picking_type/migrations/12.0.2.0.0/pre-migration.py rename stock_request_picking_type/models/{stock_request.py => stock_request_order.py} (82%) rename stock_request_picking_type/views/{stock_request_views.xml => stock_request_order_views.xml} (66%) diff --git a/stock_request_picking_type/__manifest__.py b/stock_request_picking_type/__manifest__.py index abba854be..8d868e7cb 100644 --- a/stock_request_picking_type/__manifest__.py +++ b/stock_request_picking_type/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Stock Request Picking Type', 'summary': 'Add Stock Requests to the Inventory App', - 'version': '12.0.1.1.0', + 'version': '12.0.2.0.0', 'license': 'LGPL-3', 'website': 'https://github.com/stock-logistics-warehouse', 'author': 'Open Source Integrators, ' @@ -15,7 +15,7 @@ ], 'data': [ 'data/stock_picking_type.xml', - 'views/stock_request_views.xml', + 'views/stock_request_order_views.xml', 'views/stock_picking_views.xml', ], 'development_status': 'Beta', diff --git a/stock_request_picking_type/data/stock_picking_type.xml b/stock_request_picking_type/data/stock_picking_type.xml index 0c2bca50b..3876c66a4 100644 --- a/stock_request_picking_type/data/stock_picking_type.xml +++ b/stock_request_picking_type/data/stock_picking_type.xml @@ -1,10 +1,9 @@ - - + Stock Requests - - stock_request + + stock_request_order 0 diff --git a/stock_request_picking_type/migrations/12.0.2.0.0/pre-migration.py b/stock_request_picking_type/migrations/12.0.2.0.0/pre-migration.py new file mode 100644 index 000000000..2a9d38e06 --- /dev/null +++ b/stock_request_picking_type/migrations/12.0.2.0.0/pre-migration.py @@ -0,0 +1,14 @@ +# Copyright (C) 2019 Open Source Integrators +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + + +def migrate(env, version): + if not version: + return + + env.execute("UPDATE stock_request_order " + "SET picking_type_id = (" + "SELECT id " + "FROM stock_picking_type " + "WHERE code = 'stock_request_order') " + "WHERE picking_type_id IS NULL;") diff --git a/stock_request_picking_type/models/__init__.py b/stock_request_picking_type/models/__init__.py index 1953de94f..bed61e447 100644 --- a/stock_request_picking_type/models/__init__.py +++ b/stock_request_picking_type/models/__init__.py @@ -1,5 +1,5 @@ # Copyright 2019 Open Source Integrators # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -from . import stock_request +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 index 66af76884..47fa48ea3 100644 --- a/stock_request_picking_type/models/stock_picking_type.py +++ b/stock_request_picking_type/models/stock_picking_type.py @@ -7,8 +7,8 @@ from odoo import fields, models class StockPickingType(models.Model): _inherit = 'stock.picking.type' - code = fields.Selection(selection_add=[('stock_request', - 'Stock Request')]) + code = fields.Selection(selection_add=[('stock_request_order', + 'Stock Request Order')]) count_sr_todo = fields.Integer(string="To Do", compute='_compute_sr_count') count_sr_open = fields.Integer(string="In Progress", @@ -17,7 +17,8 @@ class StockPickingType(models.Model): compute='_compute_sr_count') def _compute_sr_count(self): - types = self.filtered(lambda picking: picking.code == 'stock_request') + types = self.filtered( + lambda picking: picking.code == 'stock_request_order') if not types: return domains = { @@ -27,7 +28,7 @@ class StockPickingType(models.Model): ('state', 'in', ('submitted', 'open'))], } for field in domains: - data = self.env['stock.request'].read_group( + data = self.env['stock.request.order'].read_group( domains[field] + [('state', 'not in', ('done', 'cancel')), ('picking_type_id', 'in', self.ids)], @@ -38,6 +39,6 @@ class StockPickingType(models.Model): for record in types: record[field] = count.get(record.id, 0) - def get_stock_request_picking_type_action(self): + def get_stock_request_order_picking_type_action(self): return self._get_action( 'stock_request_picking_type.action_picking_dashboard') diff --git a/stock_request_picking_type/models/stock_request.py b/stock_request_picking_type/models/stock_request_order.py similarity index 82% rename from stock_request_picking_type/models/stock_request.py rename to stock_request_picking_type/models/stock_request_order.py index f37e82dd5..984aad6a6 100644 --- a/stock_request_picking_type/models/stock_request.py +++ b/stock_request_picking_type/models/stock_request_order.py @@ -4,13 +4,13 @@ from odoo import api, fields, models -class StockRequest(models.Model): - _inherit = 'stock.request' +class StockRequestOrder(models.Model): + _inherit = 'stock.request.order' @api.model def _get_default_picking_type(self): return self.env['stock.picking.type'].search([ - ('code', '=', 'stock_request'), + ('code', '=', 'stock_request_order'), ('warehouse_id.company_id', 'in', [self.env.context.get('company_id', self.env.user.company_id.id), False])], diff --git a/stock_request_picking_type/readme/DESCRIPTION.rst b/stock_request_picking_type/readme/DESCRIPTION.rst index 5d16cd18e..0173f58f4 100644 --- a/stock_request_picking_type/readme/DESCRIPTION.rst +++ b/stock_request_picking_type/readme/DESCRIPTION.rst @@ -1 +1 @@ -This module adds stock requests within the Inventory app with a new operation type. +This module adds stock request orders within the Inventory app with a new operation type. diff --git a/stock_request_picking_type/readme/USAGE.rst b/stock_request_picking_type/readme/USAGE.rst index e785e49f6..a2807118d 100644 --- a/stock_request_picking_type/readme/USAGE.rst +++ b/stock_request_picking_type/readme/USAGE.rst @@ -1,3 +1,3 @@ * Go to Inventory -* Click on the Stock Requests tile to process stock requests -* You can also go to Inventory > Operations > Stock Requests +* 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/views/stock_picking_views.xml b/stock_request_picking_type/views/stock_picking_views.xml index 628041667..41f55ef1e 100644 --- a/stock_request_picking_type/views/stock_picking_views.xml +++ b/stock_request_picking_type/views/stock_picking_views.xml @@ -13,11 +13,11 @@ -
+
- +
@@ -30,7 +30,7 @@
@@ -80,7 +80,7 @@ New
@@ -100,16 +100,16 @@ - + Operation Types stock.picking.type - {"invisible": [("code", "=", "stock_request")]} + {"invisible": [("code", "=", "stock_request_order")]} - {"invisible": [("code", "=", "stock_request")]} + {"invisible": [("code", "=", "stock_request_order")]} diff --git a/stock_request_picking_type/views/stock_request_views.xml b/stock_request_picking_type/views/stock_request_order_views.xml similarity index 66% rename from stock_request_picking_type/views/stock_request_views.xml rename to stock_request_picking_type/views/stock_request_order_views.xml index 5ba1d9b5f..9b807c842 100644 --- a/stock_request_picking_type/views/stock_request_views.xml +++ b/stock_request_picking_type/views/stock_request_order_views.xml @@ -1,13 +1,11 @@ - - - stock.request.select - stock.request + + stock.request.order.select + stock.request.order - + - - @@ -25,28 +22,28 @@ - Stock Requests + Stock Request Orders ir.actions.act_window - stock.request + stock.request.order form tree,form - + [('picking_type_id', '=', active_id)] {'default_picking_type_id': active_id} - - Stock Requests + + Stock Request Orders ir.actions.act_window - stock.request + stock.request.order form form - From 80a4f869cfbe656bf9843901591da3c093203227 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Mon, 8 Jul 2019 23:55:04 -0500 Subject: [PATCH 05/24] [REN] stock_request_picking_type: migration script --- .../migrations/12.0.2.0.0/{pre-migration.py => post-migration.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename stock_request_picking_type/migrations/12.0.2.0.0/{pre-migration.py => post-migration.py} (100%) diff --git a/stock_request_picking_type/migrations/12.0.2.0.0/pre-migration.py b/stock_request_picking_type/migrations/12.0.2.0.0/post-migration.py similarity index 100% rename from stock_request_picking_type/migrations/12.0.2.0.0/pre-migration.py rename to stock_request_picking_type/migrations/12.0.2.0.0/post-migration.py From b3b0d4b1ea171fac9bbc48316ab0cf9e9009f886 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Fri, 9 Aug 2019 12:46:09 -0500 Subject: [PATCH 06/24] [FIX] stock_request_picking_type: Depends on stock_request_submit [UPD] Update stock_request_picking_type.pot [UPD] README.rst Added translation using Weblate (Chinese (Simplified)) Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (28 of 28 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_request_picking_type Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_picking_type/zh_CN/ Added translation using Weblate (Spanish) Translated using Weblate (Spanish) Currently translated at 100.0% (28 of 28 strings) Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_request_picking_type Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_picking_type/es/ --- stock_request_picking_type/README.rst | 6 +- stock_request_picking_type/__manifest__.py | 2 +- stock_request_picking_type/i18n/es.po | 170 ++++++++++++++++++ .../i18n/stock_request_picking_type.pot | 63 +++---- stock_request_picking_type/i18n/zh_CN.po | 169 +++++++++++++++++ .../static/description/index.html | 6 +- 6 files changed, 375 insertions(+), 41 deletions(-) create mode 100644 stock_request_picking_type/i18n/es.po create mode 100644 stock_request_picking_type/i18n/zh_CN.po diff --git a/stock_request_picking_type/README.rst b/stock_request_picking_type/README.rst index 443e71982..eef754900 100644 --- a/stock_request_picking_type/README.rst +++ b/stock_request_picking_type/README.rst @@ -25,7 +25,7 @@ Stock Request Picking Type |badge1| |badge2| |badge3| |badge4| |badge5| -This module adds stock requests within the Inventory app with a new operation type. +This module adds stock request orders within the Inventory app with a new operation type. **Table of contents** @@ -36,8 +36,8 @@ Usage ===== * Go to Inventory -* Click on the Stock Requests tile to process stock requests -* You can also go to Inventory > Operations > Stock Requests +* Click on the Stock Request Orders tile to process stock requests +* You can also go to Inventory > Operations > Stock Request Orders Bug Tracker =========== diff --git a/stock_request_picking_type/__manifest__.py b/stock_request_picking_type/__manifest__.py index 8d868e7cb..54d256284 100644 --- a/stock_request_picking_type/__manifest__.py +++ b/stock_request_picking_type/__manifest__.py @@ -11,7 +11,7 @@ 'Odoo Community Association (OCA)', 'category': 'Warehouse Management', 'depends': [ - 'stock_request', + 'stock_request_submit', ], 'data': [ 'data/stock_picking_type.xml', diff --git a/stock_request_picking_type/i18n/es.po b/stock_request_picking_type/i18n/es.po new file mode 100644 index 000000000..13d0f00c4 --- /dev/null +++ b/stock_request_picking_type/i18n/es.po @@ -0,0 +1,170 @@ +# 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 +#: selection:stock.picking.type,code:0 +msgid "Customers" +msgstr "Clientes" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Done" +msgstr "Hecho" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Expected Date" +msgstr "Fecha Esperada" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Expected Date by Month" +msgstr "Fecha Esperada por Mes" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Group By..." +msgstr "Agrupar por..." + +#. 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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "In Progress" +msgstr "En Progreso" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Internal" +msgstr "Interno" + +#. 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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Late" +msgstr "Tarde" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Late Stock Requests" +msgstr "Solicitudes de Stock Tardías" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Manufacturing Operation" +msgstr "Operación de Fabricación" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +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.view_stock_request_order_filter +msgid "Search Stock Request Orders" +msgstr "Buscar Pedidos de Solicitud de Stock" + +#. 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_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "State" +msgstr "Estado" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: selection:stock.picking.type,code:0 +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_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Stock Requests To Do." +msgstr "Solicitudes de acciones para hacer." + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Stock Requests in Progress." +msgstr "Solicitudes de stock en curso." + +#. 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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +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" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Vendors" +msgstr "Proveedores" diff --git a/stock_request_picking_type/i18n/stock_request_picking_type.pot b/stock_request_picking_type/i18n/stock_request_picking_type.pot index e271851d0..589537703 100644 --- a/stock_request_picking_type/i18n/stock_request_picking_type.pot +++ b/stock_request_picking_type/i18n/stock_request_picking_type.pot @@ -40,34 +40,29 @@ msgstr "" #. module: stock_request_picking_type #: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "Done" msgstr "" #. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban -msgid "Draft" -msgstr "" - -#. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "Expected Date" msgstr "" #. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "Expected Date by Month" msgstr "" #. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "Group By..." 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 -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "In Progress" msgstr "" @@ -79,12 +74,12 @@ 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 -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "Late" msgstr "" #. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "Late Stock Requests" msgstr "" @@ -94,7 +89,7 @@ msgid "Manufacturing Operation" msgstr "" #. module: stock_request_picking_type -#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request__picking_type_id +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id msgid "Operation Type" msgstr "" @@ -104,13 +99,8 @@ msgid "Picking Type" msgstr "" #. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter -msgid "Product" -msgstr "" - -#. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter -msgid "Search Stock Request" +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Search Stock Request Orders" msgstr "" #. module: stock_request_picking_type @@ -119,38 +109,43 @@ msgid "Settings" msgstr "" #. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "State" msgstr "" #. module: stock_request_picking_type -#: model:ir.model,name:stock_request_picking_type.model_stock_request +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order #: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban #: selection:stock.picking.type,code:0 -msgid "Stock Request" -msgstr "" - -#. module: stock_request_picking_type -#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter -msgid "Stock Requesta in Progress." +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_form -#: model:ir.ui.menu,name:stock_request_picking_type.menu_stock_request -#: model:stock.picking.type,name:stock_request_picking_type.stock_request +#: 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_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_filter -msgid "Stock Requests in draft." +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Stock Requests To Do." +msgstr "" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Stock Requests in Progress." 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.view_stock_request_filter +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter msgid "To Do" 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 000000000..d4dc37a8e --- /dev/null +++ b/stock_request_picking_type/i18n/zh_CN.po @@ -0,0 +1,169 @@ +# 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 +#: selection:stock.picking.type,code:0 +msgid "Customers" +msgstr "客户" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Done" +msgstr "完成" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Expected Date" +msgstr "预计日期" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Expected Date by Month" +msgstr "每月预期日期" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Group By..." +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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "In Progress" +msgstr "进行中" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Internal" +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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Late" +msgstr "迟到" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Late Stock Requests" +msgstr "迟到的库存请求" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Manufacturing Operation" +msgstr "制造作业" + +#. module: stock_request_picking_type +#: model:ir.model.fields,field_description:stock_request_picking_type.field_stock_request_order__picking_type_id +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.view_stock_request_order_filter +msgid "Search Stock Request Orders" +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_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "State" +msgstr "状态" + +#. module: stock_request_picking_type +#: model:ir.model,name:stock_request_picking_type.model_stock_request_order +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.stock_request_type_kanban +#: selection:stock.picking.type,code:0 +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_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Stock Requests To Do." +msgstr "库存请求去做。" + +#. module: stock_request_picking_type +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +msgid "Stock Requests in Progress." +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 +#: model_terms:ir.ui.view,arch_db:stock_request_picking_type.view_stock_request_order_filter +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 "作业的类型" + +#. module: stock_request_picking_type +#: selection:stock.picking.type,code:0 +msgid "Vendors" +msgstr "供应商" diff --git a/stock_request_picking_type/static/description/index.html b/stock_request_picking_type/static/description/index.html index 75ca00260..d09b4d05d 100644 --- a/stock_request_picking_type/static/description/index.html +++ b/stock_request_picking_type/static/description/index.html @@ -368,7 +368,7 @@ ul.auto-toc { !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

-

This module adds stock requests within the Inventory app with a new operation type.

+

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

Table of contents

    @@ -386,8 +386,8 @@ ul.auto-toc {

    Usage

    • Go to Inventory
    • -
    • Click on the Stock Requests tile to process stock requests
    • -
    • You can also go to Inventory > Operations > Stock Requests
    • +
    • Click on the Stock Request Orders tile to process stock requests
    • +
    • You can also go to Inventory > Operations > Stock Request Orders
From 4de01878a7a74544fc6ee3bac75f142e19fc31f7 Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Fri, 13 Mar 2020 14:57:34 +0700 Subject: [PATCH 07/24] [IMP] stock_request_picking_type: black, isort --- stock_request_picking_type/__manifest__.py | 31 +++++------ .../migrations/12.0.2.0.0/post-migration.py | 14 ++--- .../models/stock_picking_type.py | 54 ++++++++++--------- .../models/stock_request_order.py | 35 ++++++++---- 4 files changed, 77 insertions(+), 57 deletions(-) diff --git a/stock_request_picking_type/__manifest__.py b/stock_request_picking_type/__manifest__.py index 54d256284..2aea55a19 100644 --- a/stock_request_picking_type/__manifest__.py +++ b/stock_request_picking_type/__manifest__.py @@ -2,22 +2,19 @@ # 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': '12.0.2.0.0', - 'license': 'LGPL-3', - 'website': 'https://github.com/stock-logistics-warehouse', - 'author': 'Open Source Integrators, ' - 'Odoo Community Association (OCA)', - 'category': 'Warehouse Management', - 'depends': [ - 'stock_request_submit', + "name": "Stock Request Picking Type", + "summary": "Add Stock Requests to the Inventory App", + "version": "13.0.1.0.0", + "license": "LGPL-3", + "website": "https://github.com/stock-logistics-warehouse", + "author": "Open Source Integrators, " "Odoo Community Association (OCA)", + "category": "Warehouse Management", + "depends": ["stock_request_submit"], + "data": [ + "data/stock_picking_type.xml", + "views/stock_request_order_views.xml", + "views/stock_picking_views.xml", ], - 'data': [ - 'data/stock_picking_type.xml', - 'views/stock_request_order_views.xml', - 'views/stock_picking_views.xml', - ], - 'development_status': 'Beta', - 'maintainers': ['max3903'] + "development_status": "Beta", + "maintainers": ["max3903"], } diff --git a/stock_request_picking_type/migrations/12.0.2.0.0/post-migration.py b/stock_request_picking_type/migrations/12.0.2.0.0/post-migration.py index 2a9d38e06..1e5b9e6e5 100644 --- a/stock_request_picking_type/migrations/12.0.2.0.0/post-migration.py +++ b/stock_request_picking_type/migrations/12.0.2.0.0/post-migration.py @@ -6,9 +6,11 @@ def migrate(env, version): if not version: return - env.execute("UPDATE stock_request_order " - "SET picking_type_id = (" - "SELECT id " - "FROM stock_picking_type " - "WHERE code = 'stock_request_order') " - "WHERE picking_type_id IS NULL;") + env.execute( + "UPDATE stock_request_order " + "SET picking_type_id = (" + "SELECT id " + "FROM stock_picking_type " + "WHERE code = 'stock_request_order') " + "WHERE picking_type_id IS NULL;" + ) diff --git a/stock_request_picking_type/models/stock_picking_type.py b/stock_request_picking_type/models/stock_picking_type.py index 47fa48ea3..3e118f19c 100644 --- a/stock_request_picking_type/models/stock_picking_type.py +++ b/stock_request_picking_type/models/stock_picking_type.py @@ -5,40 +5,44 @@ from odoo import fields, models class StockPickingType(models.Model): - _inherit = 'stock.picking.type' + _inherit = "stock.picking.type" - code = fields.Selection(selection_add=[('stock_request_order', - 'Stock Request Order')]) - 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') + code = fields.Selection( + selection_add=[("stock_request_order", "Stock Request Order")] + ) + 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): - types = self.filtered( - lambda picking: picking.code == 'stock_request_order') + types = self.filtered(lambda picking: picking.code == "stock_request_order") if not types: return domains = { - 'count_sr_todo': [('state', '=', 'submitted')], - 'count_sr_open': [('state', '=', 'open')], - 'count_sr_late': [('expected_date', '<', fields.Date.today()), - ('state', 'in', ('submitted', 'open'))], + "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} + 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 types: 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') + return self._get_action("stock_request_picking_type.action_picking_dashboard") diff --git a/stock_request_picking_type/models/stock_request_order.py b/stock_request_picking_type/models/stock_request_order.py index 984aad6a6..99c3e458a 100644 --- a/stock_request_picking_type/models/stock_request_order.py +++ b/stock_request_picking_type/models/stock_request_order.py @@ -5,17 +5,34 @@ from odoo import api, fields, models class StockRequestOrder(models.Model): - _inherit = 'stock.request.order' + _inherit = "stock.request.order" @api.model def _get_default_picking_type(self): - return self.env['stock.picking.type'].search([ - ('code', '=', 'stock_request_order'), - ('warehouse_id.company_id', 'in', - [self.env.context.get('company_id', self.env.user.company_id.id), - False])], - limit=1).id + return ( + self.env["stock.picking.type"] + .search( + [ + ("code", "=", "stock_request_order"), + ( + "warehouse_id.company_id", + "in", + [ + self.env.context.get( + "company_id", self.env.user.company_id.id + ), + False, + ], + ), + ], + limit=1, + ) + .id + ) picking_type_id = fields.Many2one( - 'stock.picking.type', 'Operation Type', - default=_get_default_picking_type, required=True) + "stock.picking.type", + "Operation Type", + default=_get_default_picking_type, + required=True, + ) From 96431eb1668273f75b31ffab400d012f0fcdbbc8 Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Mon, 26 Oct 2020 16:27:46 +0700 Subject: [PATCH 08/24] [MIG] stock_request_picking_type: Migration to 13.0 --- stock_request_picking_type/README.rst | 11 +- stock_request_picking_type/__manifest__.py | 2 +- .../data/stock_picking_type.xml | 6 +- .../models/stock_picking_type.py | 5 +- .../models/stock_request_order.py | 6 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 +- .../views/stock_picking_views.xml | 189 +++++++++++++----- .../views/stock_request_order_views.xml | 66 +++--- 9 files changed, 194 insertions(+), 99 deletions(-) diff --git a/stock_request_picking_type/README.rst b/stock_request_picking_type/README.rst index eef754900..d1765b87a 100644 --- a/stock_request_picking_type/README.rst +++ b/stock_request_picking_type/README.rst @@ -14,13 +14,13 @@ Stock Request Picking Type :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--warehouse-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_request_picking_type + :target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_request_picking_type :alt: OCA/stock-logistics-warehouse .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_picking_type + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_request_picking_type :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/153/12.0 + :target: https://runbot.odoo-community.org/runbot/153/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. @@ -61,6 +61,7 @@ Contributors ~~~~~~~~~~~~ * Maxime Chambreuil +* Pimolnat Suntian Maintainers ~~~~~~~~~~~ @@ -83,6 +84,6 @@ Current `maintainer `__: |maintainer-max3903| -This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. +This module is part of the `OCA/stock-logistics-warehouse `_ 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/__manifest__.py b/stock_request_picking_type/__manifest__.py index 2aea55a19..dff6907e3 100644 --- a/stock_request_picking_type/__manifest__.py +++ b/stock_request_picking_type/__manifest__.py @@ -7,7 +7,7 @@ "version": "13.0.1.0.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", - "author": "Open Source Integrators, " "Odoo Community Association (OCA)", + "author": "Open Source Integrators, Odoo Community Association (OCA)", "category": "Warehouse Management", "depends": ["stock_request_submit"], "data": [ diff --git a/stock_request_picking_type/data/stock_picking_type.xml b/stock_request_picking_type/data/stock_picking_type.xml index 3876c66a4..136e087d2 100644 --- a/stock_request_picking_type/data/stock_picking_type.xml +++ b/stock_request_picking_type/data/stock_picking_type.xml @@ -1,10 +1,8 @@ - Stock Requests - + stock_request_order - 0 + SRO - diff --git a/stock_request_picking_type/models/stock_picking_type.py b/stock_request_picking_type/models/stock_picking_type.py index 3e118f19c..f1067c24c 100644 --- a/stock_request_picking_type/models/stock_picking_type.py +++ b/stock_request_picking_type/models/stock_picking_type.py @@ -15,9 +15,6 @@ class StockPickingType(models.Model): count_sr_late = fields.Integer(string="Late", compute="_compute_sr_count") def _compute_sr_count(self): - types = self.filtered(lambda picking: picking.code == "stock_request_order") - if not types: - return domains = { "count_sr_todo": [("state", "=", "submitted")], "count_sr_open": [("state", "=", "open")], @@ -41,7 +38,7 @@ class StockPickingType(models.Model): and x["picking_type_id"][0]: x["picking_type_id_count"] for x in data } - for record in types: + for record in self: record[field] = count.get(record.id, 0) def get_stock_request_order_picking_type_action(self): diff --git a/stock_request_picking_type/models/stock_request_order.py b/stock_request_picking_type/models/stock_request_order.py index 99c3e458a..fab245acb 100644 --- a/stock_request_picking_type/models/stock_request_order.py +++ b/stock_request_picking_type/models/stock_request_order.py @@ -19,7 +19,7 @@ class StockRequestOrder(models.Model): "in", [ self.env.context.get( - "company_id", self.env.user.company_id.id + "company_id", self.env.company.id ), False, ], @@ -31,8 +31,8 @@ class StockRequestOrder(models.Model): ) picking_type_id = fields.Many2one( - "stock.picking.type", - "Operation Type", + comodel_name="stock.picking.type", + string="Operation Type", default=_get_default_picking_type, required=True, ) diff --git a/stock_request_picking_type/readme/CONTRIBUTORS.rst b/stock_request_picking_type/readme/CONTRIBUTORS.rst index ab792860d..b3d296d48 100644 --- a/stock_request_picking_type/readme/CONTRIBUTORS.rst +++ b/stock_request_picking_type/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Maxime Chambreuil +* Pimolnat Suntian diff --git a/stock_request_picking_type/static/description/index.html b/stock_request_picking_type/static/description/index.html index d09b4d05d..004c67f79 100644 --- a/stock_request_picking_type/static/description/index.html +++ b/stock_request_picking_type/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

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

Table of contents

@@ -395,7 +395,7 @@ ul.auto-toc {

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.

@@ -410,6 +410,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

Contributors

@@ -421,7 +422,7 @@ 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-warehouse project on GitHub.

+

This module is part of the OCA/stock-logistics-warehouse 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/views/stock_picking_views.xml b/stock_request_picking_type/views/stock_picking_views.xml index 41f55ef1e..fa16ff188 100644 --- a/stock_request_picking_type/views/stock_picking_views.xml +++ b/stock_request_picking_type/views/stock_picking_views.xml @@ -1,117 +1,196 @@ - stock.picking.type.kanban stock.picking.type - + - - - + + + - -
+
- - + + -
+
+ +
- + + +
-
- -