mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] Migrated mrp_production_putaway_strategy to v13.
This commit is contained in:
committed by
Joan Mateu Jordi
parent
ef64b0a64b
commit
a087b9e4ad
@@ -14,13 +14,13 @@ MRP Production Putaway Strategy
|
|||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
|
.. |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
|
:alt: OCA/manufacture
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |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
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |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
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
@@ -85,6 +85,7 @@ Contributors
|
|||||||
|
|
||||||
* Jordi Ballester <jordi.ballester@eficent.com>
|
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||||
* Lois Rilo <lois.rilo@eficent.com>
|
* Lois Rilo <lois.rilo@eficent.com>
|
||||||
|
* Sudhir Arya <sudhir@erpharbor.com>
|
||||||
|
|
||||||
Maintainers
|
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
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/12.0/mrp_production_putaway_strategy>`_ project on GitHub.
|
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/13.0/mrp_production_putaway_strategy>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"name": "MRP Production Putaway Strategy",
|
"name": "MRP Production Putaway Strategy",
|
||||||
"summary": "Applies putaway strategies to manufacturing orders for "
|
"summary": "Applies putaway strategies to manufacturing orders for "
|
||||||
"finished products.",
|
"finished products.",
|
||||||
"version": "12.0.1.0.0",
|
"version": "13.0.1.0.0",
|
||||||
"author": "Eficent, "
|
"author": "Eficent, "
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/manufacture",
|
"website": "https://github.com/OCA/manufacture",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class MrpProduction(models.Model):
|
|||||||
location_dest = self.env['stock.location'].browse(vals.get(
|
location_dest = self.env['stock.location'].browse(vals.get(
|
||||||
'location_dest_id'))
|
'location_dest_id'))
|
||||||
product = self.env['product.product'].browse(vals.get('product_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:
|
if location_id:
|
||||||
vals['location_dest_id'] = location_id.id
|
vals['location_dest_id'] = location_id.id
|
||||||
mo = super(MrpProduction, self).create(vals)
|
mo = super(MrpProduction, self).create(vals)
|
||||||
@@ -21,5 +21,5 @@ class MrpProduction(models.Model):
|
|||||||
"Applied Putaway strategy to finished products.\n"
|
"Applied Putaway strategy to finished products.\n"
|
||||||
"Finished Products Location: %s." %
|
"Finished Products Location: %s." %
|
||||||
mo.location_dest_id.complete_name)
|
mo.location_dest_id.complete_name)
|
||||||
mo.message_post(message, message_type='comment')
|
mo.message_post(body=message, message_type='comment')
|
||||||
return mo
|
return mo
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
* Jordi Ballester <jordi.ballester@eficent.com>
|
* Jordi Ballester <jordi.ballester@eficent.com>
|
||||||
* Lois Rilo <lois.rilo@eficent.com>
|
* Lois Rilo <lois.rilo@eficent.com>
|
||||||
|
* Sudhir Arya <sudhir@erpharbor.com>
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/mrp_production_putaway_strategy"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_production_putaway_strategy"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/129/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/13.0/mrp_production_putaway_strategy"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-13-0/manufacture-13-0-mrp_production_putaway_strategy"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/129/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This module allows to apply putaway strategies to the products resulting from
|
<p>This module allows to apply putaway strategies to the products resulting from
|
||||||
the manufacturing orders.</p>
|
the manufacturing orders.</p>
|
||||||
<p>The finished products will be placed in the location designated by the putaway
|
<p>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
|
|||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@eficent.com">jordi.ballester@eficent.com</a>></li>
|
<li>Jordi Ballester <<a class="reference external" href="mailto:jordi.ballester@eficent.com">jordi.ballester@eficent.com</a>></li>
|
||||||
<li>Lois Rilo <<a class="reference external" href="mailto:lois.rilo@eficent.com">lois.rilo@eficent.com</a>></li>
|
<li>Lois Rilo <<a class="reference external" href="mailto:lois.rilo@eficent.com">lois.rilo@eficent.com</a>></li>
|
||||||
|
<li>Sudhir Arya <<a class="reference external" href="mailto:sudhir@erpharbor.com">sudhir@erpharbor.com</a>></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
@@ -442,7 +443,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/mrp_production_putaway_strategy">OCA/manufacture</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/13.0/mrp_production_putaway_strategy">OCA/manufacture</a> project on GitHub.</p>
|
||||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,21 +27,17 @@ class MrpProductionCase(TransactionCase):
|
|||||||
'usage': 'internal'
|
'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 = self.env.ref("mrp.product_product_computer_desk")
|
||||||
self.product1.categ_id = self.category
|
self.product1.categ_id = self.category
|
||||||
self.bom1 = self.env.ref("mrp.mrp_bom_desk")
|
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,
|
def _create_mo(self, product=False, bom=False, src_loc=False,
|
||||||
dest_loc=False, qty=10.0, uom=False):
|
dest_loc=False, qty=10.0, uom=False):
|
||||||
if not product:
|
if not product:
|
||||||
|
|||||||
Reference in New Issue
Block a user