Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-576964-rha into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576964-rha/+merge/116615

Hello,

A forward port of r5046 from 6.0, when we remove product from invoice line then 
it should
reset the unit price to 0.0

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

Steps to reproduce:
1. Create a Supplier invoice
2. Select PC1, Unit Price will be 300(cost price of product)
3. Now, select PC2, Unit Price should be 500 but it remais same.

This problem should be in Trunk too.
Please review this fix.

Regards,
Rifakat Haradwala
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576964-rha/+merge/116615
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-576964-rha.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2012-07-04 16:33:07 +0000
+++ account/account_invoice.py	2012-07-25 10:12:35 +0000
@@ -1336,10 +1336,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     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to