summaryrefslogtreecommitdiff
path: root/addons/repair/wizard/stock_warn_insufficient_qty.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/repair/wizard/stock_warn_insufficient_qty.py
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/repair/wizard/stock_warn_insufficient_qty.py')
-rw-r--r--addons/repair/wizard/stock_warn_insufficient_qty.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/addons/repair/wizard/stock_warn_insufficient_qty.py b/addons/repair/wizard/stock_warn_insufficient_qty.py
new file mode 100644
index 00000000..73f63fa0
--- /dev/null
+++ b/addons/repair/wizard/stock_warn_insufficient_qty.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import fields, models
+
+class StockWarnInsufficientQtyRepair(models.TransientModel):
+ _name = 'stock.warn.insufficient.qty.repair'
+ _inherit = 'stock.warn.insufficient.qty'
+ _description = 'Warn Insufficient Repair Quantity'
+
+ repair_id = fields.Many2one('repair.order', string='Repair')
+
+ def _get_reference_document_company_id(self):
+ return self.repair_id.company_id
+
+ def action_done(self):
+ self.ensure_one()
+ return self.repair_id.action_repair_confirm()