← Back to team overview

openerp-india team mailing list archive

[Bug 1044186] Re: [6.1/trunk]Orderpoint and location

 

[Expired for OpenERP Addons because there has been no activity for 60
days.]

** Changed in: openobject-addons
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1044186

Title:
  [6.1/trunk]Orderpoint and  location

Status in OpenERP Addons (modules):
  Expired

Bug description:
  Version 6.1
  revno: 6952
  branch-nick: 6.1

  I noticed this issue when using the stock_location module to enable
  pushed flows, however even without using stock_location I believe
  there is a problem with minimum stock rules and location.

  When the scheduler processes the minimum stock rules it creates a procurement for each product that falls below the specified value.  The procurement location_id in this case is inherited from the location specified in the minimum stock rule.
  In my case I have set the incoming location (lot_input_id) to "Receptions" apposed to "Stock" so that I can perform an operation such as Suppliers->QC->Stock.
  The result is that when a procurement is created for a minimum stock rule it always ends up in "Stock" location no matter what I have set lot_input_id.

  If I have set my warehouse to receive incomming to Receptions, then
  that's where they should go.

  The problem can be fixed in procurement/schedulers.py in _prepare_orderpoint_procurement(), however there may be a more eligant solution.
  eg:
      def _prepare_orderpoint_procurement(self, cr, uid, orderpoint, product_qty, context=None):
          product = self.pool.get('product.product').browse(cr, uid, orderpoint.product_id.id, context=context)
          warehouse = self.pool.get('stock.warehouse').browse(cr, uid, orderpoint.warehouse_id.id, context=context)
          if product.supply_method == 'buy':
              location_id = warehouse.lot_input_id.id
          elif product.supply_method == 'produce':
              location_id = warehouse.lot_stock_id.id
          else:
              return {}
          logger.info("%s._prepare_orderpoint_procurement(): #1: location_id %s", self._name, location_id)
          return {'name': orderpoint.name,
                  'date_planned': self._get_orderpoint_date_planned(cr, uid, orderpoint, datetime.today(), context=context),
                  'product_id': orderpoint.product_id.id,
                  'product_qty': product_qty,
                  'company_id': orderpoint.company_id.id,
                  'product_uom': orderpoint.product_uom.id,
                  'location_id': location_id,
                  'procure_method': 'make_to_order',
                  'origin': orderpoint.name}

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1044186/+subscriptions


References