diff --git a/addons/account/account.py b/addons/account/account.py index ab3d065421f..46cfaf645a8 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -300,7 +300,6 @@ class account_account(osv.osv): if aml_query.strip(): wheres.append(aml_query.strip()) filters = " AND ".join(wheres) - _logger.debug('Filters: %s',(filters)) # IN might not work ideally in case there are too many # children_and_consolidated, in that case join on a # values() e.g.: @@ -316,7 +315,6 @@ class account_account(osv.osv): " GROUP BY l.account_id") params = (tuple(children_and_consolidated),) + query_params cr.execute(request, params) - _logger.debug('Status: %s',(cr.statusmessage)) for row in cr.dictfetchall(): accounts[row['id']] = row diff --git a/addons/account/product_view.xml b/addons/account/product_view.xml index 5f417825032..4d64af3e154 100644 --- a/addons/account/product_view.xml +++ b/addons/account/product_view.xml @@ -14,8 +14,8 @@ - - + + diff --git a/addons/account/project/report/analytic_balance.rml b/addons/account/project/report/analytic_balance.rml index 0c488eac400..1754988f7d6 100644 --- a/addons/account/project/report/analytic_balance.rml +++ b/addons/account/project/report/analytic_balance.rml @@ -163,7 +163,7 @@ [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] - [[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] + [[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]] @@ -187,7 +187,7 @@ [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] - [[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'quantity')) ]] @@ -211,7 +211,7 @@ [[ formatLang(move_g['credit']) ]] - [[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol ]] + [[ formatLang(move_g['balance'], currency_obj = company.currency_id) ]] [[ formatLang(move_g['quantity']) ]] diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index 7500b655ab3..1099a8b8b4e 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -224,7 +224,7 @@ [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]] @@ -245,7 +245,7 @@ [[ formatLang (account_sum_credit(account,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]] + [[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]] @@ -266,7 +266,7 @@ [[ formatLang( move_g['credit']) ]] - [[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]] + [[ formatLang( move_g['balance'], currency_obj = company.currency_id) ]] @@ -290,7 +290,7 @@ [[ formatLang( move_a['credit']) ]] - [[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]] + [[ formatLang( move_a['balance'], currency_obj = company.currency_id)]] diff --git a/addons/account/project/report/inverted_analytic_balance.rml b/addons/account/project/report/inverted_analytic_balance.rml index f112ec8fbd3..54b6878c407 100644 --- a/addons/account/project/report/inverted_analytic_balance.rml +++ b/addons/account/project/report/inverted_analytic_balance.rml @@ -164,7 +164,7 @@ [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] - [[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]] + [[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] [[ formatLang(sum_quantity(objects,data['form']['date1'],data['form']['date2'])) ]] @@ -188,7 +188,7 @@ [[formatLang(move_g['credit'])]] - [[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol]] + [[ formatLang(move_g['balance'], currency_obj = company.currency_id)]] [[formatLang(move_g['quantity']) ]] @@ -212,7 +212,7 @@ [[ formatLang(move_a['credit']) ]] - [[ formatLang(move_a['balance']) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_a['balance'], currency_obj = company.currency_id)]] [[ formatLang(move_a['quantity']) ]] diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml index 8963ba97376..8a421e3cb36 100644 --- a/addons/account/report/account_analytic_entries_report_view.xml +++ b/addons/account/report/account_analytic_entries_report_view.xml @@ -5,7 +5,7 @@ analytic.entries.report.tree analytic.entries.report - + diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml index 667c61ab78f..551265252cc 100644 --- a/addons/account/report/account_entries_report_view.xml +++ b/addons/account/report/account_entries_report_view.xml @@ -5,7 +5,7 @@ account.entries.report.tree account.entries.report - + diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index c22d5d55f45..13a137e53df 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -5,7 +5,7 @@ account.invoice.report.tree account.invoice.report - + diff --git a/addons/account/report/account_print_overdue.py b/addons/account/report/account_print_overdue.py index 1b617e9afa4..4ddedc102f5 100644 --- a/addons/account/report/account_print_overdue.py +++ b/addons/account/report/account_print_overdue.py @@ -29,34 +29,11 @@ class Overdue(report_sxw.rml_parse): super(Overdue, self).__init__(cr, uid, name, context=context) self.localcontext.update( { 'time': time, - 'adr_get': self._adr_get, 'getLines': self._lines_get, 'tel_get': self._tel_get, 'message': self._message, }) self.context = context - def _adr_get(self, partner, type): - res = [] - res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') - addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) - adr_id = addresses and addresses[type] or False - result = { - 'name': False, - 'street': False, - 'street2': False, - 'city': False, - 'zip': False, - 'state_id':False, - 'country_id': False, - } - if adr_id: - result = res_partner.read(self.cr, self.uid, [adr_id], context=self.context.copy()) - result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False - result[0]['state_id'] = result[0]['state_id'] and result[0]['state_id'][1] or False - return result - - res.append(result) - return res def _tel_get(self,partner): if not partner: diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml index 2d4238823da..577cb9142a2 100644 --- a/addons/account/report/account_print_overdue.rml +++ b/addons/account/report/account_print_overdue.rml @@ -126,15 +126,10 @@ - [[ repeatIn(adr_get(o, 'invoice'),'addr') ]] [[ o.title.name or '' ]] [[ o.name ]] - [[ addr['street'] ]] - [[ addr['street2'] or removeParentNode('para') ]] - [[ addr['zip'] ]] [[ addr['city'] ]] - [[ addr['state_id'] or removeParentNode('para')]] - [[ addr['country_id'] ]] + [[ display_address(o.partner_id)] ]] @@ -216,7 +211,7 @@ [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] - [[ time.strftime('%Y-%m-%d') > formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]] + [[ time.strftime('%Y-%m-%d') > formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]] [[ line['blocked'] and 'X' or '' ]] @@ -241,7 +236,7 @@ [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] - [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)), currency_obj=company.currency_id) ]] @@ -261,7 +256,7 @@ Balance : - [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0)), currency_obj = company.currency_id) ]] diff --git a/addons/account/report/account_treasury_report_view.xml b/addons/account/report/account_treasury_report_view.xml index ee21b9e5ec6..be6ae0dfdc9 100644 --- a/addons/account/report/account_treasury_report_view.xml +++ b/addons/account/report/account_treasury_report_view.xml @@ -5,7 +5,7 @@ account.treasury.report.tree account.treasury.report - + diff --git a/addons/account_asset/report/account_asset_report_view.xml b/addons/account_asset/report/account_asset_report_view.xml index bc598011086..4865196c4a8 100644 --- a/addons/account_asset/report/account_asset_report_view.xml +++ b/addons/account_asset/report/account_asset_report_view.xml @@ -6,7 +6,7 @@ asset.asset.report.tree asset.asset.report - + diff --git a/addons/account_check_writing/report/check_print.py b/addons/account_check_writing/report/check_print.py index f8e048beb2d..fd52c96b9aa 100644 --- a/addons/account_check_writing/report/check_print.py +++ b/addons/account_check_writing/report/check_print.py @@ -32,7 +32,6 @@ class report_print_check(report_sxw.rml_parse): 'time': time, 'get_lines': self.get_lines, 'fill_stars' : self.fill_stars, - 'get_zip_line': self.get_zip_line, }) def fill_stars(self, amount): amount = amount.replace('Dollars','') @@ -41,25 +40,6 @@ class report_print_check(report_sxw.rml_parse): return ' '.join([amount,'*'*stars]) else: return amount - - def get_zip_line(self, address): - ''' - Get the address line - ''' - ret = '' - if address: - if address.city: - ret += address.city - if address.state_id: - if address.state_id.name: - if ret: - ret += ', ' - ret += address.state_id.name - if address.zip: - if ret: - ret += ' ' - ret += address.zip - return ret def get_lines(self, voucher_lines): result = [] diff --git a/addons/account_check_writing/report/check_print_bottom.rml b/addons/account_check_writing/report/check_print_bottom.rml index bb499a8aac1..f9add2fe60b 100644 --- a/addons/account_check_writing/report/check_print_bottom.rml +++ b/addons/account_check_writing/report/check_print_bottom.rml @@ -281,10 +281,7 @@ [[ voucher.partner_id.name ]] - [[ voucher.partner_id.street or removeParentNode('para') ]] - [[ voucher.partner_id.street2 or removeParentNode('para') ]] - [[ get_zip_line(voucher.partner_id) ]] - [[ voucher.partner_id.country_id.name]] + [[ display_address(voucher.partner_id) or removeParentNode('para') ]] diff --git a/addons/account_check_writing/report/check_print_middle.rml b/addons/account_check_writing/report/check_print_middle.rml index 5a2f83f20a2..b1fffca662d 100644 --- a/addons/account_check_writing/report/check_print_middle.rml +++ b/addons/account_check_writing/report/check_print_middle.rml @@ -237,10 +237,7 @@ [[ voucher.partner_id.name ]] - [[ voucher.partner_id.street or removeParentNode('para') ]] - [[ voucher.partner_id.street2 or removeParentNode('para') ]] - [[ get_zip_line(voucher.partner_id) ]] - [[ voucher.partner_id.country_id.name]] + [[ display_address(voucher.partner_id) or removeParentNode('para') ]] diff --git a/addons/account_check_writing/report/check_print_top.rml b/addons/account_check_writing/report/check_print_top.rml index 41526605f47..9a4d633e680 100644 --- a/addons/account_check_writing/report/check_print_top.rml +++ b/addons/account_check_writing/report/check_print_top.rml @@ -153,9 +153,7 @@ [[ voucher.partner_id.name ]] - [[ voucher.partner_id.street2 or removeParentNode('para') ]] - [[ get_zip_line(voucher.partner_id) ]] - [[ voucher.partner_id.country_id.name]] + [[ display_address(voucher.partner_id) or removeParentNode('para') ]] diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index 8d64ce30f6b..593430691aa 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -30,7 +30,6 @@ class report_rappel(report_sxw.rml_parse): self.localcontext.update({ 'time': time, 'ids_to_objects': self._ids_to_objects, - 'adr_get': self._adr_get, 'getLines': self._lines_get, 'get_text': self._get_text }) @@ -43,11 +42,6 @@ class report_rappel(report_sxw.rml_parse): all_lines.append(line) return all_lines - def _adr_get(self, stat_line, type): - res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') - adr = res_partner.address_get(self.cr, self.uid, [stat_line.partner_id.id], [type])[type] - return adr and res_partner.read(self.cr, self.uid, [adr]) or [{}] - def _lines_get(self, stat_by_partner_line): pool = pooler.get_pool(self.cr.dbname) moveline_obj = pool.get('account.move.line') diff --git a/addons/account_followup/report/account_followup_print.rml b/addons/account_followup/report/account_followup_print.rml index 3d096ecf3ac..7f2242991de 100644 --- a/addons/account_followup/report/account_followup_print.rml +++ b/addons/account_followup/report/account_followup_print.rml @@ -129,15 +129,10 @@ - [[ repeatIn(adr_get(o,'invoice'),'a' )]] [[ o.partner_id.name or '' ]] - [[ a['street'] or '']] - [[ a['street2'] or removeParentNode('para') ]] - [[ a['zip'] or '' ]] [[ a['city'] or '' ]] - [[( a['state_id'] and a['state_id'][1]) or removeParentNode('para') ]] - [[( a['country_id'] and a['country_id'][1]) or '']] + [[ display_address(o.partner_id) or '']] diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 973588e5410..7ad897890e4 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -256,10 +256,10 @@ [[line.date=='False' and '-' or formatLang(line.date,date=True) ]] - [[formatLang(line.amount) or '-' ]] [[get_company_currency_symbol()]] + [[formatLang(line.amount, currency_obj= user.company_id.currency_id) or '-' ]] - [[ formatLang(line.amount_currency) ]] [[ line.currency.symbol]] + [[ formatLang(line.amount_currency, currency_obj= line.currency)]] @@ -275,10 +275,10 @@ Total: - [[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] + [[ formatLang(get_amount_total(o), currency_obj= user.company_id.currency_id) or '' ]] - [[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[get_company_currency_symbol()]] + [[ formatLang(get_amount_total_in_currency(o), currency_obj= user.company_id.currency_id) or '' ]] diff --git a/addons/account_payment/report/payment_order.py b/addons/account_payment/report/payment_order.py index 6872bbe3516..5f9708f876c 100644 --- a/addons/account_payment/report/payment_order.py +++ b/addons/account_payment/report/payment_order.py @@ -32,7 +32,6 @@ class payment_order(report_sxw.rml_parse): 'time': time, 'get_invoice_name': self._get_invoice_name, 'get_company_currency': self._get_company_currency, - 'get_company_currency_symbol': self._get_company_currency_symbol, 'get_amount_total_in_currency': self._get_amount_total_in_currency, 'get_amount_total': self._get_amount_total, 'get_account_name': self._get_account_name, @@ -72,12 +71,8 @@ class payment_order(report_sxw.rml_parse): user = pool.get('res.users').browse(self.cr, self.uid, self.uid) return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False - def _get_company_currency_symbol(self): - pool = pooler.get_pool(self.cr.dbname) - user = pool.get('res.users').browse(self.cr, self.uid, self.uid) - return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False - def _get_account_name(self, bank_id): + def _get_account_name(self,bank_id): if bank_id: pool = pooler.get_pool(self.cr.dbname) value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id]) diff --git a/addons/account_voucher/report/account_voucher_print.rml b/addons/account_voucher/report/account_voucher_print.rml index 923e900887a..9f0f2e1f07e 100644 --- a/addons/account_voucher/report/account_voucher_print.rml +++ b/addons/account_voucher/report/account_voucher_print.rml @@ -219,7 +219,7 @@ [[ p['pname'] ]] - [[ p['amount'] ]] [[ voucher.currency_id.symbol ]] + [[ formatLang(p['amount'], currency_obj=voucher.currency_id) ]] @@ -323,7 +323,7 @@ - [[ voucher.amount ]] [[ voucher.currency_id.symbol ]] + [[ formatLang(voucher.amount, currency_obj=voucher.currency_id) ]] diff --git a/addons/account_voucher/report/account_voucher_sales_receipt_view.xml b/addons/account_voucher/report/account_voucher_sales_receipt_view.xml index 15b2433ec25..fbd40ee17ba 100644 --- a/addons/account_voucher/report/account_voucher_sales_receipt_view.xml +++ b/addons/account_voucher/report/account_voucher_sales_receipt_view.xml @@ -6,7 +6,7 @@ sale.receipt.report.tree sale.receipt.report - + diff --git a/addons/audittrail/audittrail_view.xml b/addons/audittrail/audittrail_view.xml index b041329f6bd..c26e1b5b570 100644 --- a/addons/audittrail/audittrail_view.xml +++ b/addons/audittrail/audittrail_view.xml @@ -145,7 +145,7 @@ audittrail.log.tree audittrail.log - + diff --git a/addons/auth_oauth/res_users.py b/addons/auth_oauth/res_users.py index 9c1f88bd7f4..115e3136f00 100644 --- a/addons/auth_oauth/res_users.py +++ b/addons/auth_oauth/res_users.py @@ -21,7 +21,7 @@ class res_users(osv.Model): } _sql_constraints = [ - ('uniq_users_oauth_provider_oauht_uid', 'unique(auth_provider_id, auth_uid)', 'OAuth UID must be unique per provider'), + ('uniq_users_oauth_provider_oauth_uid', 'unique(oauth_provider_id, oauth_uid)', 'OAuth UID must be unique per provider'), ] def auth_oauth_rpc(self, cr, uid, endpoint, access_token, context=None): diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index 35ed9411215..a17633d0ef6 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -8,7 +8,7 @@ crm.lead.report.tree crm.lead.report - + @@ -130,7 +130,7 @@ crm.lead.report.tree crm.lead.report - + diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml index ec7ea5e6bdb..a2120aef6ab 100644 --- a/addons/crm/report/crm_phonecall_report_view.xml +++ b/addons/crm/report/crm_phonecall_report_view.xml @@ -8,7 +8,7 @@ crm.phonecall.report.tree crm.phonecall.report - + diff --git a/addons/crm/res_config.py b/addons/crm/res_config.py index b04853d9f6a..6f431b90cba 100644 --- a/addons/crm/res_config.py +++ b/addons/crm/res_config.py @@ -32,6 +32,13 @@ class crm_configuration(osv.osv_memory): 'group_fund_raising': fields.boolean("Manage Fund Raising", implied_group='crm.group_fund_raising', help="""Allows you to trace and manage your activities for fund raising."""), + 'module_crm_claim':fields.boolean("Manage Customer Claims", + help="""Allows you to track your customers/suppliers claims and grievances. + This installs the module crm_claim."""), + 'module_crm_helpdesk':fields.boolean("Manage Helpdesk and Support", + help="""Allows you to communicate with Customer, process Customer query, and provide better help and support. This installs the module crm_helpdesk."""), + + } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/res_config_view.xml b/addons/crm/res_config_view.xml index 6330d7a0500..9534c8620ee 100644 --- a/addons/crm/res_config_view.xml +++ b/addons/crm/res_config_view.xml @@ -7,6 +7,22 @@ sale.config.settings +
+ + + +