Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-575449-ado into 
lp:openobject-addons/6.0.

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

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-575449-ado/+merge/110953

Hello,

[FIX]: changing the uom in sale order line affects in sale order account entry 
entry but not affecting in account entry of anglo saxon accounting it will 
always take the cost price of product instead of converted uom amount

Steps:
1). Install anglo_saxon module
1). Create a product with PCE uom and set cost price(eg:50) and sale 
price(eg:100) with Realtime(automated).
2). Create a new UOM with UOM category unit and ratio=2
3). Create a Sale order and add sale order line with above product, change the 
uom to newly created uom, so unit price will change to 50.
4). Confirm the sale order, Click on "Create Final Invoice" and validate the 
related invoice.

Now check the Journal Entries two new entries for anglo saxon accounting is 
created.

The Anglo saxon accounting entries is always created with cost price of 
product. 
It should be created with uom converted price.

If we change the uom in sale order line the cost price in journal entry should 
be change as per the ratio.

Regards,
Amit Dodiya
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-575449-ado/+merge/110953
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-575449-ado.
=== modified file 'account_anglo_saxon/invoice.py'
--- account_anglo_saxon/invoice.py	2011-01-14 00:11:01 +0000
+++ account_anglo_saxon/invoice.py	2012-06-19 06:03:21 +0000
@@ -32,10 +32,11 @@
         company_currency = inv.company_id.currency_id.id
         def get_price(cr, uid, inv, company_currency,i_line):
             cur_obj = self.pool.get('res.currency')
+            standard_price_line = self.pool.get('product.uom')._compute_price(cr, uid, i_line.product_id.product_tmpl_id.uom_id.id, i_line.product_id.product_tmpl_id.standard_price, i_line.uos_id.id)
             if inv.currency_id.id != company_currency:
-                price = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, i_line.product_id.product_tmpl_id.standard_price * i_line.quantity, context={'date': inv.date_invoice})
+                price = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, standard_price_line * i_line.quantity, context={'date': inv.date_invoice})
             else:
-                price = i_line.product_id.product_tmpl_id.standard_price * i_line.quantity
+                price = standard_price_line * i_line.quantity
             return price
 
         if inv.type in ('out_invoice','out_refund'):

_______________________________________________
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