BTW it does not mind if "Shipped quantities" / "Order quantities" is selected 
in "Invoice on" field when invoices are created from tasks (service products), 
always the created invoice shows order quantities.

I think the problem is that piece of code of mrp/mrp.py file (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".

Other thing that does not work fine is when you cancel a sale order with 
service products that have created tasks. These tasks are not cancelled/removed 
automatically (or you are not warned about cancelling them like in picking 
lists), so if you later cancel->draft->confirm the sale order, new duplicated 
tasks are created.

------------------------
Jordi Esteve
http://www.zikzakmedia.com/openerp.html
Zikzakmedia SL




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=33306#33306

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to