diff --git a/mrp_production_putaway_strategy/README.rst b/mrp_production_putaway_strategy/README.rst index 2293ae178..278c88be0 100644 --- a/mrp_production_putaway_strategy/README.rst +++ b/mrp_production_putaway_strategy/README.rst @@ -14,13 +14,13 @@ MRP Production Putaway Strategy :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github - :target: https://github.com/OCA/manufacture/tree/12.0/mrp_production_putaway_strategy + :target: https://github.com/OCA/manufacture/tree/13.0/mrp_production_putaway_strategy :alt: OCA/manufacture .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_production_putaway_strategy + :target: https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_production_putaway_strategy :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/129/12.0 + :target: https://runbot.odoo-community.org/runbot/129/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -85,6 +85,7 @@ Contributors * Jordi Ballester * Lois Rilo +* Sudhir Arya Maintainers ~~~~~~~~~~~ @@ -99,6 +100,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/manufacture `_ project on GitHub. +This module is part of the `OCA/manufacture `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mrp_production_putaway_strategy/__manifest__.py b/mrp_production_putaway_strategy/__manifest__.py index 81e0d094b..27dd5fb27 100644 --- a/mrp_production_putaway_strategy/__manifest__.py +++ b/mrp_production_putaway_strategy/__manifest__.py @@ -5,7 +5,7 @@ "name": "MRP Production Putaway Strategy", "summary": "Applies putaway strategies to manufacturing orders for " "finished products.", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "author": "Eficent, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/manufacture", diff --git a/mrp_production_putaway_strategy/models/mrp_production.py b/mrp_production_putaway_strategy/models/mrp_production.py index e7d84c224..a27efb3d0 100644 --- a/mrp_production_putaway_strategy/models/mrp_production.py +++ b/mrp_production_putaway_strategy/models/mrp_production.py @@ -12,7 +12,7 @@ class MrpProduction(models.Model): location_dest = self.env['stock.location'].browse(vals.get( 'location_dest_id')) product = self.env['product.product'].browse(vals.get('product_id')) - location_id = location_dest.get_putaway_strategy(product) + location_id = location_dest._get_putaway_strategy(product) if location_id: vals['location_dest_id'] = location_id.id mo = super(MrpProduction, self).create(vals) @@ -21,5 +21,5 @@ class MrpProduction(models.Model): "Applied Putaway strategy to finished products.\n" "Finished Products Location: %s." % mo.location_dest_id.complete_name) - mo.message_post(message, message_type='comment') + mo.message_post(body=message, message_type='comment') return mo diff --git a/mrp_production_putaway_strategy/readme/CONTRIBUTORS.rst b/mrp_production_putaway_strategy/readme/CONTRIBUTORS.rst index 6df2be2f8..8bfbff100 100644 --- a/mrp_production_putaway_strategy/readme/CONTRIBUTORS.rst +++ b/mrp_production_putaway_strategy/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Jordi Ballester * Lois Rilo +* Sudhir Arya diff --git a/mrp_production_putaway_strategy/static/description/index.html b/mrp_production_putaway_strategy/static/description/index.html index 37a297b15..8235f157a 100644 --- a/mrp_production_putaway_strategy/static/description/index.html +++ b/mrp_production_putaway_strategy/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: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runbot

+

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

This module allows to apply putaway strategies to the products resulting from the manufacturing orders.

The finished products will be placed in the location designated by the putaway @@ -433,6 +433,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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

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/manufacture project on GitHub.

+

This module is part of the OCA/manufacture project on GitHub.

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

diff --git a/mrp_production_putaway_strategy/tests/test_mrp_production.py b/mrp_production_putaway_strategy/tests/test_mrp_production.py index b99e6b9b2..267328227 100644 --- a/mrp_production_putaway_strategy/tests/test_mrp_production.py +++ b/mrp_production_putaway_strategy/tests/test_mrp_production.py @@ -27,21 +27,17 @@ class MrpProductionCase(TransactionCase): 'usage': 'internal' }) - self.putaway_strategy = self.env['product.putaway'].create({ - 'name': 'Fixed Loc', - 'method': 'fixed', - 'fixed_location_ids': [( - 0, 0, {'fixed_location_id': self.bin_loc_stock.id, - 'category_id': self.category.id})] - }) - self.loc_stock.putaway_strategy_id = self.putaway_strategy - - self.loc_production = self.env.ref( - "stock.location_production") self.product1 = self.env.ref("mrp.product_product_computer_desk") self.product1.categ_id = self.category self.bom1 = self.env.ref("mrp.mrp_bom_desk") + self.putaway_strategy = self.env['stock.putaway.rule'].create({ + 'product_id': self.product1.id, + 'location_in_id': self.loc_stock.id, + 'location_out_id': self.bin_loc_stock.id, + }) + self.loc_stock.putaway_strategy_id = self.putaway_strategy + def _create_mo(self, product=False, bom=False, src_loc=False, dest_loc=False, qty=10.0, uom=False): if not product: