From ec6815cac2a6229b0f29be74ebc5360606115dd6 Mon Sep 17 00:00:00 2001 From: Hardik Date: Tue, 28 Aug 2012 16:50:05 +0530 Subject: [PATCH 1/2] [IMP]Sale module improved bzr revid: hsa@tinyerp.com-20120828112005-r1atqht06r5pxh8k --- .../account_analytic_analysis/account_analytic_analysis.py | 2 +- addons/crm/res_config_view.xml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index c84b311f307..dff41fd9584 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -465,7 +465,7 @@ class account_analytic_account(osv.osv): def open_sale_order_lines(self,cr,uid,ids,context=None): if context is None: context = {} - sale_ids = self.pool.get('sale.order').search(cr,uid,[('project_id','=',context.get('search_default_project_id',False)),('partner_id','=',context.get('search_default_partner_id',False))]) + sale_ids = self.pool.get('sale.order').search(cr,uid,[('project_id','=',context.get('search_default_project_id',False))]) names = [record.name for record in self.browse(cr, uid, ids, context=context)] name = _('Sale Order Lines of %s') % ','.join(names) return { diff --git a/addons/crm/res_config_view.xml b/addons/crm/res_config_view.xml index 3ab9ac8a32c..56d46140d2f 100644 --- a/addons/crm/res_config_view.xml +++ b/addons/crm/res_config_view.xml @@ -32,12 +32,6 @@ -
-
- -
-
From 91d7b2e168a5c9754e771f058b763357bb1c4a73 Mon Sep 17 00:00:00 2001 From: Hardik Date: Wed, 29 Aug 2012 16:58:40 +0530 Subject: [PATCH 2/2] [IMP]Sale : Contract allowed timesheet, click on the link all timesheet and create a new entry bzr revid: hsa@tinyerp.com-20120829112840-9vw1git194zc68eo --- addons/hr_timesheet/hr_timesheet_view.xml | 6 +++--- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml index d364d605b5f..af6d2114211 100644 --- a/addons/hr_timesheet/hr_timesheet_view.xml +++ b/addons/hr_timesheet/hr_timesheet_view.xml @@ -9,14 +9,14 @@ - + - + - + diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 4cba4a18680..2d59a3779c6 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -129,15 +129,18 @@ class account_analytic_line(osv.osv): def _default_journal(self, cr, uid, context=None): proxy = self.pool.get('hr.employee') record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context) - employee = proxy.browse(cr, uid, record_ids[0], context=context) - return employee.journal_id and employee.journal_id.id or False + if record_ids: + employee = proxy.browse(cr, uid, record_ids[0], context=context) + return employee.journal_id and employee.journal_id.id or False + return False def _default_general_account(self, cr, uid, context=None): proxy = self.pool.get('hr.employee') record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context) - employee = proxy.browse(cr, uid, record_ids[0], context=context) - if employee.product_id and employee.product_id.property_account_income: - return employee.product_id.property_account_income.id + if record_ids: + employee = proxy.browse(cr, uid, record_ids[0], context=context) + if employee.product_id and employee.product_id.property_account_income: + return employee.product_id.property_account_income.id return False _defaults = {