Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-869556-bde into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #869556 in OpenERP Addons: "[Anglo-Saxon Accounting] Purchase of Service 
Line - wrong accounting entries"
  https://bugs.launchpad.net/openobject-addons/+bug/869556

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-869556-bde/+merge/78835

Hello Sir, 

I have made some modification in account_anglo_saxon/purchase.py in order to 
set correct account in invoice line for Service type products.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-869556-bde/+merge/78835
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-869556-bde.
=== modified file 'account_anglo_saxon/purchase.py'
--- account_anglo_saxon/purchase.py	2011-05-11 05:50:31 +0000
+++ account_anglo_saxon/purchase.py	2011-10-10 13:07:36 +0000
@@ -1,6 +1,6 @@
 # -*- encoding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
 #
@@ -15,7 +15,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
@@ -29,7 +29,10 @@
     def inv_line_create(self, cr, uid, a, ol):
         line = super(purchase_order, self).inv_line_create(cr, uid, a, ol)
         if ol.product_id:
-            oa = ol.product_id.property_stock_account_input and ol.product_id.property_stock_account_input.id
+            if ol.product_id.type == 'service':
+                oa = ol.product_id.categ_id.property_account_expense_categ and ol.product_id.categ_id.property_account_expense_categ.id
+            else:
+                oa = ol.product_id.property_stock_account_input and ol.product_id.property_stock_account_input.id
             if not oa:
                 oa = ol.product_id.categ_id.property_stock_account_input_categ and ol.product_id.categ_id.property_stock_account_input_categ.id
             if oa:

_______________________________________________
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