diff --git a/addons/.bzrignore b/addons/.bzrignore old mode 100644 new mode 100755 diff --git a/addons/account/__init__.py b/addons/account/__init__.py old mode 100644 new mode 100755 diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py old mode 100644 new mode 100755 index 0131ca0437b..06c3ed15a93 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -133,7 +133,9 @@ module named account_voucher. 'test/account_bank_statement.yml', 'test/account_cash_statement.yml', 'test/account_report.yml', - ], + + + ], 'installable': True, 'active': False, 'certificate': '0080331923549', diff --git a/addons/account/account.py b/addons/account/account.py old mode 100644 new mode 100755 index 7ad20843e4c..3fed8c45f17 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -131,7 +131,7 @@ class account_account_type(osv.osv): _name = "account.account.type" _description = "Account Type" _columns = { - 'name': fields.char('Acc. Type Name', size=64, required=True, translate=True), + 'name': fields.char('Acc. Type Name', size=64, required=True), 'code': fields.char('Code', size=32, required=True), 'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True, help="""Set here the method that will be used to generate the end of year journal entries for all the accounts of this type. @@ -204,7 +204,7 @@ class account_account(osv.osv): args[pos] = ('id', 'in', ids1) pos += 1 - if context and context.has_key('consolidate_childs'): #add consolidated childs of accounts + if context and context.has_key('consolidate_children'): #add consolidated children of accounts ids = super(account_account, self).search(cr, uid, args, offset, limit, order, context=context, count=count) for consolidate_child in self.browse(cr, uid, context['account_id'], context=context).child_consol_ids: @@ -285,6 +285,7 @@ class account_account(osv.osv): children_and_consolidated.reverse() brs = list(self.browse(cr, uid, children_and_consolidated, context=context)) sums = {} + currency_obj = self.pool.get('res.currency') while brs: current = brs[0] # can_compute = True @@ -299,8 +300,11 @@ class account_account(osv.osv): brs.pop(0) for fn in field_names: sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0) - if current.child_id: - sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id) + for child in current.child_id: + if child.company_id.currency_id.id == current.company_id.currency_id.id: + sums[current.id][fn] += sums[child.id][fn] + else: + sums[current.id][fn] += currency_obj.compute(cr, uid, child.company_id.currency_id.id, current.company_id.currency_id.id, sums[child.id][fn], context=context) res = {} null_result = dict((fn, 0.0) for fn in field_names) for id in ids: @@ -1917,7 +1921,7 @@ class account_tax(osv.osv): RETURN: [ tax ] tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2} - one tax for each tax id in IDS and their childs + one tax for each tax id in IDS and their children """ res = self._unit_compute(cr, uid, taxes, price_unit, address_id, product, partner, quantity) total = 0.0 @@ -2012,7 +2016,7 @@ class account_tax(osv.osv): RETURN: [ tax ] tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2} - one tax for each tax id in IDS and their childs + one tax for each tax id in IDS and their children """ res = self._unit_compute_inv(cr, uid, taxes, price_unit, address_id, product, partner=None) total = 0.0 diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py old mode 100644 new mode 100755 diff --git a/addons/account/account_assert_test.xml b/addons/account/account_assert_test.xml old mode 100644 new mode 100755 diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py old mode 100644 new mode 100755 diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py old mode 100644 new mode 100755 diff --git a/addons/account/account_demo.xml b/addons/account/account_demo.xml old mode 100644 new mode 100755 index 5ef0ee4992d..566185c70c3 --- a/addons/account/account_demo.xml +++ b/addons/account/account_demo.xml @@ -126,6 +126,9 @@ - + + + + diff --git a/addons/account/account_end_fy.xml b/addons/account/account_end_fy.xml old mode 100644 new mode 100755 diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml old mode 100644 new mode 100755 index 95dc29e64f6..97143197db4 --- a/addons/account/account_installer.xml +++ b/addons/account/account_installer.xml @@ -24,8 +24,8 @@ - - + + diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml old mode 100644 new mode 100755 index f0cec0abda3..5b661e3e7d7 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -155,7 +155,7 @@