diff options
| author | Josse Colpaert <jco@odoo.com> | 2015-09-14 17:26:22 +0200 |
|---|---|---|
| committer | Josse Colpaert <jco@odoo.com> | 2015-09-16 11:04:33 +0200 |
| commit | 0f89721cdad3ad17baba3aa5f7705809c7b431df (patch) | |
| tree | 5b54987da2a2538772d5977d3927ec6f7c442b8d /addons/procurement_jit/procurement_jit.py | |
| parent | 5ffb09a5dfdee8c1b42072be8ceb3e4b90a50f3d (diff) | |
[IMP] procurement: Integrate procurement_jit in other modules and change to sale_auto_reserve
As procurement_jit has been optimized (by running multiple procurements at once),
it does not make sense to still have a module that without it, does not generate Pick > Pack > Ship
automatically, but only Ship. We can do it anyways.
That way, the procurement_jit module can become clearer in its functionality to the user: when
a sale order is confirmed, it will automatically reserve the picking from the stock location (in case of MTS)
and people who don't want that functionality can still immediately have the Pick > Pack > Ship.
Make sure also push_apply works with manually created pickings.
Diffstat (limited to 'addons/procurement_jit/procurement_jit.py')
| -rw-r--r-- | addons/procurement_jit/procurement_jit.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/addons/procurement_jit/procurement_jit.py b/addons/procurement_jit/procurement_jit.py deleted file mode 100644 index b48ad5f937b..00000000000 --- a/addons/procurement_jit/procurement_jit.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - - -from openerp.osv import osv - -class procurement_order(osv.osv): - _inherit = "procurement.order" - - def create(self, cr, uid, vals, context=None): - context = context or {} - procurement_id = super(procurement_order, self).create(cr, uid, vals, context=context) - self.run(cr, uid, [procurement_id], context=context) - return procurement_id - - def run(self, cr, uid, ids, autocommit=False, context=None): - res = super(procurement_order, self).run(cr, uid, ids, autocommit=autocommit, context=context) - procurement_ids = self.search(cr, uid, [('move_dest_id.procurement_id', 'in', ids)], order='id', context=context) - if procurement_ids: - result = self.run(cr, uid, procurement_ids, autocommit=autocommit, context=context) - return result - return res - |
