\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:40+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
diff --git a/addons/account/installer.py b/addons/account/installer.py
index b85ac874874..680f8284295 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -170,7 +170,6 @@ class account_installer(osv.osv_memory):
'python_compute': tax.python_compute,
'python_compute_inv': tax.python_compute_inv,
'python_applicable': tax.python_applicable,
- 'tax_group':tax.tax_group,
'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False,
'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False,
'base_sign': tax.base_sign,
diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index b9e01e48bbf..21aa455b9c2 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -30,7 +30,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context):
super(aged_trial_report, self).__init__(cr, uid, name, context=context)
- self.query_line = ''
self.total_account = []
self.localcontext.update({
'time': time,
@@ -47,7 +46,8 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
})
def set_context(self, objects, data, ids, report_type=None):
- self.query = data['form'].get('query_line', '')
+ obj_move = self.pool.get('account.move.line')
+ self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
self.direction_selection = data['form'].get('direction_selection', 'past')
self.target_move = data['form'].get('target_move', 'all')
self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
diff --git a/addons/account/report/account_central_journal.py b/addons/account/report/account_central_journal.py
index 440460ce1f3..36af31da363 100644
--- a/addons/account/report/account_central_journal.py
+++ b/addons/account/report/account_central_journal.py
@@ -51,12 +51,13 @@ class journal_print(report_sxw.rml_parse, common_report_header):
})
def set_context(self, objects, data, ids, report_type=None):
+ obj_move = self.pool.get('account.move.line')
new_ids = ids
self.query_get_clause = ''
if (data['model'] == 'ir.ui.menu'):
new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or []
self.query_get_clause = 'AND '
- self.query_get_clause += data['form']['query_line'] or ''
+ self.query_get_clause += obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
if new_ids:
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
diff --git a/addons/account/report/account_general_journal.py b/addons/account/report/account_general_journal.py
index 684a75b1f20..e38f32ac217 100644
--- a/addons/account/report/account_general_journal.py
+++ b/addons/account/report/account_general_journal.py
@@ -53,12 +53,13 @@ class journal_print(report_sxw.rml_parse, common_report_header):
})
def set_context(self, objects, data, ids, report_type=None):
+ obj_move = self.pool.get('account.move.line')
new_ids = ids
self.query_get_clause = ''
if (data['model'] == 'ir.ui.menu'):
new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or []
self.query_get_clause = 'AND '
- self.query_get_clause += data['form']['query_line'] or ''
+ self.query_get_clause += obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
if new_ids:
self.cr.execute('SELECT period_id, journal_id FROM account_journal_period WHERE id IN %s', (tuple(new_ids),))
diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py
index d8ab573b083..80a7ff44f0e 100644
--- a/addons/account/report/account_general_ledger.py
+++ b/addons/account/report/account_general_ledger.py
@@ -38,9 +38,12 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
def set_context(self, objects, data, ids, report_type=None):
new_ids = ids
+ obj_move = self.pool.get('account.move.line')
self.sortby = data['form'].get('sortby', 'sort_date')
- self.query = data['form'].get('query_line', '')
- self.init_query = data['form']['initial_bal_query']
+ self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context',{}))
+ ctx2 = data['form'].get('used_context',{}).copy()
+ ctx2.update({'initial_bal': True})
+ self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx2)
self.init_balance = data['form']['initial_balance']
self.display_account = data['form']['display_account']
self.target_move = data['form'].get('target_move', 'all')
@@ -97,7 +100,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header):
FROM account_move_line l \
WHERE l.account_id = %s AND %s '%(account.id, self.init_query))
sum_currency += self.cr.fetchone()[0] or 0.0
- return str(sum_currency)
+ return sum_currency
def get_children_accounts(self, account):
res = []
diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml
index 163d5cb5f2c..1321bdea750 100644
--- a/addons/account/report/account_general_ledger_landscape.rml
+++ b/addons/account/report/account_general_ledger_landscape.rml
@@ -266,10 +266,10 @@
| [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] |
|
- [[formatLang(sum_debit_account(o)) ]] |
- [[formatLang(sum_credit_account(o)) ]] |
- [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] |
- [[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.code or '' ]] |
+ [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] |
+ [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]] |
@@ -292,9 +292,9 @@
[[ line['move'] ]] |
[[ line['lname'] ]] |
[[ strip_name(line['line_corresp'].replace(', ',','),40) ]] |
- [[ formatLang(line['debit']) ]] |
- [[ formatLang(line['credit']) ]] |
- [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] |
+ [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] |
[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]] |
@@ -327,9 +327,9 @@
| [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] |
|
- [[formatLang(sum_debit_account(o)) ]] |
- [[formatLang(sum_credit_account(o)) ]] |
- [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] |
+ [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] |
+ [[ formatLang(sum_credit_account(o), digits=get_digits(dp=Account)) ]] |
+ [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]] |
@@ -352,9 +352,9 @@
[[ line['move'] ]] |
[[ line['lname'] ]] |
[[ strip_name(line['line_corresp'],15) ]] |
- [[ formatLang(line['debit']) ]] |
- [[ formatLang(line['credit']) ]] |
- [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] |
+ [[ formatLang(line['debit'], dp='Account') ]] |
+ [[ formatLang(line['credit'], dp='Account') ]] |
+ [[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]] |
diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py
index 9d62829ef93..ac41bf0b3fd 100644
--- a/addons/account/report/account_journal.py
+++ b/addons/account/report/account_journal.py
@@ -52,13 +52,14 @@ class journal_print(report_sxw.rml_parse, common_report_header):
})
def set_context(self, objects, data, ids, report_type=None):
+ obj_move = self.pool.get('account.move.line')
new_ids = ids
self.query_get_clause = ''
self.target_move = data['form'].get('target_move', 'all')
if (data['model'] == 'ir.ui.menu'):
new_ids = data['form'].get('active_ids', [])
self.query_get_clause = 'AND '
- self.query_get_clause += data['form'].get('query_line', '')
+ self.query_get_clause += obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
self.sort_selection = data['form'].get('sort_selection', 'date')
objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids)
if new_ids:
diff --git a/addons/account/report/account_partner_balance.py b/addons/account/report/account_partner_balance.py
index dcf35665a02..7668a1ae2a6 100644
--- a/addons/account/report/account_partner_balance.py
+++ b/addons/account/report/account_partner_balance.py
@@ -22,6 +22,7 @@
import time
import re
import copy
+
from tools.translate import _
from report import report_sxw
from common_report_header import common_report_header
@@ -52,8 +53,8 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
def set_context(self, objects, data, ids, report_type=None):
self.display_partner = data['form'].get('display_partner', 'non-zero_balance')
- self.query = data['form'].get('query_line', '')
- self.init_query = data['form'].get('initial_bal_query', '')
+ obj_move = self.pool.get('account.move.line')
+ self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
self.result_selection = data['form'].get('result_selection')
self.target_move = data['form'].get('target_move', 'all')
@@ -116,7 +117,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
for rec in full_account:
if not rec.get('name', False):
rec.update({'name': _('Unknown Partner')})
-
+
## We will now compute Total
subtotal_row = self._add_subtotal(full_account)
return subtotal_row
@@ -141,8 +142,8 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
new_header['ref'] = ''
new_header['name'] = r['account_name']
new_header['code'] = r['code']
- new_header['debit'] = r['debit']
- new_header['credit'] = r['credit']
+ new_header['debit'] = r['debit']
+ new_header['credit'] = r['credit']
new_header['scredit'] = tot_scredit
new_header['sdebit'] = tot_sdebit
new_header['enlitige'] = tot_enlitige
diff --git a/addons/account/report/account_partner_ledger.py b/addons/account/report/account_partner_ledger.py
index 2a0c7446b6b..6ce8813fabb 100644
--- a/addons/account/report/account_partner_ledger.py
+++ b/addons/account/report/account_partner_ledger.py
@@ -56,8 +56,11 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header):
})
def set_context(self, objects, data, ids, report_type=None):
- self.query = data['form'].get('query_line', '')
- self.init_query = data['form'].get('initial_bal_query', '')
+ obj_move = self.pool.get('account.move.line')
+ self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {}))
+ ctx2 = data['form'].get('used_context',{}).copy()
+ ctx2.update({'initial_bal': True})
+ self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx2)
self.reconcil = data['form'].get('reconcil', True)
self.initial_balance = data['form'].get('initial_balance', True)
self.result_selection = data['form'].get('result_selection', 'customer')
diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml
index 326584d1b6b..f6d4ec3d88e 100644
--- a/addons/account/security/account_security.xml
+++ b/addons/account/security/account_security.xml
@@ -13,17 +13,12 @@
Accounting / Manager
-
- Accounting / Accountant and Manager
-
-
-
-
+
-
+
-
+
-
+
-
-
+
@@ -46,7 +46,7 @@
parent="menu_finance_payables"
icon="STOCK_JUSTIFY_FILL"
sequence="16"
- groups="group_account_user,group_account_manager,base.group_system"/>
+ groups="group_account_user,group_account_manager"/>
@@ -73,7 +73,7 @@
id="menu_action_account_moves_bank"
parent="account.menu_finance_bank_and_cash"
sequence="16"
- groups="group_account_user,group_account_manager,base.group_system"
+ groups="group_account_user,group_account_manager"
/>
diff --git a/addons/account/wizard/account_report_account_balance.py b/addons/account/wizard/account_report_account_balance.py
index ed37395acb5..475a7da5a74 100644
--- a/addons/account/wizard/account_report_account_balance.py
+++ b/addons/account/wizard/account_report_account_balance.py
@@ -49,8 +49,8 @@ class account_balance_report(osv.osv_memory):
res['arch'] = etree.tostring(doc)
return res
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ def _print_report(self, cr, uid, ids, data, context=None):
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['target_move'])[0])
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data}
diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py
index 10548095131..f421f3735fa 100644
--- a/addons/account/wizard/account_report_aged_partner_balance.py
+++ b/addons/account/wizard/account_report_aged_partner_balance.py
@@ -55,12 +55,12 @@ class account_aged_trial_balance(osv.osv_memory):
res['arch'] = etree.tostring(doc)
return res
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
res = {}
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['period_length', 'direction_selection'])[0])
period_length = data['form']['period_length']
@@ -70,7 +70,7 @@ class account_aged_trial_balance(osv.osv_memory):
raise osv.except_osv(_('UserError'), _('Enter a Start date !'))
start = datetime.strptime(data['form']['date_from'], "%Y-%m-%d")
-
+
if data['form']['direction_selection'] == 'past':
for i in range(5)[::-1]:
stop = start - relativedelta(days=period_length)
diff --git a/addons/account/wizard/account_report_balance_sheet.py b/addons/account/wizard/account_report_balance_sheet.py
index e3131e813c4..df6d58c9ae7 100644
--- a/addons/account/wizard/account_report_balance_sheet.py
+++ b/addons/account/wizard/account_report_balance_sheet.py
@@ -57,10 +57,10 @@ class account_bs_report(osv.osv_memory):
res['arch'] = etree.tostring(doc)
return res
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
account = self.pool.get('account.account').browse(cr, uid, data['form']['chart_account_id'])
if not account.company_id.property_reserve_and_surplus_account:
raise osv.except_osv(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !'))
diff --git a/addons/account/wizard/account_report_central_journal.py b/addons/account/wizard/account_report_central_journal.py
index e762e6d0591..0b402ae5f3d 100644
--- a/addons/account/wizard/account_report_central_journal.py
+++ b/addons/account/wizard/account_report_central_journal.py
@@ -25,8 +25,8 @@ class account_central_journal(osv.osv_memory):
_description = 'Account Central Journal'
_inherit = "account.common.journal.report"
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ def _print_report(self, cr, uid, ids, data, context=None):
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.central.journal',
diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py
index a9a343a0d6a..ed5e5b144ef 100644
--- a/addons/account/wizard/account_report_common.py
+++ b/addons/account/wizard/account_report_common.py
@@ -63,10 +63,10 @@ class account_common_report(osv.osv_memory):
if filter == 'filter_period' and fiscalyear_id:
start_period = end_period = False
cr.execute('''
- SELECT * FROM (SELECT p.id
- FROM account_period p
- LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
- WHERE f.id = %s
+ SELECT * FROM (SELECT p.id
+ FROM account_period p
+ LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
+ WHERE f.id = %s
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
@@ -112,29 +112,16 @@ class account_common_report(osv.osv_memory):
result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False
result['journal_ids'] = 'journal_ids' in data['form'] and data['form']['journal_ids'] or False
result['chart_account_id'] = 'chart_account_id' in data['form'] and data['form']['chart_account_id'] or False
- result_initial_bal = result.copy()
if data['form']['filter'] == 'filter_date':
result['date_from'] = data['form']['date_from']
result['date_to'] = data['form']['date_to']
- result_initial_bal['date_from'] = '0001-01-01'
- result_initial_bal['date_to'] = (datetime.datetime.strptime(data['form']['date_from'], "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d')
elif data['form']['filter'] == 'filter_period':
if not data['form']['period_from'] or not data['form']['period_to']:
raise osv.except_osv(_('Error'),_('Select a starting and an ending period'))
- company_id = period_obj.browse(cr, uid, data['form']['period_from'], context=context).company_id.id
result['periods'] = period_obj.build_ctx_periods(cr, uid, data['form']['period_from'], data['form']['period_to'])
- first_period = self.pool.get('account.period').search(cr, uid, [('company_id', '=', company_id)], order='date_start', limit=1)[0]
- result_initial_bal['periods'] = period_obj.build_ctx_periods(cr, uid, first_period, data['form']['period_from'])
- else:
- if data['form']['fiscalyear_id']:
- fiscal_date_start = fiscal_obj.browse(cr, uid, [data['form']['fiscalyear_id']], context=context)[0].date_start
- result_initial_bal['empty_fy_allow'] = True #Improve me => there should be something generic in account.move.line -> query get
- result_initial_bal['fiscalyear'] = fiscal_obj.search(cr, uid, [('date_stop', '<', fiscal_date_start), ('state', '=', 'draft')], context=context)
- result_initial_bal['date_from'] = '0001-01-01'
- result_initial_bal['date_to'] = (datetime.datetime.strptime(fiscal_date_start, "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d')
- return result, result_initial_bal
+ return result
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
raise (_('Error'), _('not implemented'))
def check_report(self, cr, uid, ids, context=None):
@@ -145,12 +132,10 @@ class account_common_report(osv.osv_memory):
data['ids'] = context.get('active_ids', [])
data['model'] = context.get('active_model', 'ir.ui.menu')
data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id'])[0]
- used_context, used_context_initial_bal = self._build_contexts(cr, uid, ids, data, context=context)
- query_line = obj_move._query_get(cr, uid, obj='l', context=used_context)
+ used_context = self._build_contexts(cr, uid, ids, data, context=context)
data['form']['periods'] = used_context.get('periods', False) and used_context['periods'] or []
- data['form']['query_line'] = query_line
- data['form']['initial_bal_query'] = obj_move._query_get(cr, uid, obj='l', context=used_context_initial_bal)
- return self._print_report(cr, uid, ids, data, query_line, context=context)
+ data['form']['used_context'] = used_context
+ return self._print_report(cr, uid, ids, data, context=context)
account_common_report()
diff --git a/addons/account/wizard/account_report_common_account.py b/addons/account/wizard/account_report_common_account.py
index 4f84d8f3264..4ed71ec9389 100644
--- a/addons/account/wizard/account_report_common_account.py
+++ b/addons/account/wizard/account_report_common_account.py
@@ -35,7 +35,7 @@ class account_common_account_report(osv.osv_memory):
'display_account': 'bal_all',
}
- def pre_print_report(self, cr, uid, ids, data, query_line, context=None):
+ def pre_print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
data['form'].update(self.read(cr, uid, ids, ['display_account'])[0])
@@ -43,4 +43,4 @@ class account_common_account_report(osv.osv_memory):
account_common_account_report()
-#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/wizard/account_report_common_journal.py b/addons/account/wizard/account_report_common_journal.py
index 44ee8448316..9ec12b16177 100644
--- a/addons/account/wizard/account_report_common_journal.py
+++ b/addons/account/wizard/account_report_common_journal.py
@@ -38,7 +38,7 @@ class account_common_journal_report(osv.osv_memory):
result['periods'] = map(lambda x: x[0], cr.fetchall())
return result
- def pre_print_report(self, cr, uid, ids, data, query_line, context=None):
+ def pre_print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
data['form'].update(self.read(cr, uid, ids, ['amount_currency'])[0])
diff --git a/addons/account/wizard/account_report_common_partner.py b/addons/account/wizard/account_report_common_partner.py
index 64bbde2cdd3..35ece1c0b02 100644
--- a/addons/account/wizard/account_report_common_partner.py
+++ b/addons/account/wizard/account_report_common_partner.py
@@ -39,7 +39,7 @@ class account_common_partner_report(osv.osv_memory):
'target_move': 'all'
}
- def pre_print_report(self, cr, uid, ids, data, query_line, context=None):
+ def pre_print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
data['form'].update(self.read(cr, uid, ids, ['result_selection', 'target_move'])[0])
diff --git a/addons/account/wizard/account_report_general_journal.py b/addons/account/wizard/account_report_general_journal.py
index 67eea1e2c89..af091d9bc08 100644
--- a/addons/account/wizard/account_report_general_journal.py
+++ b/addons/account/wizard/account_report_general_journal.py
@@ -26,8 +26,8 @@ class account_general_journal(osv.osv_memory):
_name = 'account.general.journal'
_description = 'Account General Journal'
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ def _print_report(self, cr, uid, ids, data, context=None):
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
return {'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': data}
account_general_journal()
diff --git a/addons/account/wizard/account_report_general_ledger.py b/addons/account/wizard/account_report_general_ledger.py
index ada80db1762..37ac27bc2ec 100644
--- a/addons/account/wizard/account_report_general_ledger.py
+++ b/addons/account/wizard/account_report_general_ledger.py
@@ -49,10 +49,10 @@ class account_report_general_ledger(osv.osv_memory):
res['value'] = {'initial_balance': False}
return res
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby', 'target_move'])[0])
if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record
data['form'].update({'initial_balance': False})
@@ -62,4 +62,4 @@ class account_report_general_ledger(osv.osv_memory):
account_report_general_ledger()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/wizard/account_report_partner_balance.py b/addons/account/wizard/account_report_partner_balance.py
index 744e8bf5fc1..43081b046ba 100644
--- a/addons/account/wizard/account_report_partner_balance.py
+++ b/addons/account/wizard/account_report_partner_balance.py
@@ -40,10 +40,10 @@ class account_partner_balance(osv.osv_memory):
'display_partner': 'non-zero_balance',
}
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['display_partner'])[0])
return {
'type': 'ir.actions.report.xml',
diff --git a/addons/account/wizard/account_report_partner_ledger.py b/addons/account/wizard/account_report_partner_ledger.py
index e0e3778966b..1a09a6344f4 100644
--- a/addons/account/wizard/account_report_partner_ledger.py
+++ b/addons/account/wizard/account_report_partner_ledger.py
@@ -43,10 +43,10 @@ class account_partner_ledger(osv.osv_memory):
'page_split': False,
}
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'])[0])
if data['form']['page_split']:
return {
diff --git a/addons/account/wizard/account_report_print_journal.py b/addons/account/wizard/account_report_print_journal.py
index 096678860ac..f264524dc4b 100644
--- a/addons/account/wizard/account_report_print_journal.py
+++ b/addons/account/wizard/account_report_print_journal.py
@@ -38,10 +38,10 @@ class account_print_journal(osv.osv_memory):
'target_move': 'all'
}
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['sort_selection','target_move'])[0])
return {'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print', 'datas': data}
diff --git a/addons/account/wizard/account_report_profit_loss.py b/addons/account/wizard/account_report_profit_loss.py
index fd73571d7f5..bc36e233685 100644
--- a/addons/account/wizard/account_report_profit_loss.py
+++ b/addons/account/wizard/account_report_profit_loss.py
@@ -50,10 +50,10 @@ class account_pl_report(osv.osv_memory):
res['arch'] = etree.tostring(doc)
return res
- def _print_report(self, cr, uid, ids, data, query_line, context=None):
+ def _print_report(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
- data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
+ data = self.pre_print_report(cr, uid, ids, data, context=context)
data['form'].update(self.read(cr, uid, ids, ['display_type'])[0])
if data['form']['display_type']:
return {
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index f6ab3949abd..05a79ca55e6 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -8,7 +8,6 @@
form
diff --git a/addons/account_accountant/account_security.xml b/addons/account_accountant/account_security.xml
index 0b167de9853..429508ebabc 100644
--- a/addons/account_accountant/account_security.xml
+++ b/addons/account_accountant/account_security.xml
@@ -2,129 +2,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/addons/account_analytic_plans/i18n/nl.po b/addons/account_analytic_plans/i18n/nl.po
index fdb18e54ef1..3312a5bbe38 100644
--- a/addons/account_analytic_plans/i18n/nl.po
+++ b/addons/account_analytic_plans/i18n/nl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-08-02 20:54+0000\n"
-"Last-Translator: mga (Open ERP) \n"
+"PO-Revision-Date: 2010-09-30 13:07+0000\n"
+"Last-Translator: Douwe Wullink (Dypalio) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:07+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans
@@ -61,7 +61,7 @@ msgstr "Kostenplaatsschema"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
-msgstr ""
+msgstr "Kostenverdelingsregel"
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
@@ -210,7 +210,7 @@ msgstr "Kostenverdelingsmodel opgeslagen"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
-msgstr ""
+msgstr "Kostenverdeling"
#. module: account_analytic_plans
#: constraint:ir.ui.view:0
@@ -294,7 +294,7 @@ msgstr "Meedere schema's beheren in kostenplaatsen"
#: view:account.analytic.plan.line:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
msgid "Analytic Plan Lines"
-msgstr "Kostenpalatsboekingen"
+msgstr "Kostenplaatsboekingen"
#. module: account_analytic_plans
#: rml:account.analytic.account.crossovered.analytic:0
@@ -361,7 +361,7 @@ msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
-msgstr "Reeks"
+msgstr "Volgnummer"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
diff --git a/addons/account_anglo_saxon/i18n/nl.po b/addons/account_anglo_saxon/i18n/nl.po
index 0970e2ae3e6..223258c73fa 100644
--- a/addons/account_anglo_saxon/i18n/nl.po
+++ b/addons/account_anglo_saxon/i18n/nl.po
@@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-24 12:50+0000\n"
-"PO-Revision-Date: 2010-07-16 15:49+0000\n"
-"Last-Translator: Jan Verlaan (Veritos) \n"
+"PO-Revision-Date: 2010-09-30 13:20+0000\n"
+"Last-Translator: Douwe Wullink (Dypalio) \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
-msgstr ""
+msgstr " Administratieve instelling"
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
@@ -38,6 +38,19 @@ msgid ""
" when the invoice is created to transfer this amount to the debtor or "
"creditor account."
msgstr ""
+"Deze module geeft ondersteuning voor de Angelsaksische boekhoud methoden "
+"door \n"
+" de boekingslogica bij voorraad transacties te veranderen. Het verschil "
+"tussen de Angelsaksische boekhoud landen en de\n"
+" Rijn- of ook wel continentale boekhoud landen is het moment van het "
+"nemen van de kosten van verkochte goederen versus kostprijs verkopen. \n"
+" Angelsaksische boekhoudingen nemen de kosten op het wanneer de "
+"verkoopfactuur wordt gemaakt, Continentale boekhoudingen wanneer wordt "
+"geleverd.\n"
+" Deze module voegt deze functionaliteit toe door een tussenrekening te "
+"gebruiken voor het boeken van de geleverde goederen en \n"
+" voor het tegenboeken wanneer de factuur wordt gemaakt om het over te "
+"boeken naar de klant of leverancier."
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
diff --git a/addons/account_budget/__openerp__.py b/addons/account_budget/__openerp__.py
index 4fd24da70e9..b023e7e1124 100644
--- a/addons/account_budget/__openerp__.py
+++ b/addons/account_budget/__openerp__.py
@@ -26,9 +26,8 @@
'category': 'Generic Modules/Accounting',
'description': """This module allows accountants to manage analytic and crossovered budgets.
-Once the Master Budgets and the Budgets are defined (in Financial
-Management/Budgets/), the Project Managers can set the planned amount on each
-Analytic Account.
+Once the Master Budgets and the Budgets are defined (in Accounting/Budgets/),
+the Project Managers can set the planned amount on each Analytic Account.
The accountant has the possibility to see the total of amount planned for each
Budget and Master Budget in order to ensure the total planned is not
diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/crossovered_budget.py
index 6c7eb6639ec..99c90badf60 100644
--- a/addons/account_budget/crossovered_budget.py
+++ b/addons/account_budget/crossovered_budget.py
@@ -24,6 +24,8 @@ import datetime
from osv import osv, fields
from tools.translate import _
+import decimal_precision as dp
+
def strToDate(dt):
dt_date=datetime.date(int(dt[0:4]),int(dt[5:7]),int(dt[8:10]))
return dt_date
@@ -49,12 +51,13 @@ class account_budget_post(osv.osv):
def spread(self, cr, uid, ids, fiscalyear_id=False, amount=0.0):
dobj = self.pool.get('account.budget.post.dotation')
+ obj_fiscalyear = self.pool.get('account.fiscalyear')
for o in self.browse(cr, uid, ids):
# delete dotations for this post
dobj.unlink(cr, uid, dobj.search(cr, uid, [('post_id','=',o.id)]))
# create one dotation per period in the fiscal year, and spread the total amount/quantity over those dotations
- fy = self.pool.get('account.fiscalyear').browse(cr, uid, [fiscalyear_id])[0]
+ fy = obj_fiscalyear.browse(cr, uid, [fiscalyear_id])[0]
num = len(fy.period_ids)
for p in fy.period_ids:
dobj.create(cr, uid, {'post_id': o.id, 'period_id': p.id, 'amount': amount/num})
@@ -64,26 +67,27 @@ account_budget_post()
class account_budget_post_dotation(osv.osv):
def _tot_planned(self, cr, uid, ids, name, args, context):
+ obj_budget_lines = self.pool.get('crossovered.budget.lines')
res = {}
for line in self.browse(cr, uid, ids):
if line.period_id:
- obj_period=self.pool.get('account.period').browse(cr, uid, line.period_id.id)
+ obj_period = self.pool.get('account.period').browse(cr, uid, line.period_id.id)
- total_days=strToDate(obj_period.date_stop) - strToDate(obj_period.date_start)
- budget_id=line.post_id and line.post_id.id or False
- query="select id from crossovered_budget_lines where \
- general_budget_id= %s AND (date_from >=%s and date_from <= %s ) \
- OR (date_to >=%s and date_to <= %s) OR (date_from < %s and date_to > %s)"
- cr.execute(query,(budget_id,obj_period.date_start,obj_period.date_stop,obj_period.date_start,obj_period.date_stop,obj_period.date_start,obj_period.date_stop,))
- res1=cr.fetchall()
- tot_planned=0.00
+ total_days = strToDate(obj_period.date_stop) - strToDate(obj_period.date_start)
+ budget_id = line.post_id and line.post_id.id or False
+ query="SELECT id FROM crossovered_budget_lines WHERE \
+ general_budget_id= %s AND (date_from >=%s AND date_from <= %s ) \
+ OR (date_to >=%s AND date_to <= %s) OR (date_from < %s AND date_to > %s)"
+ cr.execute(query, (budget_id, obj_period.date_start, obj_period.date_stop, obj_period.date_start, obj_period.date_stop, obj_period.date_start, obj_period.date_stop,))
+ res1 = cr.fetchall()
+ tot_planned = 0.00
for record in res1:
- obj_lines = self.pool.get('crossovered.budget.lines').browse(cr, uid, record[0])
- count_days = min(strToDate(obj_period.date_stop),strToDate(obj_lines.date_to)) - max(strToDate(obj_period.date_start), strToDate(obj_lines.date_from))
- days_in_period = count_days.days +1
+ obj_lines = obj_budget_lines.browse(cr, uid, record[0])
+ count_days = min(strToDate(obj_period.date_stop), strToDate(obj_lines.date_to)) - max(strToDate(obj_period.date_start), strToDate(obj_lines.date_from))
+ days_in_period = count_days.days + 1
count_days = strToDate(obj_lines.date_to) - strToDate(obj_lines.date_from)
- total_days_of_rec = count_days.days +1
- tot_planned += obj_lines.planned_amount/total_days_of_rec* days_in_period
+ total_days_of_rec = count_days.days + 1
+ tot_planned += obj_lines.planned_amount / total_days_of_rec * days_in_period
res[line.id] = tot_planned
else:
res[line.id] = 0.00
@@ -96,7 +100,7 @@ class account_budget_post_dotation(osv.osv):
'post_id': fields.many2one('account.budget.post', 'Item', select=True),
'period_id': fields.many2one('account.period', 'Period'),
'amount': fields.float('Amount', digits=(16,2)),
- 'tot_planned':fields.function(_tot_planned, method=True, string='Total Planned Amount', type='float', store=True),
+ 'tot_planned': fields.function(_tot_planned, method=True, string='Total Planned Amount', type='float', store=True),
}
account_budget_post_dotation()
@@ -119,38 +123,38 @@ class crossovered_budget(osv.osv):
_defaults = {
'state': 'draft',
- 'creating_user_id': lambda self,cr,uid,context: uid,
- 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c)
+ 'creating_user_id': lambda self, cr, uid, context: uid,
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.budget.post', context=c)
}
def budget_confirm(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {
- 'state':'confirm'
+ 'state': 'confirm'
})
return True
def budget_draft(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {
- 'state':'draft'
+ 'state': 'draft'
})
return True
def budget_validate(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {
- 'state':'validate',
+ 'state': 'validate',
'validating_user_id': uid,
})
return True
def budget_cancel(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {
- 'state':'cancel'
+ 'state': 'cancel'
})
return True
def budget_done(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {
- 'state':'done'
+ 'state': 'done'
})
return True
@@ -158,7 +162,7 @@ crossovered_budget()
class crossovered_budget_lines(osv.osv):
- def _prac_amt(self, cr, uid, ids,context={}):
+ def _prac_amt(self, cr, uid, ids, context={}):
res = {}
for line in self.browse(cr, uid, ids):
acc_ids = [x.id for x in line.general_budget_id.account_ids]
@@ -170,8 +174,8 @@ class crossovered_budget_lines(osv.osv):
date_from = context['wizard_date_from']
if context.has_key('wizard_date_to'):
date_to = context['wizard_date_to']
- cr.execute("select sum(amount) from account_analytic_line where account_id=%s and (date "
- "between to_date(%s,'yyyy-mm-dd') and to_date(%s,'yyyy-mm-dd')) and "
+ cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id=%s AND (date "
+ "between to_date(%s,'yyyy-mm-dd') AND to_date(%s,'yyyy-mm-dd')) AND "
"general_account_id=ANY(%s)", (line.analytic_account_id.id, date_from, date_to,acc_ids,))
result = cr.fetchone()[0]
if result is None:
@@ -182,13 +186,13 @@ class crossovered_budget_lines(osv.osv):
def _prac(self, cr, uid, ids, name, args, context):
res={}
for line in self.browse(cr, uid, ids):
- res[line.id]=self._prac_amt(cr, uid, [line.id], context=context)[line.id]
+ res[line.id] = self._prac_amt(cr, uid, [line.id], context=context)[line.id]
return res
- def _theo_amt(self, cr, uid, ids,context={}):
+ def _theo_amt(self, cr, uid, ids, context={}):
res = {}
for line in self.browse(cr, uid, ids):
- today=datetime.datetime.today()
+ today = datetime.datetime.today()
date_to = today.strftime("%Y-%m-%d")
date_from = line.date_from
if context.has_key('wizard_date_from'):
@@ -197,38 +201,37 @@ class crossovered_budget_lines(osv.osv):
date_to = context['wizard_date_to']
if line.paid_date:
- if strToDate(line.date_to)<=strToDate(line.paid_date):
- theo_amt=0.00
+ if strToDate(line.date_to) <= strToDate(line.paid_date):
+ theo_amt = 0.00
else:
- theo_amt=line.planned_amount
+ theo_amt = line.planned_amount
else:
- total=strToDate(line.date_to) - strToDate(line.date_from)
+ total = strToDate(line.date_to) - strToDate(line.date_from)
elapsed = min(strToDate(line.date_to),strToDate(date_to)) - max(strToDate(line.date_from),strToDate(date_from))
if strToDate(date_to) < strToDate(line.date_from):
elapsed = strToDate(date_to) - strToDate(date_to)
if total.days:
- theo_amt = float(elapsed.days/float(total.days))*line.planned_amount
+ theo_amt = float(elapsed.days / float(total.days)) * line.planned_amount
else:
theo_amt = line.planned_amount
- res[line.id]=theo_amt
+ res[line.id] = theo_amt
return res
def _theo(self, cr, uid, ids, name, args, context):
- res={}
+ res = {}
for line in self.browse(cr, uid, ids):
- res[line.id]=self._theo_amt(cr, uid, [line.id], context=context)[line.id]
-
+ res[line.id] = self._theo_amt(cr, uid, [line.id], context=context)[line.id]
return res
def _perc(self, cr, uid, ids, name, args, context):
res = {}
for line in self.browse(cr, uid, ids):
- if line.theoritical_amount<>0.00:
- res[line.id]=float(line.practical_amount or 0.0 / line.theoritical_amount)*100
+ if line.theoritical_amount <> 0.00:
+ res[line.id] = float(line.practical_amount or 0.0 / line.theoritical_amount) * 100
else:
- res[line.id]=0.00
+ res[line.id] = 0.00
return res
_name = "crossovered.budget.lines"
@@ -240,9 +243,9 @@ class crossovered_budget_lines(osv.osv):
'date_from': fields.date('Start Date', required=True),
'date_to': fields.date('End Date', required=True),
'paid_date': fields.date('Paid Date'),
- 'planned_amount':fields.float('Planned Amount', required=True, digits=(16,2)),
- 'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits=(16,2)),
- 'theoritical_amount':fields.function(_theo, method=True, string='Theoritical Amount', type='float', digits=(16,2)),
+ 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
+ 'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
+ 'theoritical_amount':fields.function(_theo, method=True, string='Theoritical Amount', type='float', digits_compute=dp.get_precision('Account')),
'percentage':fields.function(_perc, method=True, string='Percentage', type='float'),
'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}
@@ -258,4 +261,4 @@ class account_analytic_account(osv.osv):
account_analytic_account()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_budget/report/analytic_account_budget_report.py b/addons/account_budget/report/analytic_account_budget_report.py
index c724968a06d..aa5d39f8d49 100644
--- a/addons/account_budget/report/analytic_account_budget_report.py
+++ b/addons/account_budget/report/analytic_account_budget_report.py
@@ -33,47 +33,43 @@ class analytic_account_budget_report(report_sxw.rml_parse):
'funct_total': self.funct_total,
'time': time,
})
- self.context=context
-
- def funct(self,object,form,ids={}, done=None, level=1):
+ self.context = context
+ def funct(self, object, form, ids={}, done=None, level=1):
if not ids:
ids = self.ids
if not done:
- done={}
+ done = {}
global tot
- tot={
+ tot = {
'theo':0.00,
'pln':0.00,
'prac':0.00,
'perc':0.00
}
- result=[]
+ result = []
accounts = self.pool.get('account.analytic.account').browse(self.cr, self.uid, [object.id], self.context.copy())
+ c_b_lines_obj = self.pool.get('crossovered.budget.lines')
+ obj_c_budget = self.pool.get('crossovered.budget')
- c_b_lines_obj=self.pool.get('crossovered.budget.lines')
for account_id in accounts:
- res={}
- b_line_ids=[]
-
+ res = {}
+ b_line_ids = []
for line in account_id.crossovered_budget_line:
b_line_ids.append(line.id)
-
if not b_line_ids:
return []
+ d_from = form['date_from']
+ d_to = form['date_to']
- d_from=form['date_from']
- d_to=form['date_to']
+ self.cr.execute('SELECT DISTINCT(crossovered_budget_id) FROM crossovered_budget_lines WHERE id =ANY(%s)',(b_line_ids,))
+ budget_ids = self.cr.fetchall()
- self.cr.execute('select distinct(crossovered_budget_id) from crossovered_budget_lines where id =ANY(%s)',(b_line_ids,))
- budget_ids=self.cr.fetchall()
-
- context={'wizard_date_from':d_from,'wizard_date_to':d_to}
- for i in range(0,len(budget_ids)):
-
- budget_name=self.pool.get('crossovered.budget').browse(self.cr, self.uid,[budget_ids[i][0]])
- res={
+ context = {'wizard_date_from':d_from,'wizard_date_to':d_to}
+ for i in range(0, len(budget_ids)):
+ budget_name = obj_c_budget.browse(self.cr, self.uid, [budget_ids[i][0]])
+ res= {
'b_id':'-1',
'a_id':'-1',
'name':budget_name[0].name,
@@ -85,48 +81,42 @@ class analytic_account_budget_report(report_sxw.rml_parse):
}
result.append(res)
- line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', b_line_ids),('crossovered_budget_id','=',budget_ids[i][0])])
- line_id =c_b_lines_obj.browse(self.cr,self.uid,line_ids)
- tot_theo=tot_pln=tot_prac=tot_perc=0
+ line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', b_line_ids), ('crossovered_budget_id','=',budget_ids[i][0])])
+ line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
+ tot_theo = tot_pln = tot_prac = tot_perc = 0
- done_budget=[]
+ done_budget = []
for line in line_id:
-
if line.id in b_line_ids:
- theo=pract=0.00
- theo=c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id],context)[line.id]
- pract=c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id],context)[line.id]
-
+ theo = pract = 0.00
+ theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
+ pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
if line.general_budget_id.id in done_budget:
-
for record in result:
- if record['b_id']==line.general_budget_id.id and record['a_id']==line.analytic_account_id.id:
-
- record['theo'] +=theo
- record['pln'] +=line.planned_amount
- record['prac'] +=pract
- record['perc'] +=line.percentage
- tot_theo +=theo
- tot_pln +=line.planned_amount
- tot_prac +=pract
- tot_perc +=line.percentage
+ if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
+ record['theo'] += theo
+ record['pln'] += line.planned_amount
+ record['prac'] += pract
+ record['perc'] += line.percentage
+ tot_theo += theo
+ tot_pln += line.planned_amount
+ tot_prac += pract
+ tot_perc += line.percentage
else:
-
- res1={
- 'b_id':line.general_budget_id.id,
- 'a_id':line.analytic_account_id.id,
- 'name':line.general_budget_id.name,
- 'status':2,
- 'theo':theo,
- 'pln':line.planned_amount,
- 'prac':pract,
- 'perc':line.percentage
+ res1 = {
+ 'b_id': line.general_budget_id.id,
+ 'a_id': line.analytic_account_id.id,
+ 'name': line.general_budget_id.name,
+ 'status': 2,
+ 'theo': theo,
+ 'pln': line.planned_amount,
+ 'prac': pract,
+ 'perc': line.percentage
}
-
tot_theo += theo
- tot_pln +=line.planned_amount
- tot_prac +=pract
- tot_perc +=line.percentage
+ tot_pln += line.planned_amount
+ tot_prac += pract
+ tot_perc += line.percentage
result.append(res1)
done_budget.append(line.general_budget_id.id)
else:
@@ -134,50 +124,45 @@ class analytic_account_budget_report(report_sxw.rml_parse):
continue
else:
res1={
- 'b_id':line.general_budget_id.id,
- 'a_id':line.analytic_account_id.id,
- 'name':line.general_budget_id.name,
- 'status':2,
- 'theo':0.00,
- 'pln':0.00,
- 'prac':0.00,
- 'perc':0.00
+ 'b_id': line.general_budget_id.id,
+ 'a_id': line.analytic_account_id.id,
+ 'name': line.general_budget_id.name,
+ 'status': 2,
+ 'theo': 0.00,
+ 'pln': 0.00,
+ 'prac': 0.00,
+ 'perc': 0.00
}
-
result.append(res1)
done_budget.append(line.general_budget_id.id)
-
- if tot_theo==0.00:
- tot_perc=0.00
+ if tot_theo == 0.00:
+ tot_perc = 0.00
else:
- tot_perc=float(tot_prac /tot_theo)*100
+ tot_perc = float(tot_prac / tot_theo) * 100
- result[-(len(done_budget) +1)]['theo']=tot_theo
+ result[-(len(done_budget) +1)]['theo'] = tot_theo
tot['theo'] +=tot_theo
- result[-(len(done_budget) +1)]['pln']=tot_pln
+ result[-(len(done_budget) +1)]['pln'] = tot_pln
tot['pln'] +=tot_pln
- result[-(len(done_budget) +1)]['prac']=tot_prac
+ result[-(len(done_budget) +1)]['prac'] = tot_prac
tot['prac'] +=tot_prac
- result[-(len(done_budget) +1)]['perc']=tot_perc
-
- if tot['theo']==0.00:
- tot['perc'] =0.00
+ result[-(len(done_budget) +1)]['perc'] = tot_perc
+ if tot['theo'] == 0.00:
+ tot['perc'] = 0.00
else:
- tot['perc']=float(tot['prac'] /tot['theo'])*100
-
+ tot['perc'] = float(tot['prac'] / tot['theo']) * 100
return result
def funct_total(self,form):
- result=[]
- res={}
- res={
- 'tot_theo':tot['theo'],
- 'tot_pln':tot['pln'],
- 'tot_prac':tot['prac'],
- 'tot_perc':tot['perc']
+ result = []
+ res = {}
+ res = {
+ 'tot_theo': tot['theo'],
+ 'tot_pln': tot['pln'],
+ 'tot_prac': tot['prac'],
+ 'tot_perc': tot['perc']
}
result.append(res)
-
return result
report_sxw.report_sxw('report.account.analytic.account.budget', 'account.analytic.account', 'addons/account_budget/report/analytic_account_budget_report.rml',parser=analytic_account_budget_report,header='internal')
diff --git a/addons/account_budget/report/budget_report.py b/addons/account_budget/report/budget_report.py
index 171984e9851..7db3925fd4d 100644
--- a/addons/account_budget/report/budget_report.py
+++ b/addons/account_budget/report/budget_report.py
@@ -38,17 +38,19 @@ class budget_report(report_sxw.rml_parse):
def post_total(self, post_obj, date1, date2):
def str2date(date_str):
return datetime.date.fromtimestamp(time.mktime(time.strptime(date_str, '%Y-%m-%d')))
+
def interval(d1str, d2str):
return (str2date(d2str) - str2date(d1str) + datetime.timedelta(days=1)).days
+
prev = reduce(lambda x,d: x + d.amount, post_obj.dotation_ids, 0.0)
period_days = interval(date1, date2)
for d in post_obj.dotation_ids:
i = interval(d.period_id.date_start, d.period_id.date_stop)
total_days = reduce(lambda x,d: x+interval(d.period_id.date_start, d.period_id.date_stop), post_obj.dotation_ids, 0)
achievements = reduce(lambda x,l: x+l['achievements'], self.lines(post_obj, date1, date2), 0.0)
- prev_1=1.00
- if total_days<>0.00:
- prev_1=prev * period_days / total_days
+ prev_1 = 1.00
+ if total_days <> 0.00:
+ prev_1 = prev * period_days / total_days
return [{'prev': prev, 'prev_period': prev_1, 'achievements': achievements}]
def budget_total(self, post_obj, date1, date2):
@@ -66,7 +68,7 @@ class budget_report(report_sxw.rml_parse):
res.append({'name': a.name, 'code': a.code, 'achievements': achievements})
return res
-report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml',parser=budget_report, header="internal")
+report_sxw.report_sxw('report.account.budget', 'account.budget.post', 'addons/account_budget/report/budget_report.rml', parser=budget_report, header="internal")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account_budget/report/crossovered_budget_report.py b/addons/account_budget/report/crossovered_budget_report.py
index 464e0c1acf9..8a3b745e32a 100644
--- a/addons/account_budget/report/crossovered_budget_report.py
+++ b/addons/account_budget/report/crossovered_budget_report.py
@@ -20,48 +20,46 @@
##############################################################################
import time
+import datetime
+
import pooler
from report import report_sxw
-import datetime
import operator
import osv
class budget_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(budget_report, self).__init__(cr, uid, name, context=context)
- self.localcontext.update( {
+ self.localcontext.update({
'funct': self.funct,
'funct_total': self.funct_total,
'time': time,
})
- self.context=context
+ self.context = context
def funct(self, object, form, ids={}, done=None, level=1):
-
if not ids:
ids = self.ids
if not done:
- done={}
-
+ done = {}
global tot
- tot={
+ tot = {
'theo':0.00,
'pln':0.00,
'prac':0.00,
'perc':0.00
}
- result=[]
+ result = []
budgets = self.pool.get('crossovered.budget').browse(self.cr, self.uid, [object.id], self.context.copy())
-
- c_b_lines_obj=self.pool.get('crossovered.budget.lines')
+ c_b_lines_obj = self.pool.get('crossovered.budget.lines')
+ acc_analytic_obj = self.pool.get('account.analytic.account')
for budget_id in budgets:
-
- res={}
- budget_lines=[]
- budget_ids=[]
- d_from=form['date_from']
- d_to=form['date_to']
+ res = {}
+ budget_lines = []
+ budget_ids = []
+ d_from = form['date_from']
+ d_to = form['date_to']
for line in budget_id.crossovered_budget_line:
budget_ids.append(line.id)
@@ -69,78 +67,69 @@ class budget_report(report_sxw.rml_parse):
if not budget_ids:
return []
- self.cr.execute('select distinct(analytic_account_id) from crossovered_budget_lines where id =ANY(%s)',(budget_ids,))
- an_ids=self.cr.fetchall()
-
- context={'wizard_date_from':d_from,'wizard_date_to':d_to}
- for i in range(0,len(an_ids)):
-
- analytic_name=self.pool.get('account.analytic.account').browse(self.cr, self.uid, [an_ids[i][0]])
+ self.cr.execute('SELECT DISTINCT(analytic_account_id) FROM crossovered_budget_lines WHERE id = ANY(%s)',(budget_ids,))
+ an_ids = self.cr.fetchall()
+ context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
+ for i in range(0, len(an_ids)):
+ analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
res={
- 'b_id':'-1',
- 'a_id':'-1',
- 'name':analytic_name[0].name,
- 'status':1,
- 'theo':0.00,
- 'pln':0.00,
- 'prac':0.00,
- 'perc':0.00
+ 'b_id': '-1',
+ 'a_id': '-1',
+ 'name': analytic_name[0].name,
+ 'status': 1,
+ 'theo': 0.00,
+ 'pln': 0.00,
+ 'prac': 0.00,
+ 'perc': 0.00
}
result.append(res)
- line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids),('analytic_account_id','=',an_ids[i][0])])
-
+ line_ids = c_b_lines_obj.search(self.cr, self.uid, [('id', 'in', budget_ids), ('analytic_account_id','=',an_ids[i][0])])
line_id = c_b_lines_obj.browse(self.cr, self.uid, line_ids)
- tot_theo=tot_pln=tot_prac=tot_perc=0.00
+ tot_theo = tot_pln = tot_prac = tot_perc = 0.00
- done_budget=[]
+ done_budget = []
for line in line_id:
-
if line.id in budget_ids:
- theo=pract=0.00
- theo=c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id],context)[line.id]
- pract=c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id],context)[line.id]
-
+ theo = pract = 0.00
+ theo = c_b_lines_obj._theo_amt(self.cr, self.uid, [line.id], context)[line.id]
+ pract = c_b_lines_obj._prac_amt(self.cr, self.uid, [line.id], context)[line.id]
if line.general_budget_id.id in done_budget:
-
for record in result:
- if record['b_id']==line.general_budget_id.id and record['a_id']==line.analytic_account_id.id:
-
- record['theo'] +=theo
- record['pln'] +=line.planned_amount
- record['prac'] +=pract
- if record['theo']<>0.00:
- perc=(record['prac']/record['theo'])*100
+ if record['b_id'] == line.general_budget_id.id and record['a_id'] == line.analytic_account_id.id:
+ record['theo'] += theo
+ record['pln'] += line.planned_amount
+ record['prac'] += pract
+ if record['theo'] <> 0.00:
+ perc = (record['prac'] / record['theo']) * 100
else:
- perc=0.00
- record['perc'] =perc
+ perc = 0.00
+ record['perc'] = perc
tot_theo += theo
- tot_pln +=line.planned_amount
- tot_prac +=pract
- tot_perc +=perc
-
+ tot_pln += line.planned_amount
+ tot_prac += pract
+ tot_perc += perc
else:
-
- if theo<>0.00:
- perc=(pract/theo)*100
+ if theo <> 0.00:
+ perc = (pract / theo) * 100
else:
- perc=0.00
- res1={
- 'a_id':line.analytic_account_id.id,
- 'b_id':line.general_budget_id.id,
- 'name':line.general_budget_id.name,
- 'status':2,
- 'theo':theo,
- 'pln':line.planned_amount,
- 'prac':pract,
- 'perc':perc,
+ perc = 0.00
+ res1 = {
+ 'a_id': line.analytic_account_id.id,
+ 'b_id': line.general_budget_id.id,
+ 'name': line.general_budget_id.name,
+ 'status': 2,
+ 'theo': theo,
+ 'pln': line.planned_amount,
+ 'prac': pract,
+ 'perc': perc,
}
tot_theo += theo
- tot_pln +=line.planned_amount
- tot_prac +=pract
- tot_perc +=perc
- if form['report']=='analytic-full':
+ tot_pln += line.planned_amount
+ tot_prac += pract
+ tot_perc += perc
+ if form['report'] == 'analytic-full':
result.append(res1)
done_budget.append(line.general_budget_id.id)
else:
@@ -149,61 +138,57 @@ class budget_report(report_sxw.rml_parse):
continue
else:
res1={
- 'a_id':line.analytic_account_id.id,
- 'b_id':line.general_budget_id.id,
- 'name':line.general_budget_id.name,
- 'status':2,
- 'theo':0.00,
- 'pln':0.00,
- 'prac':0.00,
- 'perc':0.00
- }
-
- if form['report']=='analytic-full':
+ 'a_id': line.analytic_account_id.id,
+ 'b_id': line.general_budget_id.id,
+ 'name': line.general_budget_id.name,
+ 'status': 2,
+ 'theo': 0.00,
+ 'pln': 0.00,
+ 'prac': 0.00,
+ 'perc': 0.00
+ }
+ if form['report'] == 'analytic-full':
result.append(res1)
done_budget.append(line.general_budget_id.id)
-
- if tot_theo==0.00:
- tot_perc=0.00
+ if tot_theo == 0.00:
+ tot_perc = 0.00
else:
- tot_perc=float(tot_prac /tot_theo)*100
-
- if form['report']=='analytic-full':
-
- result[-(len(done_budget) +1)]['theo']=tot_theo
- tot['theo'] +=tot_theo
- result[-(len(done_budget) +1)]['pln']=tot_pln
- tot['pln'] +=tot_pln
- result[-(len(done_budget) +1)]['prac']=tot_prac
- tot['prac'] +=tot_prac
- result[-(len(done_budget) +1)]['perc']=tot_perc
+ tot_perc = float(tot_prac / tot_theo) * 100
+ if form['report'] == 'analytic-full':
+ result[-(len(done_budget) +1)]['theo'] = tot_theo
+ tot['theo'] += tot_theo
+ result[-(len(done_budget) +1)]['pln'] = tot_pln
+ tot['pln'] += tot_pln
+ result[-(len(done_budget) +1)]['prac'] = tot_prac
+ tot['prac'] += tot_prac
+ result[-(len(done_budget) +1)]['perc'] = tot_perc
else:
- result[-1]['theo']=tot_theo
- tot['theo'] +=tot_theo
- result[-1]['pln']=tot_pln
- tot['pln'] +=tot_pln
- result[-1]['prac']=tot_prac
- tot['prac'] +=tot_prac
- result[-1]['perc']=tot_perc
- if tot['theo']==0.00:
- tot['perc'] =0.00
+ result[-1]['theo'] = tot_theo
+ tot['theo'] += tot_theo
+ result[-1]['pln'] = tot_pln
+ tot['pln'] += tot_pln
+ result[-1]['prac'] = tot_prac
+ tot['prac'] += tot_prac
+ result[-1]['perc'] = tot_perc
+ if tot['theo'] == 0.00:
+ tot['perc'] = 0.00
else:
- tot['perc']=float(tot['prac'] /tot['theo'])*100
+ tot['perc'] = float(tot['prac'] / tot['theo']) * 100
return result
def funct_total(self, form):
- result=[]
- res={}
-
- res={
- 'tot_theo':tot['theo'],
- 'tot_pln':tot['pln'],
- 'tot_prac':tot['prac'],
- 'tot_perc':tot['perc']
+ result = []
+ res = {}
+ res = {
+ 'tot_theo': tot['theo'],
+ 'tot_pln': tot['pln'],
+ 'tot_prac': tot['prac'],
+ 'tot_perc': tot['perc']
}
result.append(res)
-
return result
+
report_sxw.report_sxw('report.crossovered.budget.report', 'crossovered.budget', 'addons/account_budget/report/crossovered_budget_report.rml',parser=budget_report,header='internal')
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_budget/report/crossovered_budget_report.rml b/addons/account_budget/report/crossovered_budget_report.rml
index 9ef3dc716af..e297c8b3ca2 100644
--- a/addons/account_budget/report/crossovered_budget_report.rml
+++ b/addons/account_budget/report/crossovered_budget_report.rml
@@ -148,16 +148,16 @@
[['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ a['name'] ]]
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['theo'] ]] [[ company.currency_id.symbol ]]
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['pln'] ]] [[ company.currency_id.symbol ]]
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['prac'] ]] [[ company.currency_id.symbol ]]
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ '%.2f' % a['perc'] ]]%
+ [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'], digits=2) ]]%
|
@@ -168,16 +168,16 @@
[[ repeatIn(funct_total(data['form']),'b') ]]Total:
- [[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(b['tot_theo'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ formatLang(b['tot_pln']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(b['tot_pln'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ formatLang(b['tot_prac']) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(b['tot_prac'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]
|
- [[ '%.2f' % b['tot_perc'] ]]%
+ [[ formatLang(b['tot_perc'], digits=2) ]]%
|
@@ -185,4 +185,4 @@
-
\ No newline at end of file
+
diff --git a/addons/account_budget/wizard/account_budget_analytic.py b/addons/account_budget/wizard/account_budget_analytic.py
index 70ce1a5156b..be3e8a45099 100644
--- a/addons/account_budget/wizard/account_budget_analytic.py
+++ b/addons/account_budget/wizard/account_budget_analytic.py
@@ -29,11 +29,11 @@ class account_budget_analytic(osv.osv_memory):
_columns = {
'date_from': fields.date('Start of period', required=True),
'date_to': fields.date('End of period', required=True),
- }
+ }
_defaults= {
'date_from': time.strftime('%Y-01-01'),
'date_to': time.strftime('%Y-%m-%d'),
- }
+ }
def check_report(self, cr, uid, ids, context=None):
datas = {}
@@ -44,12 +44,12 @@ class account_budget_analytic(osv.osv_memory):
'ids': context.get('active_ids',[]),
'model': 'account.analytic.account',
'form': data
- }
+ }
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.analytic.account.budget',
'datas': datas,
- }
+ }
account_budget_analytic()
diff --git a/addons/account_budget/wizard/account_budget_crossovered_report.py b/addons/account_budget/wizard/account_budget_crossovered_report.py
index 2427044e681..e1207c5cba8 100644
--- a/addons/account_budget/wizard/account_budget_crossovered_report.py
+++ b/addons/account_budget/wizard/account_budget_crossovered_report.py
@@ -18,7 +18,6 @@
# along with this program. If not, see .
#
##############################################################################
-
import time
from osv import fields, osv
@@ -30,11 +29,11 @@ class account_budget_crossvered_report(osv.osv_memory):
_columns = {
'date_from': fields.date('Start of period', required=True),
'date_to': fields.date('End of period', required=True),
- }
+ }
_defaults= {
'date_from': time.strftime('%Y-01-01'),
'date_to': time.strftime('%Y-%m-%d'),
- }
+ }
def check_report(self, cr, uid, ids, context=None):
datas = {}
@@ -45,13 +44,13 @@ class account_budget_crossvered_report(osv.osv_memory):
'ids': context.get('active_ids',[]),
'model': 'crossovered.budget',
'form': data
- }
+ }
datas['form']['report']='analytic-full'
return {
'type': 'ir.actions.report.xml',
'report_name': 'crossovered.budget.report',
'datas': datas,
- }
+ }
account_budget_crossvered_report()
diff --git a/addons/account_budget/wizard/account_budget_crossovered_summary_report.py b/addons/account_budget/wizard/account_budget_crossovered_summary_report.py
index 9581546ca10..e0f955787e7 100644
--- a/addons/account_budget/wizard/account_budget_crossovered_summary_report.py
+++ b/addons/account_budget/wizard/account_budget_crossovered_summary_report.py
@@ -31,11 +31,11 @@ class account_budget_crossvered_summary_report(osv.osv_memory):
_columns = {
'date_from': fields.date('Start of period', required=True),
'date_to': fields.date('End of period', required=True),
- }
+ }
_defaults= {
'date_from': time.strftime('%Y-01-01'),
'date_to': time.strftime('%Y-%m-%d'),
- }
+ }
def check_report(self, cr, uid, ids, context=None):
datas = {}
@@ -46,14 +46,13 @@ class account_budget_crossvered_summary_report(osv.osv_memory):
'ids': context.get('active_ids',[]),
'model': 'crossovered.budge',
'form': data
- }
- datas['form']['report']='analytic-one'
+ }
+ datas['form']['report'] = 'analytic-one'
return {
'type': 'ir.actions.report.xml',
'report_name': 'crossovered.budget.report',
'datas': datas,
- }
- return {}
+ }
account_budget_crossvered_summary_report()
diff --git a/addons/account_budget/wizard/account_budget_report.py b/addons/account_budget/wizard/account_budget_report.py
index 58ba9ad8191..20432ff64e4 100644
--- a/addons/account_budget/wizard/account_budget_report.py
+++ b/addons/account_budget/wizard/account_budget_report.py
@@ -18,7 +18,6 @@
# along with this program. If not, see .
#
##############################################################################
-
import time
from osv import fields, osv
@@ -31,11 +30,11 @@ class account_budget_report(osv.osv_memory):
_columns = {
'date1': fields.date('Start of period', required=True),
'date2': fields.date('End of period', required=True),
- }
+ }
_defaults= {
'date1': time.strftime('%Y-01-01'),
'date2': time.strftime('%Y-%m-%d'),
- }
+ }
def check_report(self, cr, uid, ids, context=None):
datas = {}
@@ -46,7 +45,7 @@ class account_budget_report(osv.osv_memory):
'ids': context.get('active_ids',[]),
'model': 'account.budget.post',
'form': data
- }
+ }
data_model = self.pool.get(datas['model']).browse(cr, uid, context['active_id'])
if not data_model.dotation_ids:
@@ -55,7 +54,7 @@ class account_budget_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.budget',
'datas': datas,
- }
+ }
account_budget_report()
diff --git a/addons/account_budget/wizard/account_budget_spread.py b/addons/account_budget/wizard/account_budget_spread.py
index 31e059f754b..de854a3966c 100644
--- a/addons/account_budget/wizard/account_budget_spread.py
+++ b/addons/account_budget/wizard/account_budget_spread.py
@@ -29,7 +29,7 @@ class account_budget_spread(osv.osv_memory):
_columns = {
'fiscalyear': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True),
'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
- }
+ }
def check_spread(self, cr, uid, ids, context=None):
if context is None:
diff --git a/addons/account_cancel/i18n/nl.po b/addons/account_cancel/i18n/nl.po
index fcf9c1f9aa9..6aaa709cc86 100644
--- a/addons/account_cancel/i18n/nl.po
+++ b/addons/account_cancel/i18n/nl.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-19 12:03+0000\n"
-"PO-Revision-Date: 2010-09-29 10:33+0000\n"
-"Last-Translator: Douwe Wullink (Dypalio) \n"
+"PO-Revision-Date: 2010-09-30 06:58+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_cancel
diff --git a/addons/account_coda/i18n/nl.po b/addons/account_coda/i18n/nl.po
index ccca3d22f5b..8a54707bf2d 100644
--- a/addons/account_coda/i18n/nl.po
+++ b/addons/account_coda/i18n/nl.po
@@ -8,71 +8,72 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-11-24 13:11+0000\n"
-"PO-Revision-Date: 2010-09-26 20:12+0000\n"
-"Last-Translator: FULL NAME \n"
+"PO-Revision-Date: 2010-10-01 06:44+0000\n"
+"Last-Translator: Douwe Wullink (Dypalio) \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
-msgstr ""
+msgstr "Bank Dagafschrift"
#. module: account_coda
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
+"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten!"
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
-msgstr ""
+msgstr "Logboek"
#. module: account_coda
#: wizard_button:account.coda_import,extraction,open:0
msgid "_Open Statement"
-msgstr ""
+msgstr "_Open Afschrift"
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA"
-msgstr ""
+msgstr "Rekening CODA"
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
-msgstr ""
+msgstr "Coda bestand"
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Clic on 'New' to select your file :"
-msgstr ""
+msgstr "Klik op 'Nieuw' om uw bestand te selecteren :"
#. module: account_coda
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
msgid "Import Coda File"
-msgstr ""
+msgstr "Importeer Coda bestand"
#. module: account_coda
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Ongeldige modelnaam in de definitie van de actie."
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
-msgstr ""
+msgstr "Import logboek"
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
-msgstr ""
+msgstr "Standaard ontvangstenrekening"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
@@ -81,86 +82,89 @@ msgid ""
" bank statements from .csv file.\n"
" Import coda file wizard is used to import bank statements."
msgstr ""
+"Module voorziet in functies voor het importeren van bankafschriften in "
+".csv.bestanden.\n"
+"Import coda bestand wizard importeert bankafschriften."
#. module: account_coda
#: wizard_button:account.coda_import,extraction,end:0
msgid "_Close"
-msgstr ""
+msgstr "_Afsluiten"
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
-msgstr ""
+msgstr "Gegenereerd bankafschrift"
#. module: account_coda
#: view:account.coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda import"
-msgstr ""
+msgstr "Coda import"
#. module: account_coda
#: field:account.coda,user_id:0
msgid "User"
-msgstr ""
+msgstr "Gebruiker"
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr ""
+msgstr "Ongeldige XML voor weergave opbouw!"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
-msgstr ""
+msgstr "coda voor een rekening"
#. module: account_coda
#: wizard_field:account.coda_import,init,def_payable:0
msgid "Default Payable Account"
-msgstr ""
+msgstr "Standaard uitgavenrekening"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda
msgid "Coda Statements"
-msgstr ""
+msgstr "Coda afschriften"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
msgid "Import Coda Statements"
-msgstr ""
+msgstr "Importeer Coda afschriften"
#. module: account_coda
#: wizard_button:account.coda_import,init,extraction:0
msgid "_Ok"
-msgstr ""
+msgstr "_Ok"
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
#: wizard_view:account.coda_import,init:0
msgid "Import Coda Statement"
-msgstr ""
+msgstr "Importeer Coda afschrift"
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
-msgstr ""
+msgstr "Coda"
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
msgid "Results :"
-msgstr ""
+msgstr "Resultaten :"
#. module: account_coda
#: wizard_field:account.coda_import,init,coda:0
msgid "Coda File"
-msgstr ""
+msgstr "Coda Bestand"
#. module: account_coda
#: field:account.coda,date:0
msgid "Import Date"
-msgstr ""
+msgstr "Importdatum"
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
-msgstr ""
+msgstr "Selecteer bank dagboek :"
diff --git a/addons/account_coda/wizard/account_coda_import.py b/addons/account_coda/wizard/account_coda_import.py
index 8a88f4a255d..a577e47be74 100644
--- a/addons/account_coda/wizard/account_coda_import.py
+++ b/addons/account_coda/wizard/account_coda_import.py
@@ -224,24 +224,24 @@ class account_coda_import(osv.osv_memory):
'period_id':statement.get('period_id',False) or period,# statement.period_id.id
}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
-
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'))
+ context.update({'move_line_ids': rec_id})
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), context=context)
voucher_line_dict = False
if result['value']['line_ids']:
for line_dict in result['value']['line_ids']:
move_line = line_obj.browse(cr, uid, line_dict['move_line_id'], context)
if line.move_id.id == move_line.move_id.id:
voucher_line_dict = line_dict
-
+
if voucher_line_dict:
voucher_line_dict.update({'voucher_id':voucher_id})
voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
-
+
# reconcile_id = statement_reconcile_obj.create(cr, uid, {
# 'line_ids': [(6, 0, rec_id)]
# }, context=context)
#
-
+
mv = self.pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
if mv.partner_id:
line['partner_id'] = mv.partner_id.id
diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml
index 93cfa1a58eb..bbc3a8400a4 100644
--- a/addons/account_followup/account_followup_view.xml
+++ b/addons/account_followup/account_followup_view.xml
@@ -87,7 +87,7 @@
-
+
account.move.line.partner.tree
diff --git a/addons/account_followup/report/__init__.py b/addons/account_followup/report/__init__.py
index 5d57773762a..f1b753b1e16 100644
--- a/addons/account_followup/report/__init__.py
+++ b/addons/account_followup/report/__init__.py
@@ -19,7 +19,7 @@
#
##############################################################################
-import report_followup_print
+import account_followup_print
import account_followup_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_followup/report/report_followup_print.py b/addons/account_followup/report/account_followup_print.py
similarity index 98%
rename from addons/account_followup/report/report_followup_print.py
rename to addons/account_followup/report/account_followup_print.py
index 2359c31b502..4d1cd131619 100644
--- a/addons/account_followup/report/report_followup_print.py
+++ b/addons/account_followup/report/account_followup_print.py
@@ -92,7 +92,7 @@ class report_rappel(report_sxw.rml_parse):
return text
report_sxw.report_sxw('report.account_followup.followup.print',
- 'res.partner', 'addons/account_followup/report/report_followp_print.rml',
+ 'res.partner', 'addons/account_followup/report/account_followup_print.rml',
parser=report_rappel)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_followup/report/report_followp_print.rml b/addons/account_followup/report/account_followup_print.rml
similarity index 100%
rename from addons/account_followup/report/report_followp_print.rml
rename to addons/account_followup/report/account_followup_print.rml
diff --git a/addons/account_payment/wizard/account_payment_populate_statement.py b/addons/account_payment/wizard/account_payment_populate_statement.py
index 0e7ea32e8d3..d223c58316f 100644
--- a/addons/account_payment/wizard/account_payment_populate_statement.py
+++ b/addons/account_payment/wizard/account_payment_populate_statement.py
@@ -91,7 +91,8 @@ class account_payment_populate_statement(osv.osv_memory):
'period_id': statement.period_id.id
}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment')
+ context.update({'move_line_ids': [line.move_line_id.id]})
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', context=context)
voucher_line_dict = False
if result['value']['line_ids']:
for line_dict in result['value']['line_ids']:
diff --git a/addons/account_voucher/__init__.py b/addons/account_voucher/__init__.py
index 27aee55f2d7..41f33976c53 100644
--- a/addons/account_voucher/__init__.py
+++ b/addons/account_voucher/__init__.py
@@ -19,7 +19,7 @@
#
##############################################################################
-import voucher
+import account_voucher
import report
import wizard
diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py
index 3a846791c23..59495eddc5f 100644
--- a/addons/account_voucher/__openerp__.py
+++ b/addons/account_voucher/__openerp__.py
@@ -38,22 +38,22 @@
"update_xml" : [
"security/ir.model.access.csv",
- "voucher_sequence.xml",
- "voucher_workflow.xml",
- "voucher_report.xml",
+ "account_voucher_sequence.xml",
+ "account_voucher_workflow.xml",
+ "account_voucher_report.xml",
"wizard/account_voucher_unreconcile_view.xml",
"wizard/account_statement_from_invoice_view.xml",
- "voucher_view.xml",
+ "account_voucher_view.xml",
"voucher_payment_receipt_view.xml",
"voucher_sales_purchase_view.xml",
- "voucher_wizard.xml",
+ "account_voucher_wizard.xml",
"security/account_voucher_security.xml"
],
"test" : [
# "test/account_voucher.yml",
"test/sales_receipt.yml",
"test/sales_payment.yml",
- "test/account_voucher_report.yml"
+ "test/account_voucher_report.yml"
],
'certificate': '0037580727101',
"active": False,
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/account_voucher.py
similarity index 94%
rename from addons/account_voucher/voucher.py
rename to addons/account_voucher/account_voucher.py
index f0a4db96910..2ea6e4b39ab 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -48,7 +48,7 @@ account_move_line()
class account_voucher(osv.osv):
def _get_type(self, cr, uid, ids, context={}):
return context.get('type', False)
-
+
def _get_period(self, cr, uid, context={}):
if context.get('period_id', False):
return context.get('period_id')
@@ -61,7 +61,7 @@ class account_voucher(osv.osv):
return context.get('journal_id')
if not context.get('journal_id', False) and context.get('search_default_journal_id', False):
return context.get('search_default_journal_id')
-
+
ttype = context.get('type', 'bank')
if ttype in ('payment', 'receipt'):
ttype = 'bank'
@@ -77,7 +77,7 @@ class account_voucher(osv.osv):
if not res:
return False
journal_id = res[0]
-
+
if not journal_id:
return False
journal = journal_pool.browse(cr, uid, journal_id)
@@ -109,7 +109,7 @@ class account_voucher(osv.osv):
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
- return [(r['id'], (str(r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
+ return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')]
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
res = super(account_voucher,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
@@ -187,33 +187,33 @@ class account_voucher(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
'tax_id': _get_tax,
}
-
+
def compute_tax(self, cr, uid, ids, context={}):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
position_pool = self.pool.get('account.fiscal.position')
voucher_line_pool = self.pool.get('account.voucher.line')
voucher_pool = self.pool.get('account.voucher')
-
+
for voucher in voucher_pool.browse(cr, uid, ids, context):
voucher_amount = 0.0
for line in voucher.line_ids:
voucher_amount += line.untax_amount or line.amount
line.amount = line.untax_amount or line.amount
voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
-
+
if not voucher.tax_id:
self.write(cr, uid, [voucher.id], {'amount':voucher_amount, 'tax_amount':0.0})
continue
-
+
tax = [tax_pool.browse(cr, uid, voucher.tax_id.id)]
partner = partner_pool.browse(cr, uid, voucher.partner_id.id) or False
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
tax = tax_pool.browse(cr, uid, taxes)
-
+
total = voucher_amount
total_tax = 0.0
-
+
if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes',[]):
total_tax += tax_line.get('amount')
@@ -223,17 +223,17 @@ class account_voucher(osv.osv):
for line in voucher.line_ids:
line_total = 0.0
line_tax = 0.0
-
+
for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes',[]):
line_tax += tax_line.get('amount')
line_total += tax_line.get('price_unit')
total_tax += line_tax
untax_amount = line.untax_amount or line.amount
voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount})
-
+
self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax})
return True
-
+
def onchange_price(self, cr, uid, ids, line_ids, tax_id, partner_id=False, context={}):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
@@ -246,16 +246,16 @@ class account_voucher(osv.osv):
voucher_total_tax = 0.0
voucher_total = 0.0
voucher_line_ids = []
-
+
total = 0.0
total_tax = 0.0
-
+
for line in line_ids:
line_amount = 0.0
line_amount = line[2].get('amount')
voucher_line_ids += [line[1]]
voucher_total += line_amount
-
+
total = voucher_total
total_tax = 0.0
if tax_id:
@@ -264,12 +264,12 @@ class account_voucher(osv.osv):
partner = partner_pool.browse(cr, uid, partner_id) or False
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
tax = tax_pool.browse(cr, uid, taxes)
-
+
if not tax[0].price_include:
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes',[]):
total_tax += tax_line.get('amount')
total += total_tax
-
+
res.update({
'amount':total or voucher_total,
'tax_amount':total_tax
@@ -277,7 +277,7 @@ class account_voucher(osv.osv):
return {
'value':res
}
-
+
def onchange_term_id(self, cr, uid, ids, term_id, amount):
term_pool = self.pool.get('account.payment.term')
terms = False
@@ -291,24 +291,24 @@ class account_voucher(osv.osv):
'date_due':due_date
})
return {'value':default}
-
+
def onchange_journal_voucher(self, cr, uid, ids, line_ids=False, tax_id=False, price=0.0, partner_id=False, journal_id=False, ttype=False, context={}):
"""price
Returns a dict that contains new values and context
-
+
@param partner_id: latest value from user input for field partner_id
@param args: other arguments
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict which contains new values, and context
"""
default = {
'value':{},
}
-
+
if not partner_id or not journal_id:
return default
-
+
partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal')
@@ -328,32 +328,35 @@ class account_voucher(osv.osv):
default['value']['account_id'] = account_id
default['value']['type'] = ttype or tr_type
-
+
vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context)
default['value'].update(vals.get('value'))
-
+
return default
-
- def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context={}):
+
+ def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None):
"""price
Returns a dict that contains new values and context
-
+
@param partner_id: latest value from user input for field partner_id
@param args: other arguments
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict which contains new values, and context
"""
if not journal_id:
return {}
-
+
+ if context is None:
+ context = {}
+
currency_pool = self.pool.get('res.currency')
move_pool = self.pool.get('account.move')
line_pool = self.pool.get('account.voucher.line')
move_line_pool = self.pool.get('account.move.line')
partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal')
-
+
vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
vals = vals.get('value')
currency_id = vals.get('currency_id', currency_id)
@@ -383,7 +386,7 @@ class account_voucher(osv.osv):
default['value']['account_id'] = account_id
if journal.type not in ('cash', 'bank'):
return default
-
+
total_credit = 0.0
total_debit = 0.0
account_type = 'receivable'
@@ -393,21 +396,25 @@ class account_voucher(osv.osv):
else:
total_credit = price or 0.0
account_type = 'receivable'
- ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
+
+ if not context.get('move_line_ids', False):
+ ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
+ else:
+ ids = context['move_line_ids']
ids.reverse()
moves = move_line_pool.browse(cr, uid, ids)
-
+
company_currency = journal.company_id.currency_id.id
if company_currency != currency_id and ttype == 'payment':
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
elif company_currency != currency_id and ttype == 'receipt':
total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit)
-
+
for line in moves:
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
continue
if line.debit and line.reconcile_partial_id and ttype == 'payment':
- continue
+ continue
total_credit += line.credit or 0.0
total_debit += line.debit or 0.0
@@ -416,7 +423,7 @@ class account_voucher(osv.osv):
continue
if line.debit and line.reconcile_partial_id and ttype == 'payment':
continue
-
+
orignal_amount = line.credit or line.debit or 0.0
rs = {
'name':line.move_id.name,
@@ -442,11 +449,11 @@ class account_voucher(osv.osv):
default['value']['line_cr_ids'].append(rs)
else:
default['value']['line_dr_ids'].append(rs)
-
+
if ttype == 'payment' and len(default['value']['line_cr_ids']) > 0:
default['value']['pre_line'] = 1
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
- default['value']['pre_line'] = 1
+ default['value']['pre_line'] = 1
return default
def onchange_date(self, cr, user, ids, date, context={}):
@@ -475,7 +482,7 @@ class account_voucher(osv.osv):
tax_id = False
if account_id and account_id.tax_ids:
tax_id = account_id.tax_ids[0].id
-
+
vals = self.onchange_price(cr, uid, ids, line_ids, tax_id, partner_id, context)
vals['value'].update({'tax_id':tax_id})
currency_id = journal.company_id.currency_id.id
@@ -499,7 +506,7 @@ class account_voucher(osv.osv):
reconcile_pool = self.pool.get('account.move.reconcile')
move_pool = self.pool.get('account.move')
voucher_line_pool = self.pool.get('account.voucher.line')
-
+
for voucher in self.browse(cr, uid, ids):
recs = []
for line in voucher.move_ids:
@@ -509,7 +516,7 @@ class account_voucher(osv.osv):
recs += [line.reconcile_partial_id.id]
reconcile_pool.unlink(cr, uid, recs)
-
+
if voucher.move_id:
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
move_pool.unlink(cr, uid, [voucher.move_id.id])
@@ -547,7 +554,7 @@ class account_voucher(osv.osv):
return {'value':res}
def action_move_line_create(self, cr, uid, ids, context=None):
-
+
def _get_payment_term_lines(term_id, amount):
term_pool = self.pool.get('account.payment.term')
if term_id and amount:
@@ -561,10 +568,11 @@ class account_voucher(osv.osv):
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
+ bank_st_line_obj = self.pool.get('account.bank.statement.line')
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
- if inv.number:
+ if inv.number:
name = inv.number
elif inv.journal_id.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, inv.journal_id.sequence_id.id)
@@ -580,12 +588,17 @@ class account_voucher(osv.osv):
'period_id': inv.period_id and inv.period_id.id or False
}
move_id = move_pool.create(cr, uid, move)
-
+ line_bank_ids = bank_st_line_obj.search(cr, uid, [('voucher_id', '=', inv.id)], context=context)
+ if line_bank_ids:
+ bank_st_line_obj.write(cr, uid, line_bank_ids, {
+ 'move_ids': [(4, move_id, False)]
+ })
+
#create the first line manually
company_currency = inv.journal_id.company_id.currency_id.id
debit = 0.0
credit = 0.0
- # TODO: is there any other alternative then the voucher type ??
+ # TODO: is there any other alternative then the voucher type ??
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
if inv.type in ('purchase', 'payment'):
credit = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
@@ -597,7 +610,7 @@ class account_voucher(osv.osv):
if credit < 0:
debit = -credit
credit = 0.0
-
+
move_line = {
'name':inv.name or '/',
'debit':debit,
@@ -627,7 +640,7 @@ class account_voucher(osv.osv):
if not line.amount:
continue
amount = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, line.amount)
-
+
move_line = {
'journal_id':inv.journal_id.id,
'period_id':inv.period_id.id,
@@ -649,7 +662,7 @@ class account_voucher(osv.osv):
line.type = 'cr'
else:
line.type = 'dr'
-
+
if (line.type=='dr'):
line_total += amount
move_line['debit'] = amount
@@ -716,7 +729,7 @@ class account_voucher_line(osv.osv):
_name = 'account.voucher.line'
_description = 'Voucher Lines'
_order = "move_line_id"
-
+
def _compute_balance(self, cr, uid, ids, name, args, context=None):
currency_pool = self.pool.get('res.currency')
rs_data = {}
@@ -725,16 +738,16 @@ class account_voucher_line(osv.osv):
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
voucher_currency = line.voucher_id.currency_id.id
move_line = line.move_line_id or False
-
+
if not move_line:
res['amount_original'] = 0.0
res['amount_unreconciled'] = 0.0
-
+
elif move_line and move_line.credit > 0:
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit)
else:
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit)
-
+
if move_line:
res['amount_unreconciled'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.amount_unreconciled)
rs_data[line.id] = res
@@ -767,7 +780,7 @@ class account_voucher_line(osv.osv):
@param move_line_id: latest value from user input for field move_line_id
@param args: other arguments
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict which contains new values, and context
"""
res = {}
@@ -793,9 +806,9 @@ class account_voucher_line(osv.osv):
def default_get(self, cr, user, fields_list, context=None):
"""
Returns default values for fields
- @param fields_list: list of fields, for which default values are required to be read
+ @param fields_list: list of fields, for which default values are required to be read
@param context: context arguments, like lang, time zone
-
+
@return: Returns a dict that contains default values for fields
"""
journal_id = context.get('journal_id', False)
@@ -834,14 +847,26 @@ account_voucher_line()
class account_bank_statement(osv.osv):
_inherit = 'account.bank.statement'
+ def button_cancel(self, cr, uid, ids, context=None):
+ done = []
+ for st in self.browse(cr, uid, ids, context):
+ voucher_ids = []
+ for line in st.line_ids:
+ if line.voucher_id:
+ voucher_ids.append(line.voucher_id.id)
+ self.pool.get('account.voucher').cancel_voucher(cr, uid, voucher_ids, context)
+ self.pool.get('account.voucher').unlink(cr, uid, voucher_ids, context)
+ return super(account_bank_statement, self).button_cancel(cr, uid, ids, context=context)
+
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, next_number, context=None):
+ voucher_obj = self.pool.get('account.voucher')
+ wf_service = netsvc.LocalService("workflow")
st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line_id, context=context)
if st_line.voucher_id:
- self.pool.get('account.voucher').write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
- wf_service = netsvc.LocalService("workflow")
+ voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
- return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
- return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line, company_currency_id, next_number, context=context)
+ return self.pool.get('account.move.line').write(cr, uid, [x.id for x in st_line.voucher_id.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
+ return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
account_bank_statement()
@@ -851,17 +876,18 @@ class account_bank_statement_line(osv.osv):
def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
if not ids:
return {}
+
res_currency_obj = self.pool.get('res.currency')
res = {}
company_currency_id = False
-
for line in self.browse(cursor, user, ids, context=context):
- if not company_currency_id:
- company_currency_id = line.company_id.id
+# if not company_currency_id:
+# company_currency_id = line.company_id.id
if line.voucher_id:
- res[line.id] = res_currency_obj.compute(cursor, user,
- company_currency_id, line.statement_id.currency.id,
- line.voucher_id.amount, context=context)
+ res[line.id] = line.voucher_id.amount#
+# res_currency_obj.compute(cursor, user,
+# company_currency_id, line.statement_id.currency.id,
+# line.voucher_id.amount, context=context)
else:
res[line.id] = 0.0
return res
@@ -877,7 +903,8 @@ class account_bank_statement_line(osv.osv):
statement_line = self.browse(cr, uid, ids, context)
unlink_ids = []
for st_line in statement_line:
- unlink_ids.append(st_line.voucher_id.id)
+ if st_line.voucher_id:
+ unlink_ids.append(st_line.voucher_id.id)
self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context)
return super(account_bank_statement_line, self).unlink(cr, uid, ids, context=context)
diff --git a/addons/account_voucher/voucher_report.xml b/addons/account_voucher/account_voucher_report.xml
similarity index 80%
rename from addons/account_voucher/voucher_report.xml
rename to addons/account_voucher/account_voucher_report.xml
index 04bcb5254ba..db1b4279620 100644
--- a/addons/account_voucher/voucher_report.xml
+++ b/addons/account_voucher/account_voucher_report.xml
@@ -5,17 +5,17 @@
string="Voucher"
model="account.voucher"
name="voucher.cash_receipt.drcr"
- rml="account_voucher/report/report_voucher.rml"
+ rml="account_voucher/report/account_voucher.rml"
groups="base.group_extended"
auto="False"
header = "False"
menu="True"/>
-
+
diff --git a/addons/account_voucher/voucher_sequence.xml b/addons/account_voucher/account_voucher_sequence.xml
similarity index 100%
rename from addons/account_voucher/voucher_sequence.xml
rename to addons/account_voucher/account_voucher_sequence.xml
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/account_voucher_view.xml
similarity index 92%
rename from addons/account_voucher/voucher_view.xml
rename to addons/account_voucher/account_voucher_view.xml
index 972850e0114..d066c91ad0e 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/account_voucher_view.xml
@@ -193,9 +193,8 @@
-
-
- account.bank.statement.voucher.form.inherit
+
+ account.bank.statement.voucher.tree.inherit
account.bank.statement
form
@@ -207,5 +206,19 @@
+
+ account.bank.statement.voucher.form.inherit
+ account.bank.statement
+ form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_voucher/voucher_wizard.xml b/addons/account_voucher/account_voucher_wizard.xml
similarity index 100%
rename from addons/account_voucher/voucher_wizard.xml
rename to addons/account_voucher/account_voucher_wizard.xml
diff --git a/addons/account_voucher/voucher_workflow.xml b/addons/account_voucher/account_voucher_workflow.xml
similarity index 100%
rename from addons/account_voucher/voucher_workflow.xml
rename to addons/account_voucher/account_voucher_workflow.xml
diff --git a/addons/account_voucher/report/__init__.py b/addons/account_voucher/report/__init__.py
index eb69b63d856..b451c21b6a0 100644
--- a/addons/account_voucher/report/__init__.py
+++ b/addons/account_voucher/report/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,9 +15,9 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
-import report_voucher
-import report_voucher_print
+import account_voucher
+import account_voucher_print
diff --git a/addons/account_voucher/report/report_voucher.py b/addons/account_voucher/report/account_voucher.py
similarity index 97%
rename from addons/account_voucher/report/report_voucher.py
rename to addons/account_voucher/report/account_voucher.py
index d83c319d1ba..7655f294bf9 100644
--- a/addons/account_voucher/report/report_voucher.py
+++ b/addons/account_voucher/report/account_voucher.py
@@ -67,6 +67,6 @@ class report_voucher(report_sxw.rml_parse):
report_sxw.report_sxw(
'report.voucher.cash_receipt.drcr',
'account.voucher',
- 'addons/account_voucher/report/report_voucher.rml',
+ 'addons/account_voucher/report/account_voucher.rml',
parser=report_voucher,header="external"
)
diff --git a/addons/account_voucher/report/report_voucher.rml b/addons/account_voucher/report/account_voucher.rml
similarity index 100%
rename from addons/account_voucher/report/report_voucher.rml
rename to addons/account_voucher/report/account_voucher.rml
diff --git a/addons/account_voucher/report/report_voucher_print.py b/addons/account_voucher/report/account_voucher_print.py
similarity index 97%
rename from addons/account_voucher/report/report_voucher_print.py
rename to addons/account_voucher/report/account_voucher_print.py
index 6f405bbe975..0da644c6e4f 100644
--- a/addons/account_voucher/report/report_voucher_print.py
+++ b/addons/account_voucher/report/account_voucher_print.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -37,7 +37,7 @@ class report_voucher_print(report_sxw.rml_parse):
def convert(self, amount, cur):
amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur);
return amt_en
-
+
def get_lines(self,voucher):
result = []
if voucher.type in ('payment','receipt'):
@@ -67,13 +67,13 @@ class report_voucher_print(report_sxw.rml_parse):
res['amount'] = amount
result.append(res)
return result
-
+
def get_title(self, type):
title = ''
if type:
title = type[0].swapcase() + type[1:] + " Voucher"
return title
-
+
def get_on_account(self, voucher):
name = ""
if voucher.type == 'receipt':
@@ -85,10 +85,10 @@ class report_voucher_print(report_sxw.rml_parse):
elif voucher.type == 'purchase':
name = "Purchase from "+str(voucher.partner_id.name)
return name
-
+
report_sxw.report_sxw(
'report.voucher.print',
'account.voucher',
- 'addons/account_voucher/report/report_voucher_print.rml',
+ 'addons/account_voucher/report/account_voucher_print.rml',
parser=report_voucher_print,header="external"
)
diff --git a/addons/account_voucher/report/report_voucher_print.rml b/addons/account_voucher/report/account_voucher_print.rml
similarity index 100%
rename from addons/account_voucher/report/report_voucher_print.rml
rename to addons/account_voucher/report/account_voucher_print.rml
diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py
index eb88ae5222c..926647afae1 100644
--- a/addons/account_voucher/wizard/account_statement_from_invoice.py
+++ b/addons/account_voucher/wizard/account_statement_from_invoice.py
@@ -71,9 +71,9 @@ class account_statement_from_invoice_lines(osv.osv_memory):
elif (line.invoice and line.invoice.currency_id.id <> statement.currency.id):
amount = currency_obj.compute(cr, uid, line.invoice.currency_id.id,
statement.currency.id, amount, context=ctx)
-
+
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt') ,
- 'name': line.name,
+ 'name': line.name,
'partner_id': line.partner_id.id,
'journal_id': statement.journal_id.id,
'account_id': line.account_id.id,
@@ -83,7 +83,8 @@ class account_statement_from_invoice_lines(osv.osv_memory):
'amount':abs(amount),
'period_id':statement.period_id.id}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'))
+ context.update({'move_line_ids': [line.id]})
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), context=context)
voucher_line_dict = False
if result['value']['line_ids']:
for line_dict in result['value']['line_ids']:
diff --git a/addons/analytic/i18n/nl.po b/addons/analytic/i18n/nl.po
index b977c30283b..24849b0b713 100644
--- a/addons/analytic/i18n/nl.po
+++ b/addons/analytic/i18n/nl.po
@@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
-"PO-Revision-Date: 2010-09-24 14:42+0000\n"
-"Last-Translator: FULL NAME \n"
+"PO-Revision-Date: 2010-10-01 07:53+0000\n"
+"Last-Translator: Douwe Wullink (Dypalio) \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:17+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
-msgstr ""
+msgstr "Subrekeningen"
#. module: analytic
#: help:account.analytic.line,amount_currency:0
@@ -28,27 +28,31 @@ msgid ""
"The amount expressed in the related account currency if not equal to the "
"company one."
msgstr ""
+"Het bedrag in de valuta van de gekoppelde rekening als deze afwijkt van die "
+"van het bedrijf"
#. module: analytic
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
+"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
-msgstr ""
+msgstr "Naam rekening"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
-msgstr ""
+msgstr "Het aantal te rekenen eenheden"
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr ""
+"De valuta van de gekoppelde rekening wijkt af van die van het bedrijf."
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
@@ -56,31 +60,33 @@ msgid ""
"Module for defining analytic accounting object.\n"
" "
msgstr ""
+"Module voor het definiëren van kostenplaatsen.\n"
+" "
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
-msgstr ""
+msgstr "Status"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
-msgstr ""
+msgstr "Rekeningbeheerder"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
-msgstr ""
+msgstr "Concept"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
-msgstr ""
+msgstr "Gesloten"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
-msgstr ""
+msgstr "Debit"
#. module: analytic
#: help:account.analytic.account,state:0
@@ -100,32 +106,46 @@ msgid ""
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
+"* Nadat de rekening is gemaakt, wordt de status 'Concept'. "
+" \n"
+"* Als er een gekoppelde relatie is, kan de status naar 'Open'. "
+" \n"
+"* Als er openstaand saldo is, kan de status naar 'Wacht'. "
+" \n"
+"* En tenslotte als alle transacties klaar zijn, dan gaat de status naar "
+"'Gesloten'. \n"
+"* Het project kan zowel in 'Sjabloon' als in 'Lopend' zijn.\n"
+" Als het in 'Sjabloon' status is, dan kunnen we projecten maken op basis van "
+"het sjabloon project. Als het status 'Lopend' heeft, dan is het een gewoon "
+"project. \n"
+" Als het moet worden nagekeken is de status 'Wacht'.\n"
+" Als het project klaar is dan is de status 'Klaar'."
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
-msgstr ""
+msgstr "Rekeningsoort"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
-msgstr ""
+msgstr "Sjabloon"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
-msgstr ""
+msgstr "Wacht"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
-msgstr ""
+msgstr "Kostenplaatsboeking"
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
-msgstr ""
+msgstr "Omschrijving"
#. module: analytic
#: help:account.analytic.line,amount:0
@@ -133,133 +153,134 @@ msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price."
msgstr ""
+"Berekend door het aantal en de product kostprijs te vermenigvuldigen."
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
-msgstr ""
+msgstr "Bedrijf"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
-msgstr ""
+msgstr "Maximum aantal"
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
-msgstr ""
+msgstr "Gebruiker"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
-msgstr ""
+msgstr "Bovenliggende kostenplaats"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
-msgstr ""
+msgstr "Datum"
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
-msgstr ""
+msgstr "Kostenplaats valuta"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
-msgstr ""
+msgstr "Weergave"
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
-msgstr ""
+msgstr "Stelt de bovengrens in van het aantal uren."
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
-msgstr ""
+msgstr "Credit"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
-msgstr ""
+msgstr "Bedrag"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
-msgstr ""
+msgstr "Contactpersoon"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
-msgstr ""
+msgstr "Geannuleerd"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
-msgstr ""
+msgstr "Saldo"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
-msgstr ""
+msgstr "Begindatum"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
-msgstr ""
+msgstr "Aantal"
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
-msgstr ""
+msgstr "Einddatum"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
-msgstr ""
+msgstr "Rekeningcode"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
-msgstr ""
+msgstr "Normaal"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
-msgstr ""
+msgstr "Volledige naam kostenplaats"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
-msgstr ""
+msgstr "Kostenplaats"
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
-msgstr ""
+msgstr "Valuta"
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
-msgstr ""
+msgstr "Bedrag in valuta"
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
-msgstr ""
+msgstr "Gekoppelde relatie"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
-msgstr ""
+msgstr "Open"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
-msgstr ""
+msgstr "Kostenplaatsboekingen"
diff --git a/addons/base_action_rule/i18n/nl.po b/addons/base_action_rule/i18n/nl.po
index 794fc75af49..21385e6b602 100644
--- a/addons/base_action_rule/i18n/nl.po
+++ b/addons/base_action_rule/i18n/nl.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-19 12:20+0000\n"
-"PO-Revision-Date: 2010-09-12 15:32+0000\n"
-"Last-Translator: FULL NAME \n"
+"PO-Revision-Date: 2010-10-01 08:47+0000\n"
+"Last-Translator: Douwe Wullink (Dypalio) \n"
"Language-Team: Dutch \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 05:18+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_action_rule
@@ -22,68 +22,72 @@ msgstr ""
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
+"Vink dit aan wanneer de regel een email moet versturen naar de "
+"verantwoordelijke persoon."
#. module: base_action_rule
#: field:base.action.rule,act_remind_partner:0
msgid "Remind Partner"
-msgstr ""
+msgstr "Relatie herinneren"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_categ_id:0
msgid "Partner Category"
-msgstr ""
+msgstr "Relatiecategorie"
#. module: base_action_rule
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Ongeldige naam van het model in de actie definitie."
#. module: base_action_rule
#: help:base.action.rule,act_remind_user:0
msgid ""
"Check this if you want the rule to send a reminder by email to the user."
msgstr ""
+"Vink dit aan wanneer u wilt dat de regel de gebruiker via de mail een "
+"herinnering stuurt."
#. module: base_action_rule
#: field:base.action.rule,trg_state_to:0
msgid "Button Pressed"
-msgstr ""
+msgstr "Knop ingedrukt"
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Object"
-msgstr ""
+msgstr "Object"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_email:0
msgid "Mail to these Emails"
-msgstr ""
+msgstr "Mail naar deze emails"
#. module: base_action_rule
#: field:base.action.rule,act_state:0
msgid "Set State to"
-msgstr ""
+msgstr "Zet status op"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Body"
-msgstr ""
+msgstr "Email bericht"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Days"
-msgstr ""
+msgstr "Dagen"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:0
#, python-format
msgid "Error!"
-msgstr ""
+msgstr "Fout!"
#. module: base_action_rule
#: field:base.action.rule,act_reply_to:0
msgid "Reply-To"
-msgstr ""
+msgstr "Antwoord naar"
#. module: base_action_rule
#: help:base.action.rule,act_email_cc:0
@@ -91,88 +95,92 @@ msgid ""
"These people will receive a copy of the future communication between partner "
"and users by email"
msgstr ""
+"Deze personen krijgen via email een kopie van toekomstige communicatie "
+"tussen relatie en gebruikers"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Minutes"
-msgstr ""
+msgstr "Minuten"
#. module: base_action_rule
#: field:base.action.rule,name:0
msgid "Rule Name"
-msgstr ""
+msgstr "Regelnaam"
#. module: base_action_rule
#: help:base.action.rule,act_remind_partner:0
msgid ""
"Check this if you want the rule to send a reminder by email to the partner."
msgstr ""
+"Aanvinken als u wilt dat de regel de relatie een herinnering via email "
+"stuurt."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Reminders"
-msgstr ""
+msgstr "Email herinneringen"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Partner"
-msgstr ""
+msgstr "Voorwaarden op relatiemodel"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Deadline"
-msgstr ""
+msgstr "Uiterste datum"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_id:0
msgid "Partner"
-msgstr ""
+msgstr "Relatie"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_subject)s = Object subject"
-msgstr ""
+msgstr "%(object_subject)s = Object onderwerp"
#. module: base_action_rule
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr ""
+msgstr "Ongeldige XML voor weergave opbouw!"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Special Keywords to Be Used in The Body"
-msgstr ""
+msgstr "Speciale sleutelwoorden die in het bericht kunnen worden gebruikt"
#. module: base_action_rule
#: field:base.action.rule,trg_state_from:0
msgid "State"
-msgstr ""
+msgstr "Status"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_email:0
msgid "Email-id of the persons whom mail is to be sent"
-msgstr ""
+msgstr "Email-id van de personen waarvan de mail wordt verstuurd"
#. module: base_action_rule
#: view:base.action.rule:0
#: model:ir.module.module,shortdesc:base_action_rule.module_meta_information
msgid "Action Rule"
-msgstr ""
+msgstr "Actieregel"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Fields to Change"
-msgstr ""
+msgstr "Te veranderen velden"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Creation Date"
-msgstr ""
+msgstr "Aanmaakdatum"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Last Action Date"
-msgstr ""
+msgstr "Laatste actiedatum"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
diff --git a/addons/claim_from_delivery/i18n/ru.po b/addons/claim_from_delivery/i18n/ru.po
index 2d5b27ce972..611b3900cd8 100644
--- a/addons/claim_from_delivery/i18n/ru.po
+++ b/addons/claim_from_delivery/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 12:02+0000\n"
-"PO-Revision-Date: 2010-09-29 13:45+0000\n"
+"PO-Revision-Date: 2010-09-30 06:47+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: claim_from_delivery
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index 0832c0a16ee..4e5468f4550 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -250,7 +250,7 @@
name="current"
domain="[('state','in', ('draft','open','pending'))]"/>
\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -1708,7 +1708,7 @@ msgstr "Прочая информация"
#. module: crm
#: view:crm.claim:0
msgid "Claim Cost"
-msgstr ""
+msgstr "Расходы по претензии"
#. module: crm
#: view:crm.job:0
@@ -3020,7 +3020,7 @@ msgstr "ЧАСТНЫЙ"
#. module: crm
#: wizard_view:caldav.crm.subscribe,init:0
msgid "Provide path for Remote Calendar"
-msgstr ""
+msgstr "Укажите путь для удаленного календаря"
#. module: crm
#: view:crm.segmentation:0
@@ -3225,7 +3225,7 @@ msgstr ""
#: code:addons/crm/wizard/crm_job_wizard.py:0
#, python-format
msgid "A partner is already defined on this job request."
-msgstr ""
+msgstr "Партнер для этого запроса вакансии уже определен."
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead1
diff --git a/addons/crm_helpdesk/i18n/ru.po b/addons/crm_helpdesk/i18n/ru.po
index 6383f942270..8d2b2e208fc 100644
--- a/addons/crm_helpdesk/i18n/ru.po
+++ b/addons/crm_helpdesk/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 13:01+0000\n"
-"PO-Revision-Date: 2010-09-29 13:08+0000\n"
+"PO-Revision-Date: 2010-09-30 06:59+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:48+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm_helpdesk
diff --git a/addons/decimal_precision/decimal_precision.py b/addons/decimal_precision/decimal_precision.py
index 4077a019ee2..1986eb8c441 100644
--- a/addons/decimal_precision/decimal_precision.py
+++ b/addons/decimal_precision/decimal_precision.py
@@ -46,11 +46,11 @@ class decimal_precision(osv.osv):
def write(self, cr, uid, ids, data, *args, **argv):
res = super(decimal_precision, self).write(cr, uid, ids, data, *args, **argv)
- for obj in self.pool.obj_list():
- for colname,col in self.pool.get(obj)._columns.items():
- if isinstance(col, fields.float):
- col.digits_change(cr)
self.precision_get.clear_cache(cr.dbname)
+ for obj in self.pool.obj_list():
+ for colname, col in self.pool.get(obj)._columns.items():
+ if isinstance(col, (fields.float, fields.function)):
+ col.digits_change(cr)
return res
decimal_precision()
@@ -62,4 +62,3 @@ def get_precision(application):
return (16, res)
return change_digit
-
diff --git a/addons/decimal_precision/i18n/ru.po b/addons/decimal_precision/i18n/ru.po
index 2e37512bd84..3088918479a 100644
--- a/addons/decimal_precision/i18n/ru.po
+++ b/addons/decimal_precision/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 05:24+0000\n"
-"PO-Revision-Date: 2010-09-29 16:27+0000\n"
+"PO-Revision-Date: 2010-09-30 06:57+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: decimal_precision
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index b6e8b926a0c..f7ddb8bf504 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -377,7 +377,7 @@
- Statistics on Votes
+ Vote Statistics
idea.vote.stat
form
graph,tree
diff --git a/addons/idea/report/report_vote_view.xml b/addons/idea/report/report_vote_view.xml
index 9556f86a281..8418377065c 100644
--- a/addons/idea/report/report_vote_view.xml
+++ b/addons/idea/report/report_vote_view.xml
@@ -60,12 +60,12 @@
domain="[('idea_state','=',('cancel'))]"/>
-
+
-
-
+
+
@@ -74,9 +74,9 @@
-
-
-
+
+
+
diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py
index 611b5720a96..9d055bcfb5f 100644
--- a/addons/l10n_ch/wizard/bvr_import.py
+++ b/addons/l10n_ch/wizard/bvr_import.py
@@ -214,7 +214,8 @@ def _import(obj, cursor, user, data, context=None):
'period_id': statement.period_id.id
}
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
- result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment')
+ context.update({'move_line_ids': line_ids})
+ result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', context=context)
voucher_line_dict = False
if result['value']['line_ids']:
for line_dict in result['value']['line_ids']:
diff --git a/addons/lunch/lunch.py b/addons/lunch/lunch.py
index ad2996315aa..5a777564408 100644
--- a/addons/lunch/lunch.py
+++ b/addons/lunch/lunch.py
@@ -99,7 +99,7 @@ class lunch_cashmove(osv.osv):
'amount': fields.float('Amount', digits=(16, 2)),
'box': fields.many2one('lunch.cashbox', 'Box Name', size=30, required=True),
'active': fields.boolean('Active'),
- 'create_date': fields.datetime('Created date', readonly=True),
+ 'create_date': fields.datetime('Creation Date', readonly=True),
}
_defaults = {
@@ -141,7 +141,7 @@ class lunch_order(osv.osv):
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
'State', readonly=True, select=True),
'price': fields.function(_price_get, method=True, string="Price"),
- 'category': fields.many2one('lunch.category','Category',readonly=True),
+ 'category': fields.many2one('lunch.category','Category'),
}
_defaults = {
diff --git a/addons/marketing_campaign_crm_demo/i18n/ru.po b/addons/marketing_campaign_crm_demo/i18n/ru.po
index 8223d4de855..c0982592ac9 100644
--- a/addons/marketing_campaign_crm_demo/i18n/ru.po
+++ b/addons/marketing_campaign_crm_demo/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 08:14+0000\n"
-"PO-Revision-Date: 2010-09-29 13:22+0000\n"
+"PO-Revision-Date: 2010-09-30 06:47+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: marketing_campaign_crm_demo
diff --git a/addons/membership/demo_data.xml b/addons/membership/demo_data.xml
index 6031e76d3da..6809702a113 100644
--- a/addons/membership/demo_data.xml
+++ b/addons/membership/demo_data.xml
@@ -14,7 +14,6 @@ result = price_unit * 0.10"" name="python_compute_inv"/>
-
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 67aae0f1b91..615b5cee009 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -283,7 +283,7 @@
mrp.routing.search
mrp.routing
- tree
+ search
diff --git a/addons/procurement/i18n/ru.po b/addons/procurement/i18n/ru.po
index 4aa9937c935..ed26402d8b0 100644
--- a/addons/procurement/i18n/ru.po
+++ b/addons/procurement/i18n/ru.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2010-08-20 08:51+0000\n"
-"PO-Revision-Date: 2010-09-29 16:40+0000\n"
+"PO-Revision-Date: 2010-09-30 06:44+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: Russian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: procurement
diff --git a/addons/purchase/i18n/ru.po b/addons/purchase/i18n/ru.po
index 1eb0196db22..ab3c213f91d 100644
--- a/addons/purchase/i18n/ru.po
+++ b/addons/purchase/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 14:29+0000\n"
+"PO-Revision-Date: 2010-09-30 06:38+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: purchase
diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po
index 5bf8551edbf..556ed670eaf 100644
--- a/addons/sale/i18n/ru.po
+++ b/addons/sale/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 20:42+0000\n"
+"PO-Revision-Date: 2010-09-30 06:52+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:42+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 3f44ef2afb3..a4eab5aa86d 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -312,7 +312,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -325,7 +325,7 @@
Taxes :
|
- [[ formatLang(o.amount_tax ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -338,7 +338,7 @@
Total :
|
- [[ formatLang(o.amount_total ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
|
@@ -361,4 +361,4 @@
-
\ No newline at end of file
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 96f80fe6f18..03252691fe7 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -21,12 +21,12 @@
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
+import time
+
from osv import fields, osv
from tools.translate import _
import decimal_precision as dp
import netsvc
-import time
-
class sale_shop(osv.osv):
_name = "sale.shop"
@@ -62,6 +62,7 @@ class sale_order(osv.osv):
'shipped': False,
'invoice_ids': [],
'picking_ids': [],
+ 'date_confirm':False,
'name': self.pool.get('ir.sequence').get(cr, uid, 'sale.order'),
})
return super(sale_order, self).copy(cr, uid, id, default, context=context)
diff --git a/addons/sale_crm/i18n/ru.po b/addons/sale_crm/i18n/ru.po
index f7882eacc5b..6585d3294e4 100644
--- a/addons/sale_crm/i18n/ru.po
+++ b/addons/sale_crm/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 18:56+0000\n"
+"PO-Revision-Date: 2010-09-30 06:39+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_crm
diff --git a/addons/sale_layout/report/report_sale_layout.py b/addons/sale_layout/report/report_sale_layout.py
index 20ad66313a2..3e61a6cd3e9 100755
--- a/addons/sale_layout/report/report_sale_layout.py
+++ b/addons/sale_layout/report/report_sale_layout.py
@@ -1,5 +1,5 @@
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -14,21 +14,22 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
import time
-import pooler
from report import report_sxw
rml_parents = {
- 'tr':1,
- 'li':1,
+ 'tr': 1,
+ 'li': 1,
'story': 0,
'section': 0
}
+
+
class sale_order_1(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(sale_order_1, self).__init__(cr, uid, name, context)
@@ -39,98 +40,94 @@ class sale_order_1(report_sxw.rml_parse):
})
self.context = context
-#
+ def sale_order_lines(self, sale_order):
+ result = []
+ sub_total = {}
+ info = []
+ order_lines = []
+ res = {}
- def sale_order_lines(self,sale_order):
- result =[]
- sub_total={}
- info=[]
- order_lines=[]
- res={}
- list_in_seq=[]
ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)])
- for id in range(0,len(ids)):
- order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.context.copy())
+ for id in range(0, len(ids)):
+ order = self.pool.get('sale.order.line').browse(self.cr, self.uid, ids[id], self.context.copy())
order_lines.append(order)
-
- i=1
- j=0
- sum_flag={}
- sum_flag[j]=-1
+
+ i = 1
+ j = 0
+ sum_flag = {}
+ sum_flag[j] = -1
for entry in order_lines:
- res={}
+ res = {}
- if entry.layout_type=='article':
- res['tax_id']=', '.join(map(lambda x: x.name, entry.tax_id)) or ''
- res['name']=entry.name
- res['product_uom_qty']="%.2f"%(entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
- res['product_uom']=entry.product_uos and entry.product_uos.name or entry.product_uom.name
- res['price_unit']="%.2f"%(entry.price_unit or 0.00)
- res['discount']="%.2f"%(entry.discount and entry.discount or 0.00)
- res['price_subtotal']="%.2f"%(entry.price_subtotal and entry.price_subtotal or 0.00)
- sub_total[i]= entry.price_subtotal and entry.price_subtotal
- i=i+1
- res['note']=entry.notes or ''
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['layout_type']=entry.layout_type
-
+ if entry.layout_type == 'article':
+ res['tax_id'] = ', '.join(map(lambda x: x.name, entry.tax_id)) or ''
+ res['name'] = entry.name
+ res['product_uom_qty'] = entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00
+ res['product_uom'] = entry.product_uos and entry.product_uos.name or entry.product_uom.name
+ res['price_unit'] = entry.price_unit or 0.00
+ res['discount'] = entry.discount and entry.discount or 0.00
+ res['price_subtotal'] = entry.price_subtotal and entry.price_subtotal or 0.00
+ sub_total[i] = entry.price_subtotal and entry.price_subtotal
+ i = i + 1
+ res['note'] = entry.notes or ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['layout_type'] = entry.layout_type
else:
+ res['product_uom_qty'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['layout_type'] = entry.layout_type
+ res['note'] = entry.notes or ''
+ res['product_uom'] = ''
- res['product_uom_qty']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['layout_type']=entry.layout_type
- res['note']=entry.notes or ''
- res['product_uom']=''
-
- if entry.layout_type=='subtotal':
- res['name']=entry.name
- sum=0
- sum_id=0
- if sum_flag[j]==-1:
- temp=1
+ if entry.layout_type == 'subtotal':
+ res['name'] = entry.name
+ sum = 0
+ sum_id = 0
+ if sum_flag[j] == -1:
+ temp = 1
else:
- temp=sum_flag[j]
+ temp = sum_flag[j]
- for sum_id in range(temp,len(sub_total)+1):
- sum+=sub_total[sum_id]
- sum_flag[j+1]= sum_id +1
+ for sum_id in range(temp, len(sub_total)+1):
+ sum += sub_total[sum_id]
+ sum_flag[j+1] = sum_id +1
- j=j+1
- res['price_subtotal']="%.2f"%(sum)
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['quantity']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['product_uom']=''
- elif entry.layout_type=='title':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='text':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='line':
- res['product_uom_qty']='__________'
- res['price_unit']='______________'
- res['discount']='___________'
- res['tax_id']='_________________'
- res['product_uom']='_____'
- res['name']='_______________________________________'
- res['price_subtotal']='_________'
- res['currency']='_______'
- elif entry.layout_type=='break':
- res['layout_type']=entry.layout_type
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
+ j = j + 1
+ res['price_subtotal'] = sum
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['quantity'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['product_uom'] = ''
+ elif entry.layout_type == 'title':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'text':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'line':
+ res['product_uom_qty'] = '__________'
+ res['price_unit'] = '______________'
+ res['discount'] = '___________'
+ res['tax_id'] = '_________________'
+ res['product_uom'] = '_____'
+ res['name'] = '_______________________________________'
+ res['price_subtotal'] = '_________'
+ res['currency'] = '_______'
+ elif entry.layout_type == 'break':
+ res['layout_type'] = entry.layout_type
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
else:
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=sale_order.pricelist_id.currency_id.name
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
result.append(res)
return result
diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml
index d33d424a8a2..b01affd5329 100755
--- a/addons/sale_layout/report/report_sale_layout.rml
+++ b/addons/sale_layout/report/report_sale_layout.rml
@@ -318,13 +318,13 @@
[[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom'] ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ a['price_unit'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ formatLang(a['price_unit'], digits=get_digits(dp='Sale Price')) ]]
|
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['discount'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['discount'], digits=get_digits(dp='Sale Price')) ]]
|
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['price_subtotal'] ]] [[ o.pricelist_id.currency_id.symbol ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['price_subtotal'], digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]
|
@@ -397,7 +397,7 @@
Taxes :
- [[ formatLang(o.amount_tax ) ]] [[ o.pricelist_id.currency_id.symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account') ) ]] [[ o.pricelist_id.currency_id.symbol ]]
|
diff --git a/addons/subscription/subscription_view.xml b/addons/subscription/subscription_view.xml
index abe58ced56d..b27414bb60c 100644
--- a/addons/subscription/subscription_view.xml
+++ b/addons/subscription/subscription_view.xml
@@ -15,11 +15,11 @@
form