From 8c1f05ac00c43f82e9a44ece76f3fd76351c03bb Mon Sep 17 00:00:00 2001 From: "UCO(Open ERP)" <> Date: Wed, 23 Jun 2010 15:56:05 +0530 Subject: [PATCH 1/2] [MOD] small changes in menus bzr revid: vir@tinyerp.com-20100623102605-z6830kbiueyfso97 --- addons/base_module_record/base_module_record_wizard.xml | 3 ++- addons/multi_company/res_company_view.xml | 1 + addons/process/process_view.xml | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/base_module_record/base_module_record_wizard.xml b/addons/base_module_record/base_module_record_wizard.xml index b0a7d84a89c..da56814a29f 100644 --- a/addons/base_module_record/base_module_record_wizard.xml +++ b/addons/base_module_record/base_module_record_wizard.xml @@ -5,7 +5,8 @@ + id="menu_wizard_base_mod_rec" + groups="base.group_extended"/> + parent="base.menu_custom" + groups="base.group_extended"/> From 412628535af20c7c645f2f6476e53c9953f548eb Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Wed, 23 Jun 2010 16:01:14 +0530 Subject: [PATCH 2/2] [IMP] account : act_window behavior of invoices from Partners corrected bzr revid: ach@tinyerp.com-20100623103114-1y9tkiwn2p5cjd2q --- addons/account/invoice.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index f478881ac7c..fc048138256 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -325,6 +325,19 @@ class account_invoice(osv.osv): 'user_id': lambda s, cr, u, c: u, } + def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): + if context.get('active_model','') in ['res.partner']: + partner = self.pool.get(context['active_model']).read(cr,uid,context['active_ids'],['supplier','customer'])[0] + if not view_type: + view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.tree')])[0] + view_type = 'tree' + if view_type == 'form': + if partner['supplier'] and not partner['customer']: + view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.supplier.form')])[0] + else: + view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name','=','account.invoice.form')])[0] + return super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu) + def create(self, cr, uid, vals, context={}): try: res = super(account_invoice, self).create(cr, uid, vals, context)