Skip to content

Commit

Permalink
[IMP] mrp_multi_level:
Browse files Browse the repository at this point in the history
* Planned Order release and due date become required.
* Add button to Product MRP Area to update MOQ from Supplier Info.
  • Loading branch information
HviorForgeFlow committed Mar 3, 2020
1 parent 80725da commit ae98e4c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
6 changes: 4 additions & 2 deletions mrp_multi_level/models/mrp_planned_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ class MrpPlannedOrder(models.Model):
readonly=True,
)
order_release_date = fields.Date(
string="Release Date", help="Order release date planned by MRP."
string="Release Date", help="Order release date planned by MRP.", required=True
)
due_date = fields.Date(
string="Due Date", help="Date in which the supply must have been completed."
string="Due Date",
help="Date in which the supply must have been completed.",
required=True,
)
qty_released = fields.Float(readonly=True)
fixed = fields.Boolean(default=True)
Expand Down
6 changes: 6 additions & 0 deletions mrp_multi_level/models/product_mrp_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,9 @@ def _adjust_qty_to_order(self, qty_to_order):
if self.mrp_maximum_order_qty and qty_to_order > self.mrp_maximum_order_qty:
return self.mrp_maximum_order_qty
return qty_to_order

def update_min_qty_from_main_supplier(self):
self.ensure_one()
if self.main_supplierinfo_id:
self.mrp_minimum_order_qty = self.main_supplierinfo_id.min_qty

9 changes: 9 additions & 0 deletions mrp_multi_level/readme/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
13.0.1.3.0 (2020-03-02)
~~~~~~~~~~~~~~~~~~~~~~~

* [IMP] Minor changes"
(`#470 <https://github.com/OCA/manufacture/pull/470>`_).

* Planned Order release and due date become required.
* Add button to Product MRP Area to update MOQ from Supplier Info.

13.0.1.2.0 (2020-02-20)
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
11 changes: 10 additions & 1 deletion mrp_multi_level/views/product_mrp_area_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@
<field name="mrp_transit_delay" invisible="1"/>
<field name="mrp_inspection_delay" invisible="1"/>
<field name="mrp_minimum_stock"/>
<field name="mrp_minimum_order_qty"/>
<label for="mrp_minimum_order_qty"/>
<div name="mrp_minimum_order_qty" class="o_row">
<field name="mrp_minimum_order_qty"/>
<span name="update_min_qty">
<button string="Update Min Qty" type="object"
name="update_min_qty_from_main_supplier"
attrs="{'invisible':[('supply_method', '!=', 'buy'), ('main_supplierinfo_id', '=', False)]}"
class="oe_link pt-0 oe_inline"/>
</span>
</div>
<field name="mrp_maximum_order_qty"/>
<field name="mrp_qty_multiple"/>
<field name="supply_method"/>
Expand Down

0 comments on commit ae98e4c

Please sign in to comment.