← Back to team overview

openerp-india team mailing list archive

[Bug 922077] Re: anglo saxon - must handle product price diff between purchase and invoice

 

Hmm
I try to find a price in PO and if not I take it from product, nevertheless it could be possible that there is no price either, have to check how the validation moves are evaluated

                                standard_price = ''
                                if i_line.product_id.cost_method == 'average':
                                    po_obj = self.pool.get('purchase.order')
                                    po_lines_obj = self.pool.get('purchase.order.line')
                                    po_ids = po_obj.search(cr, uid, [('invoice_ids','=', inv.id )])
                                    logger.notifyChannel('addons.'+self._name, netsvc.LOG_INFO, 'po_ids: %s' % po_ids)
                                    po_line_ids = po_lines_obj.search(cr, uid, [('order_id','in', po_ids ), ('product_id','=',i_line.product_id.id)])
                                    for po_lines in po_lines_obj.browse(cr, uid, po_line_ids):
                                        standard_price = po_lines.price_unit
                                    logger.notifyChannel('addons.'+self._name, netsvc.LOG_INFO, 'po_id standard_price: %s' % standard_price)

                                if not standard_price:
                                    standard_price = self.pool.get('product.uom')._compute_price(cr, uid, uom.id, i_line.product_id.standard_price, i_line.uos_id.id)

-- 
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/922077

Title:
  anglo saxon - must handle product price diff between purchase and
  invoice

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  very often the purchase order price is an indication, but the "real"
  (day) price is different

  using anglo saxon method this  difference must result in a account
  move line to balance the input account

  patch will follow

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


Follow ups

References