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

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #893977 in OpenERP Addons: "Account voucher: Analytic account associated 
with write off entries while payment does not consider"
  https://bugs.launchpad.net/openobject-addons/+bug/893977

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

Hello Sir, 

I have set account_analytic_id when Write-Off Analytic Account is selected
in Account Voucher.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-893977-bde/+merge/83899
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-893977-bde.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-11-15 06:01:49 +0000
+++ account_voucher/account_voucher.py	2011-11-30 07:33:28 +0000
@@ -935,6 +935,7 @@
         move_line = {}
 
         voucher_brw = self.pool.get('account.voucher').browse(cr,uid,voucher_id,context)
+        analytic_id = voucher_brw.analytic_id.id or False
         current_currency_obj = voucher_brw.currency_id or voucher_brw.journal_id.company_id.currency_id
 
         if not currency_obj.is_zero(cr, uid, current_currency_obj, line_total):
@@ -958,6 +959,7 @@
                 'debit': diff < 0 and -diff or 0.0,
                 'amount_currency': company_currency <> current_currency and voucher_brw.writeoff_amount or False,
                 'currency_id': company_currency <> current_currency and current_currency or False,
+                'analytic_account_id': analytic_id
             }
 
         return move_line

_______________________________________________
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