From 04bdda2a295cae1222702b029fdaf61684142816 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Wed, 30 Nov 2011 18:12:10 +0530 Subject: [PATCH 1/3] [FIX]: account: Fixed problem of wrong journal code generation and which causes installation of some modules break because of unique constraints bzr revid: rpa@tinyerp.com-20111130124210-a0rqbej550042kcg --- addons/account/account.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index e41a5f2f280..441a28edc5a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -3135,6 +3135,19 @@ class wizard_multi_charts_accounts(osv.osv_memory): break else: current_num += 1 + + # we need to loop again to find next number for journal code + # because we can't rely on the value current_num as, + # its possible that we already have bank journals created (e.g. by the creation of res.partner.bank) + # and the next number for account code might have been already used before for journal + journal_count = 1 + while True: + journal_code = _('BNK') + str(journal_count) + ids = obj_journal.search(cr, uid, [('code', '=', journal_code)], context=context) + if not ids: + break + journal_count += 1 + vals = { 'name': tmp, 'currency_id': line.currency_id and line.currency_id.id or False, @@ -3150,7 +3163,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): #create the bank journal vals_journal = { 'name': vals['name'], - 'code': _('BNK') + str(current_num), + 'code': journal_code, 'type': line.account_type == 'cash' and 'cash' or 'bank', 'company_id': company_id, 'analytic_journal_id': False, From cf2d2e879f1edbd7069c104a41eebadfecbfa5c1 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Fri, 23 Dec 2011 11:46:21 +0530 Subject: [PATCH 2/3] [FIX] account_voucher : can't open a form view of Journal Vouchers lp bug: https://launchpad.net/bugs/907692 fixed bzr revid: mdi@tinyerp.com-20111223061621-l31dd3bdcud2btv2 --- addons/account_voucher/account_voucher_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml index cbe35b5fc5f..b791a355a48 100644 --- a/addons/account_voucher/account_voucher_view.xml +++ b/addons/account_voucher/account_voucher_view.xml @@ -43,7 +43,7 @@
- + From 01555b28a9fdf8ce1d0c17039d9d4af260010671 Mon Sep 17 00:00:00 2001 From: fp Date: Fri, 23 Dec 2011 07:50:49 +0100 Subject: [PATCH 3/3] [IMP] PoS menus bzr revid: fp@fp-laptop-20111223065049-11t5glcrznx753te --- addons/point_of_sale/point_of_sale_view.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index ba760baeb09..54ff0f9e131 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -768,7 +768,13 @@ + web_icon="images/touchscreen.png" web_icon_hover="images/touchscreen-hover.png" groups="point_of_sale.group_pos_manager,point_of_sale.group_pos_user"/> + + + Launch PoS + + +