The problem about order quantities instead of real quantities in an invoice created from a sale order (Invoice on: shipped quantities) when the sale order contains a product of type service+from_order+produce that has generated a task (real quantities are effective hours in the task) is that piece of code from mrp/mrp.py (line 852).
# # This method may be overrided by objects that override mrp.procurment # for computing their own purpose # def _quantity_compute_get(self, cr, uid, proc, context={}): if proc.product_id.type=='product': if proc.move_id.product_uos: return proc.move_id.product_uos_qty return False def _uom_compute_get(self, cr, uid, proc, context={}): if proc.product_id.type=='product': if proc.move_id.product_uos: return proc.move_id.product_uos.id return False # # Return the quantity of product shipped/produced/served, wich may be # different from the planned quantity # def quantity_get(self, cr, uid, id, context={}): proc = self.browse(cr, uid, id, context) result = self._quantity_compute_get(cr, uid, proc, context) if not result: result = proc.product_qty return result The method _quantity_compute_get() only tests products of type product, not of type service. And I have not found any other module that defines a method that overrides this one. So I suppose there is a bug, because the help in the "Invoice on" field of sale order form says clearly that "If the product is a service, shipped quantities means hours spent on the associated tasks". If nobody says nothing I'll report it in launchpad. ------------------------ Jordi Esteve http://www.zikzakmedia.com/openerp.html Zikzakmedia SL -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=33070#33070 -------------------- m2f -------------------- _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman/listinfo/tinyerp-users
