From 8cba1eaa340eb0c6b264672b0a47dc1628c2eb04 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 25 Oct 2023 14:05:01 +0700 Subject: initial commit for split automatic purchase --- indoteknik_custom/models/stock_warehouse_orderpoint.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 indoteknik_custom/models/stock_warehouse_orderpoint.py (limited to 'indoteknik_custom/models/stock_warehouse_orderpoint.py') diff --git a/indoteknik_custom/models/stock_warehouse_orderpoint.py b/indoteknik_custom/models/stock_warehouse_orderpoint.py new file mode 100644 index 00000000..277c8dc3 --- /dev/null +++ b/indoteknik_custom/models/stock_warehouse_orderpoint.py @@ -0,0 +1,10 @@ +from odoo import fields, models, api, _ + +class StockWarehouseOrderpoint(models.Model): + _inherit = 'stock.warehouse.orderpoint' + + responsible_id = fields.Many2one('res.users', string='Responsible', compute='_compute_responsible') + + def _compute_responsible(self): + for stock in self: + stock.responsible_id = stock.product_id.x_manufacture.user_id -- cgit v1.2.3