From 5ff73e4c64b330124f89e135fd585b112de91bbd Mon Sep 17 00:00:00 2001 From: "sma (Tiny)" Date: Thu, 13 May 2010 12:02:42 +0530 Subject: [PATCH 1/5] [FIX] Fixed search method corrected for count attributes(ir.ui.menu). bzr revid: sma@tinyerp.com-20100513063242-fyn0yosd2yc8kgjp --- bin/addons/base/ir/ir_ui_menu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/addons/base/ir/ir_ui_menu.py b/bin/addons/base/ir/ir_ui_menu.py index bc3dbd38bde..a33686e1eb9 100644 --- a/bin/addons/base/ir/ir_ui_menu.py +++ b/bin/addons/base/ir/ir_ui_menu.py @@ -73,6 +73,9 @@ class ir_ui_menu(osv.osv): if count: return 0 return [] + + if count and ids: + return ids modelaccess = self.pool.get('ir.model.access') user_groups = set(self.pool.get('res.users').read(cr, 1, uid, ['groups_id'])['groups_id']) From 2ec25243c7ef4902b2dd1ae07f680440782271aa Mon Sep 17 00:00:00 2001 From: "nch@tinyerp.com" <> Date: Thu, 13 May 2010 17:20:29 +0530 Subject: [PATCH 2/5] [IMP]:config wizard for company setup bzr revid: nch@tinyerp.com-20100513115029-wqwc3q444d4icali --- bin/addons/base/res/res_company.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index 6a64d5700b7..011e6f87a42 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -24,7 +24,7 @@ from osv import fields import os import tools from tools.translate import _ - +import base64 class multi_company_default(osv.osv): """ @@ -85,7 +85,8 @@ class res_company(osv.osv): 'logo' : fields.binary('Logo'), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), 'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'), - 'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users') + 'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users'), + 'account_no':fields.char('Account No.', size=64), } def search(self, cr, uid, args, offset=0, limit=None, order=None, @@ -179,6 +180,11 @@ class res_company(osv.osv): level -= 1 return True + def _get_logo(self, cr, uid, ids): + file_data = open('../pixmaps/openerp-header.png','rb').read() + return base64.encodestring(file_data) + + def _get_header2(self,cr,uid,ids): return """
@@ -240,7 +246,8 @@ class res_company(osv.osv): _defaults = { 'currency_id': _get_euro, 'rml_header':_get_header, - 'rml_header2': _get_header2 + 'rml_header2': _get_header2, + 'logo':_get_logo } _constraints = [ From bba3dcfe5a4f4c71f99de6f1cf18206c5ee90a8b Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Thu, 13 May 2010 18:59:23 +0530 Subject: [PATCH 3/5] [MOD] general usability chabges bzr revid: vir@tinyerp.com-20100513132923-y3uo7pzwmqhfmc91 --- addons/account/account_invoice_view.xml | 2 +- addons/account/project/project_view.xml | 8 ++-- .../report/account_analytic_report_view.xml | 2 +- .../report/account_invoice_report_view.xml | 2 +- .../account_aged_trial_balance_view.xml | 2 +- .../wizard/account_balance_report_view.xml | 2 +- .../account_general_ledger_report_view.xml | 2 +- .../account_partner_balance_report_view.xml | 2 +- .../wizard/account_third_party_ledger.xml | 2 +- addons/account/wizard/account_vat_view.xml | 2 +- addons/crm/report/crm_claim_report_view.xml | 2 +- .../report/crm_fundraising_report_view.xml | 2 +- .../crm/report/crm_helpdesk_report_view.xml | 2 +- addons/crm/report/crm_lead_report_view.xml | 2 +- .../report/crm_opportunity_report_view.xml | 2 +- .../crm/report/crm_phonecall_report_view.xml | 2 +- addons/crm/report/crm_report_view.xml | 2 +- addons/hr/hr_view.xml | 2 +- addons/hr_attendance/hr_attendance_view.xml | 2 +- addons/hr_contract/hr_contract_view.xml | 2 +- addons/hr_evaluation/hr_evaluation_view.xml | 8 ++-- .../report/hr_evaluation_report_view.xml | 2 +- addons/hr_expense/hr_expense_view.xml | 2 +- .../report/hr_expense_report_view.xml | 2 +- addons/hr_holidays/hr_holidays_view.xml | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- .../report/hr_recruitment_report_view.xml | 2 +- .../hr_timesheet_invoice_report_view.xml | 2 +- .../hr_timesheet_sheet_view.xml | 2 +- .../report/timesheet_report_view.xml | 2 +- addons/mrp/mrp_view.xml | 4 +- .../mrp/report/mrp_production_order_view.xml | 2 +- addons/mrp_operations/mrp_operations_view.xml | 2 +- .../mrp_procurement/mrp_procurement_view.xml | 4 +- addons/mrp_repair/mrp_repair_view.xml | 2 +- addons/point_of_sale/pos_view.xml | 38 +++++++++---------- addons/point_of_sale/statement_view.xml | 12 +++--- addons/product/product_view.xml | 4 +- addons/project/project_view.xml | 2 +- addons/project/report/project_report_view.xml | 2 +- addons/project_issue/project_issue_view.xml | 2 +- .../report/project_issue_report_view.xml | 2 +- .../project_long_term_view.xml | 2 +- .../report/task_report_view.xml | 4 +- addons/purchase/purchase_view.xml | 8 ++-- .../purchase/report/purchase_report_view.xml | 2 +- .../purchase_requisition_view.xml | 2 +- addons/resource/resource_view.xml | 20 +++++----- addons/sale/report/sale_report_view.xml | 4 +- addons/sale/sale_view.xml | 4 +- addons/scrum/scrum_view.xml | 2 +- addons/stock/stock_view.xml | 2 +- 52 files changed, 99 insertions(+), 99 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 5ef07f6c88b..1fa182645d7 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -351,7 +351,7 @@ - + diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index a97be959cd1..5f89a9172a9 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -67,7 +67,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -177,7 +177,7 @@ - + @@ -286,7 +286,7 @@ - + diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml index de97bfcb798..c6214615377 100644 --- a/addons/account/report/account_analytic_report_view.xml +++ b/addons/account/report/account_analytic_report_view.xml @@ -53,7 +53,7 @@ - + diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 5a833e454fb..6f5116cb3da 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -92,7 +92,7 @@ - + form
- + diff --git a/addons/account/wizard/account_balance_report_view.xml b/addons/account/wizard/account_balance_report_view.xml index dd1b7147f13..f50cce039cc 100644 --- a/addons/account/wizard/account_balance_report_view.xml +++ b/addons/account/wizard/account_balance_report_view.xml @@ -8,7 +8,7 @@ form - + diff --git a/addons/account/wizard/account_general_ledger_report_view.xml b/addons/account/wizard/account_general_ledger_report_view.xml index 0790a1654b9..a2ff3accf5f 100644 --- a/addons/account/wizard/account_general_ledger_report_view.xml +++ b/addons/account/wizard/account_general_ledger_report_view.xml @@ -8,7 +8,7 @@ form - +