diff --git a/stock_location_tray/README.rst b/stock_location_tray/README.rst index d344b147b..f7acb2883 100644 --- a/stock_location_tray/README.rst +++ b/stock_location_tray/README.rst @@ -14,13 +14,13 @@ Location Trays :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-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/13.0/stock_location_tray + :target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_location_tray :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-13-0/stock-logistics-warehouse-13-0-stock_location_tray + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_location_tray :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/13.0 + :target: https://runbot.odoo-community.org/runbot/153/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -30,7 +30,7 @@ A tray type defines a number of columns and rows. A location with a tray type becomes a tray, and sub-locations are automatically created according to the columns and rows of the tray type -.. figure:: https://raw.githubusercontent.com/OCA/stock-logistics-warehouse/13.0/stock_location_tray/static/description/location-tray.png +.. figure:: https://raw.githubusercontent.com/OCA/stock-logistics-warehouse/14.0/stock_location_tray/static/description/location-tray.png :alt: Location Tray :width: 600 px @@ -83,7 +83,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. @@ -99,6 +99,14 @@ Contributors ~~~~~~~~~~~~ * Guewen Baconnier +* Phuc Tran Thanh + +Other credits +~~~~~~~~~~~~~ + +The development of this module has been financially supported by: + +* Camptocamp Maintainers ~~~~~~~~~~~ @@ -113,6 +121,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/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_location_tray/__manifest__.py b/stock_location_tray/__manifest__.py index b2e714b97..67491d5ca 100644 --- a/stock_location_tray/__manifest__.py +++ b/stock_location_tray/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Location Trays", "summary": "Organize a location as a matrix of cells", - "version": "13.0.1.0.2", + "version": "14.0.1.0.0", "category": "Stock", "author": "Camptocamp, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/stock_location_tray/models/stock_location.py b/stock_location_tray/models/stock_location.py index ea9ff012a..fbc4ef57d 100644 --- a/stock_location_tray/models/stock_location.py +++ b/stock_location_tray/models/stock_location.py @@ -103,7 +103,7 @@ class StockLocation(models.Model): def _check_before_add_tray_type(self): if not self.tray_type_id and self.child_ids: raise exceptions.UserError( - _("Location %s has sub-locations, it cannot be converted" " to a tray.") + _("Location %s has sub-locations, it cannot be converted to a tray.") % (self.display_name) ) @@ -207,7 +207,7 @@ class StockLocation(models.Model): # trap this check (_tray_check_active) to display a # contextual error message raise exceptions.UserError( - _("Trays cannot be modified when " "they contain products.") + _("Trays cannot be modified when they contain products.") ) if not tray_type: diff --git a/stock_location_tray/models/stock_location_tray_type.py b/stock_location_tray/models/stock_location_tray_type.py index 49e77cc9f..e89edc990 100644 --- a/stock_location_tray/models/stock_location_tray_type.py +++ b/stock_location_tray/models/stock_location_tray_type.py @@ -57,6 +57,7 @@ class StockLocationTrayType(models.Model): cells = self._generate_cells_matrix(default_state=1) record.tray_matrix = {"selected": [], "cells": cells} + @api.model def _name_search( self, name, args=None, operator="ilike", limit=100, name_get_uid=None ): @@ -64,10 +65,10 @@ class StockLocationTrayType(models.Model): domain = [] if name: domain = ["|", ("name", operator, name), ("code", operator, name)] - tray_ids = self._search( + + return self._search( expression.AND([domain, args]), limit=limit, access_rights_uid=name_get_uid ) - return self.browse(tray_ids).name_get() def _generate_cells_matrix(self, default_state=0): return [[default_state] * self.cols for __ in range(self.rows)] diff --git a/stock_location_tray/readme/CONTRIBUTORS.rst b/stock_location_tray/readme/CONTRIBUTORS.rst index 48286263c..4937013f0 100644 --- a/stock_location_tray/readme/CONTRIBUTORS.rst +++ b/stock_location_tray/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Guewen Baconnier +* Phuc Tran Thanh diff --git a/stock_location_tray/readme/CREDITS.rst b/stock_location_tray/readme/CREDITS.rst new file mode 100644 index 000000000..f5cc070c7 --- /dev/null +++ b/stock_location_tray/readme/CREDITS.rst @@ -0,0 +1,3 @@ +The development of this module has been financially supported by: + +* Camptocamp diff --git a/stock_location_tray/static/description/index.html b/stock_location_tray/static/description/index.html index ca6e03c73..df68e5491 100644 --- a/stock_location_tray/static/description/index.html +++ b/stock_location_tray/static/description/index.html @@ -3,7 +3,7 @@ - + Location Trays