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 - + - - - + + + - -
+
- - + + -
+
+ +
- + + +
-
- -