Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-opw-577674-port-mma into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577674-port-mma/+merge/133037

Hello,

Steps to Reproduce the issue:

- Install account_Anglo_Saxon and sale module.
- Set product valuation as 'real-time' and stock input and output account.
- Create Customer Invoice and validate it.
- Check the Journal Entries there is account move in stock Stock output.
- Code is forward port from 6.1

Thanks,
Mayur

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577674-port-mma/+merge/133037
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-opw-577674-port-mma.
=== modified file 'account_anglo_saxon/invoice.py'
--- account_anglo_saxon/invoice.py	2012-03-06 05:58:47 +0000
+++ account_anglo_saxon/invoice.py	2012-11-06 11:08:25 +0000
@@ -40,7 +40,7 @@
 
         if inv.type in ('out_invoice','out_refund'):
             for i_line in inv.invoice_line:
-                if i_line.product_id:
+                if i_line.product_id and i_line.product_id.valuation == 'real_time':
                     if inv.type == 'out_invoice':
                         # debit account dacc will be the output account
                         # first check the product, if empty check the category
@@ -87,7 +87,7 @@
                             })
         elif inv.type in ('in_invoice','in_refund'):
             for i_line in inv.invoice_line:
-                if i_line.product_id:
+                if i_line.product_id and i_line.product_id.valuation == 'real_time':
                     if i_line.product_id.type != 'service':
                         # get the price difference account at the product
                         acc = i_line.product_id.property_account_creditor_price_difference and i_line.product_id.property_account_creditor_price_difference.id

_______________________________________________
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