← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

Purnendu Singh (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #568537 The __compute method of account_account needs optmization to improve Accounting Performance!
  https://bugs.launchpad.net/bugs/568537
  #588776 Error when closing fiscal year
  https://bugs.launchpad.net/bugs/588776
  #686508 Not able to validate sales receipt
  https://bugs.launchpad.net/bugs/686508
  #686513 Not able to validate supplier vouchers
  https://bugs.launchpad.net/bugs/686513
  #691218 add an employee to a department
  https://bugs.launchpad.net/bugs/691218
  #692139 Account Journal onchange_type method context undefined error
  https://bugs.launchpad.net/bugs/692139
  #692962 In hr contract, shouldn't be able to enter an end date lower than a start date
  https://bugs.launchpad.net/bugs/692962
  #693476 [6.0] sale manager dashboard - "Sales by Customer" - incomplete
  https://bugs.launchpad.net/bugs/693476
  #693810 [RC1]Pay button when you pay directly in Sales receipt form
  https://bugs.launchpad.net/bugs/693810
  #694937 [6.0] account entry analysis - unreconciled does not filter 
  https://bugs.launchpad.net/bugs/694937
  #695439 membership: can't open members via GTK client
  https://bugs.launchpad.net/bugs/695439
  #697080 Payment Invoice is not considering the currency in Invoice
  https://bugs.launchpad.net/bugs/697080
  #697207 Bug when sending followups without specifying any email address
  https://bugs.launchpad.net/bugs/697207
  #697714 Unclear warning on cancel opening entries
  https://bugs.launchpad.net/bugs/697714
  #702027 [trunk]hr_payroll minor typos
  https://bugs.launchpad.net/bugs/702027

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2/+merge/46106

Hello sir,

Fixes: https://bugs.launchpad.net/openobject-addons/+bug/697080
Payment Invoice is not considering the currency in Invoice

Thanks 
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2/+merge/46106
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-01-06 11:32:21 +0000
+++ account_voucher/account_voucher.py	2011-01-13 08:51:57 +0000
@@ -45,6 +45,11 @@
     def _get_journal(self, cr, uid, context=None):
         if context is None: context = {}
         journal_pool = self.pool.get('account.journal')
+        invoice_pool = self.pool.get('account.invoice')
+        if context.get('invoice_id', False):
+            currency_id = invoice_pool.browse(cr, uid, context.get('invoice_id'), context=context).currency_id.id
+            journal_id = journal_pool.search(cr, uid, [('currency', '=', currency_id)], limit=1)
+            return journal_id and journal_id[0] or False
         if context.get('journal_id', False):
             return context.get('journal_id')
         if not context.get('journal_id', False) and context.get('search_default_journal_id', False):