diff options
| author | AVP(Axelor) <> | 2011-04-29 14:19:48 +0530 |
|---|---|---|
| committer | AMP (OpenERP) <amp@tinyerp.com> | 2011-04-29 14:19:48 +0530 |
| commit | cc3d7333c87dcd5e164ec88ea5bc1cfef4bc8cd5 (patch) | |
| tree | c8117d281e494c73a3aa2af28e9f9ab3d22f80f2 /addons/mrp | |
| parent | d553615695cee83345692d53a033e1e7c5f2a512 (diff) | |
[FIX][IMP] all modules improvement.
bzr revid: amp@tinyerp.com-20110429084948-x0pny8n2ersc4h8m
Diffstat (limited to 'addons/mrp')
| -rw-r--r-- | addons/mrp/mrp.py | 7 | ||||
| -rw-r--r-- | addons/mrp/procurement.py | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index e69e3134e0b..33c394d430e 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -243,7 +243,6 @@ class mrp_bom(osv.osv): def _check_product(self, cr, uid, ids, context=None): all_prod = [] - bom_obj = self.pool.get('mrp.bom') boms = self.browse(cr, uid, ids, context=context) def check_bom(boms): res = True @@ -672,10 +671,10 @@ class mrp_production(osv.osv): res = True for production in self.browse(cr, uid, ids): if production.move_lines: - res = False + res = False if production.move_created_ids: - res = False + res = False return res def action_produce(self, cr, uid, production_id, production_qty, production_mode, context=None): @@ -748,7 +747,7 @@ class mrp_production(osv.osv): produced_qty = produced_products.get(produce_product.product_id.id, 0) rest_qty = production.product_qty - produced_qty if rest_qty <= production_qty: - production_qty = rest_qty + production_qty = rest_qty if rest_qty > 0 : stock_mov_obj.action_consume(cr, uid, [produce_product.id], production_qty, context=context) diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py index b19c2c0e15e..41a9d7993a2 100644 --- a/addons/mrp/procurement.py +++ b/addons/mrp/procurement.py @@ -24,9 +24,7 @@ from dateutil.relativedelta import relativedelta from osv import fields from osv import osv from tools.translate import _ -import ir import netsvc -import time class procurement_order(osv.osv): _inherit = 'procurement.order' @@ -81,7 +79,6 @@ class procurement_order(osv.osv): procurement_obj = self.pool.get('procurement.order') for procurement in procurement_obj.browse(cr, uid, ids, context=context): res_id = procurement.move_id.id - loc_id = procurement.location_id.id newdate = datetime.strptime(procurement.date_planned, '%Y-%m-%d %H:%M:%S') - relativedelta(days=procurement.product_id.product_tmpl_id.produce_delay or 0.0) newdate = newdate - relativedelta(days=company.manufacturing_lead) produce_id = production_obj.create(cr, uid, { |
