← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-722961-ksa into lp:openobject-addons

 

Kirti Savalia(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-722961-ksa into lp:openobject-addons.

Requested reviews:
  Mustufa Rangwala (Open ERP) (mra-tinyerp)
Related bugs:
  #722961 Stock Input account record only a cost price
  https://bugs.launchpad.net/bugs/722961

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-722961-ksa/+merge/50726

do changes as per your suggestion.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-722961-ksa/+merge/50726
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-722961-ksa.
=== modified file 'purchase/stock.py'
--- purchase/stock.py	2011-01-19 01:17:24 +0000
+++ purchase/stock.py	2011-02-22 11:49:11 +0000
@@ -41,7 +41,7 @@
             # plug the purchase line values if they are found.
             if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id:
                 reference_amount, reference_currency_id = move.purchase_line_id.price_unit, move.picking_id.purchase_id.pricelist_id.currency_id.id
-        return reference_amount, reference_currency_id
+        return reference_amount * move.product_qty, reference_currency_id
 
 stock_move()
 

=== modified file 'stock/stock.py'
--- stock/stock.py	2011-01-24 16:13:46 +0000
+++ stock/stock.py	2011-02-22 11:49:11 +0000
@@ -1481,7 +1481,7 @@
             'domain': '[]',
             'context': context
         }
-        
+
 
     def name_get(self, cr, uid, ids, context=None):
         res = []
@@ -2161,7 +2161,7 @@
                     'ref': move.picking_id and move.picking_id.name or False,
                     'date': time.strftime('%Y-%m-%d'),
                     'partner_id': partner_id,
-                    'debit': reference_amount,
+                    'debit': reference_amount * move.product_qty,
                     'account_id': dest_account_id,
         }
         credit_line_vals = {
@@ -2171,7 +2171,7 @@
                     'ref': move.picking_id and move.picking_id.name or False,
                     'date': time.strftime('%Y-%m-%d'),
                     'partner_id': partner_id,
-                    'credit': reference_amount,
+                    'credit': reference_amount * move.product_qty,
                     'account_id': src_account_id,
         }
 


Follow ups