diff --git a/mrp_multi_level/README.rst b/mrp_multi_level/README.rst index 5355062d1..3169902c2 100644 --- a/mrp_multi_level/README.rst +++ b/mrp_multi_level/README.rst @@ -85,20 +85,21 @@ Changelog ~~~~~~~~~~~~~~~~~~~~~~~ * [REW/IMP] Rework to include Planned Orders. - (`#365 `_): + (`#365 `_). +* [IMP] Able to procure from a different location than the area's location. 11.0.2.2.0 (2019-05-02) ~~~~~~~~~~~~~~~~~~~~~~~ * [IMP] Able to run MRP only for selected areas. - (`#360 `_): + (`#360 `_). 11.0.2.1.0 (2019-04-02) ~~~~~~~~~~~~~~~~~~~~~~~ * [IMP] Implement *Nbr. Days* functionality to be able to group demand when generating supply proposals. - (`#345 `_): + (`#345 `_). 11.0.2.0.0 (2018-11-20) ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/mrp_multi_level/models/product_mrp_area.py b/mrp_multi_level/models/product_mrp_area.py index 508739ece..18d12df42 100644 --- a/mrp_multi_level/models/product_mrp_area.py +++ b/mrp_multi_level/models/product_mrp_area.py @@ -29,6 +29,16 @@ class ProductMRPArea(models.Model): related='product_id.product_tmpl_id', store=True, ) + location_id = fields.Many2one( + related="mrp_area_id.location_id", + ) + location_proc_id = fields.Many2one( + string="Procure Location", + comodel_name="stock.location", + domain="[('location_id', 'child_of', location_id)]", + help="Set this if you need to procure from a different location" + "than area's location.", + ) # TODO: applicable and exclude... redundant?? mrp_applicable = fields.Boolean(string='MRP Applicable') mrp_exclude = fields.Boolean(string='Exclude from MRP') diff --git a/mrp_multi_level/readme/HISTORY.rst b/mrp_multi_level/readme/HISTORY.rst index 3b7f2db14..670a421e9 100644 --- a/mrp_multi_level/readme/HISTORY.rst +++ b/mrp_multi_level/readme/HISTORY.rst @@ -2,20 +2,21 @@ ~~~~~~~~~~~~~~~~~~~~~~~ * [REW/IMP] Rework to include Planned Orders. - (`#365 `_): + (`#365 `_). +* [IMP] Able to procure from a different location than the area's location. 11.0.2.2.0 (2019-05-02) ~~~~~~~~~~~~~~~~~~~~~~~ * [IMP] Able to run MRP only for selected areas. - (`#360 `_): + (`#360 `_). 11.0.2.1.0 (2019-04-02) ~~~~~~~~~~~~~~~~~~~~~~~ * [IMP] Implement *Nbr. Days* functionality to be able to group demand when generating supply proposals. - (`#345 `_): + (`#345 `_). 11.0.2.0.0 (2018-11-20) ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/mrp_multi_level/static/description/index.html b/mrp_multi_level/static/description/index.html index c95019ab8..8bb7f1c78 100644 --- a/mrp_multi_level/static/description/index.html +++ b/mrp_multi_level/static/description/index.html @@ -450,14 +450,15 @@ hand side gears in any record.

11.0.3.0.0 (2019-05-22)

  • [REW/IMP] Rework to include Planned Orders. -(#365):
  • +(#365). +
  • [IMP] Able to procure from a different location than the area’s location.

11.0.2.2.0 (2019-05-02)

  • [IMP] Able to run MRP only for selected areas. -(#360):
  • +(#360).
@@ -465,7 +466,7 @@ hand side gears in any record.
  • [IMP] Implement Nbr. Days functionality to be able to group demand when generating supply proposals. -(#345):
  • +(#345).
diff --git a/mrp_multi_level/views/product_mrp_area_views.xml b/mrp_multi_level/views/product_mrp_area_views.xml index 5580953a4..0bd3b7e61 100644 --- a/mrp_multi_level/views/product_mrp_area_views.xml +++ b/mrp_multi_level/views/product_mrp_area_views.xml @@ -44,6 +44,8 @@ + + @@ -107,6 +109,7 @@ + diff --git a/mrp_multi_level/wizards/mrp_inventory_procure.py b/mrp_multi_level/wizards/mrp_inventory_procure.py index 0bf65ca2c..11875d87c 100644 --- a/mrp_multi_level/wizards/mrp_inventory_procure.py +++ b/mrp_multi_level/wizards/mrp_inventory_procure.py @@ -26,7 +26,9 @@ class MrpInventoryProcure(models.TransientModel): 'mrp_inventory_id': planned_order.mrp_inventory_id.id, 'product_id': planned_order.product_id.id, 'warehouse_id': planned_order.mrp_area_id.warehouse_id.id, - 'location_id': planned_order.mrp_area_id.location_id.id, + 'location_id': + planned_order.product_mrp_area_id.location_proc_id.id or + planned_order.mrp_area_id.location_id.id, } @api.model