Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-opw-576964-port-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-576964-port-mma/+merge/132867

Hello,

Issue: -
Problem occurs for Supplier invoice line, when invoice line form has previously 
filled Unit Price
and we change product then Unit Price is not updated with the cost price. It 
remains same for
all the products. It works fine for customer invoice.

Steps to reproduce:
1. Create a Supplier invoice
2. Select any product , Unit Price will be 300(cost price of product)
3. Now, select another product, Unit Price should be different (like -500) but 
it remains same.

-Code is forward port from 6.1

Thanks,
Mayur
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-576964-port-mma/+merge/132867
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-opw-576964-port-mma.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2012-11-02 09:21:06 +0000
+++ account/account_invoice.py	2012-11-05 11:06:28 +0000
@@ -1417,10 +1417,7 @@
         if not partner_id:
             raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
         if not product:
-            if type in ('in_invoice', 'in_refund'):
-                return {'value': {}, 'domain':{'product_uom':[]}}
-            else:
-                return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
+            return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
         part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
         fpos_obj = self.pool.get('account.fiscal.position')
         fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id, context=context) or False

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to