From 3f63e5c22a58a720f47da284dec8cfd43cb4259a Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 10 Apr 2007 13:36:10 +0000 Subject: [PATCH] HR_TIMESHEET_INVOICE: fix wizard for new analytic account on invoice line bzr revid: mga@tinyerp.com-a1d39ebaaa14788370d01578b459d5032fd01f35 --- .../wizard/hr_timesheet_final_invoice_create.py | 1 + .../hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py index 923e6ef7d8a..1d8f6a8cd0d 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py @@ -108,6 +108,7 @@ class final_invoice_create(wizard.interface): 'product_id': product_id, 'uos_id': product.uom_id.id, 'account_id': account_id[0], + 'account_analytic_id': account.id, } amount_total += round((price * ( 1.0 - (factor.factor or 0.0)/100.0)), 2) * qty diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py index 51d4961d6fa..0ea4a43e153 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -63,7 +63,6 @@ class invoice_create(wizard.interface): 'payment_term': (partner.property_payment_term and partner.property_payment_term[0]) or False, 'account_id': partner.property_account_receivable[0], 'currency_id': account.pricelist_id.currency_id.id, - #'project_id': account.id } last_invoice = pool.get('account.invoice').create(cr, uid, curr_invoice) invoices.append(last_invoice) @@ -109,6 +108,7 @@ class invoice_create(wizard.interface): 'invoice_line_tax_id': [(6,0,tax)], 'uos_id': product.uom_id.id, 'account_id': account_id[0], + 'account_analytic_id': account.id, } #