Priyesh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-18121-pso into 
lp:openobject-addons/6.0.

Requested reviews:
  Raphael Collet (OpenERP) (rco-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18121-pso/+merge/78956

Hello,

I have improved product_id_change method to do not fetch the negative quantity 
from Purchase order line same done in Sale order (case: 18121)

Thanks,
Priyesh


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18121-pso/+merge/78956
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-18121-pso.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2011-09-23 13:24:23 +0000
+++ purchase/purchase.py	2011-10-11 13:04:53 +0000
@@ -99,7 +99,7 @@
             for invoice in purchase.invoice_ids:
                 if invoice.state not in ('draft','cancel'):
                     tot += invoice.amount_untaxed
-            
+
             if purchase.amount_untaxed:
                 res[purchase.id] = min(100.0, tot * 100.0 / (purchase.amount_untaxed))
             else:
@@ -706,6 +706,14 @@
                         'uom': uom,
                         'date': date_order,
                         })[pricelist]
+        if price is False:
+            warning = {
+                'title': 'No valid pricelist line found !',
+                'message':
+                    "Couldn't find a pricelist line matching this product and quantity.\n"
+                    "You have to change either the product, the quantity or the pricelist."
+                }
+            res.update({'warning': warning})
         dt = (datetime.now() + relativedelta(days=int(seller_delay) or 0.0)).strftime('%Y-%m-%d %H:%M:%S')
 
 

_______________________________________________
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