From 93e46a396e8ceab846144abe315fd43dbd422eaf Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 1 Nov 2010 15:07:14 +0530 Subject: [PATCH 1/4] [FIX] Account: Analytic onchange amount unit bzr revid: mra@mra-laptop-20101101093714-0u4wihexr4ef3eon --- addons/account/account_analytic_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 7f1f354c21f..01bcc1515e1 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -73,7 +73,7 @@ class account_analytic_line(osv.osv): context={} if not journal_id: j_ids = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=','purchase')]) - j_id = j_ids and j_ids[0] or False + journal_id = j_ids and j_ids[0] or False if not journal_id or not prod_id: return {} product_obj = self.pool.get('product.product') From 057c282cfbd5be50401c9f74b0a4a88315a3c0cf Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 1 Nov 2010 15:12:59 +0530 Subject: [PATCH 2/4] [FIX] Account: Analytic onchange amount unit => TypeError: int argument required bzr revid: mra@mra-laptop-20101101094259-6h3izyiknl86jmnd --- addons/account/account_analytic_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 01bcc1515e1..497b7cdc8ae 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -113,7 +113,7 @@ class account_analytic_line(osv.osv): if True: flag = False # Compute based on pricetype - product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context) + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context) pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] if journal_id: journal = analytic_journal_obj.browse(cr, uid, journal_id) From 0942c399131d6974a2ca57d1357d4dbb537703ac Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 1 Nov 2010 16:25:16 +0530 Subject: [PATCH 3/4] [FIX] Account_voucher: View opening bzr revid: mra@mra-laptop-20101101105516-hvl14zlyyh9850bo --- addons/account_voucher/account_voucher.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index a4d216f77b4..c9422a964b5 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -115,14 +115,22 @@ class account_voucher(osv.osv): return [(r['id'], (str("%.2f" % r['amount']) or '')) for r in self.read(cr, uid, ids, ['amount'], context, load='_classic_write')] def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): - if not view_id: - mod_obj = self.pool.get('ir.model.data') - if context.get('invoice_type', False) in ('out_invoice', 'out_refund') or context.get('line_type', False) == 'customer': + mod_obj = self.pool.get('ir.model.data') + if not view_id and context.get('invoice_type', False): + if context.get('invoice_type', False) in ('out_invoice', 'out_refund'): result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form') else: result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form') result = result and result[1] or False view_id = result + if not view_id and context.get('line_type', False): + if context.get('line_type', False) == 'customer': + result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form') + else: + result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form') + result = result and result[1] or False + view_id = result + res = super(account_voucher, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu) doc = etree.XML(res['arch']) nodes = doc.xpath("//field[@name='partner_id']") From b75fea7e85aebc8e70a75966ac33882a46288bae Mon Sep 17 00:00:00 2001 From: "PSO(OpenERP)" <> Date: Mon, 1 Nov 2010 17:54:37 +0530 Subject: [PATCH 4/4] [FIX] hr_timesheet_sheet: client side error while creating new timesheet line lp bug: https://launchpad.net/bugs/664955 fixed bzr revid: mra@mra-laptop-20101101122437-kkq2wqe3sebb8ebu --- addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 69a73747334..644db3a8ce0 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -53,6 +53,7 @@ + @@ -67,7 +68,7 @@