Anup(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-5323-ach into 
lp:openobject-addons/6.0.

Requested reviews:
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5323-ach/+merge/59033

Hello,

    A misleading behavior was being performed in the mrp_repair order's 
invoicing tab. When selecting a Product while creating a new line in the Fees 
the taxes were being reflected in the line from the product's tax section.

    This was happening due to the field taxes missing in the tree view. But It 
caused a real problem with the tax calculations.

    The other thing was still the taxes were being computed by the compute() 
method in place of compute_all() so fixed that too.

Share your views.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-5323-ach/+merge/59033
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-5323-ach.
=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py	2011-01-17 10:01:22 +0000
+++ mrp_repair/mrp_repair.py	2011-04-26 09:37:27 +0000
@@ -69,11 +69,11 @@
             cur = repair.pricelist_id.currency_id
             for line in repair.operations:
                 if line.to_invoice:
-                    for c in tax_obj.compute(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id):
+                    for c in tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id)['taxes']:
                         val += c['amount']
             for line in repair.fees_lines:
                 if line.to_invoice:
-                    for c in tax_obj.compute(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id):
+                    for c in tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty, repair.partner_invoice_id.id, line.product_id, repair.partner_id)['taxes']:
                         val += c['amount']
             res[repair.id] = cur_obj.round(cr, uid, cur, val)
         return res

=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml	2011-01-17 08:00:48 +0000
+++ mrp_repair/mrp_repair_view.xml	2011-04-26 09:37:27 +0000
@@ -148,6 +148,7 @@
                                 <field name="product_uom_qty" string="Qty"/>
                                 <field name="product_uom" string="UoM"/>
                                 <field name="price_unit"/>
+                                <field name="tax_id"/>
                                 <field name="to_invoice"/>
                                 <field name="price_subtotal"/>
                             </tree>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help   : https://help.launchpad.net/ListHelp

Reply via email to