Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stock_orderpoint_manual_update/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
"name": "Stock Orderpoint Manual Update",
"version": "18.0.1.1.0",
"version": "18.0.1.2.0",
"category": "Warehouse Management",
"sequence": 14,
"summary": "",
Expand Down
7 changes: 7 additions & 0 deletions stock_orderpoint_manual_update/models/stock_orderpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@ class StockWarehouseOrderpoint(models.Model):
string="Previsión",
)

def _search_qty_to_order(self, operator, value):
return [("qty_to_order_manual", operator, value)]

def update_qty_forecast(self):
for rec in self:
rec.qty_forecast_stored = rec.qty_forecast

def update_qty_to_order_manual(self):
for rec in self:
rec.qty_to_order_manual = rec.qty_to_order_computed

def _get_orderpoint_products(self):
domain = [("type", "=", "product"), ("stock_move_ids", "!=", False)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def action_confirm(self):
orderpoint_domain = self._get_orderpoint_domain()
orderpoints = self.env["stock.warehouse.orderpoint"].with_context(active_test=False).search(orderpoint_domain)
orderpoints.update_qty_forecast()
orderpoints.update_qty_to_order_manual()
if self.compute_rotation:
orderpoints._compute_rotation()
orderpoints._change_review_toggle_negative()
Expand Down