Merge lp:~openerp-dev/openobject-addons/6.1-opw-51238-rgo into lp:openobject-addons/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-51238-rgo
Merge into: lp:openobject-addons/6.1
Diff against target: 23 lines (+2/-1)
1 file modified
hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-51238-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+144887@code.launchpad.net

Description of the change

Hello,

This fix has been forward ported from lp:~openerp-dev/openobject-addons/6.0-opw-51238-skh

Scenario:
Create two service type products, prestations, régie.
1. Select the timesheet tab on the Employee "Admin" form and select the product "prestations" , which has't got any taxes
2. Give the taxes on the Product "régie" (basic taxes for sales and purchase)
3. The user "Admin" do a sign in and a sign out from the " Human Resources/Attendances/Sign in / Sign out by project".

When you run the wizard for Billing Data from "Accounting/Periodical Processing/Billing/Bill Tasks Works", it creates a invoice for the product, which you provided on the Wizard form. but, invoice has no taxes for the product "régie".

This branch fixes this issue, kindly review the branch.

Thanks.

To post a comment you must log in.

Unmerged revisions

7134. By Ravi Gohil (OpenERP)

[FIX] hr_timesheet_invoice: Invoice line product did not have taxes given by the wizard. (Maintenance Case: 51238)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py'
2--- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2011-11-16 14:59:58 +0000
3+++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2013-01-25 10:26:28 +0000
4@@ -113,9 +113,11 @@
5 factor_name = product.name+' - '+factor.customer_name
6 else:
7 factor_name = product.name
8+ taxes = product.taxes_id
9 else:
10 data['product'] = data['product'][0]
11 factor_name = product_obj.name_get(cr, uid, [data['product']], context=context)[0][1]
12+ taxes = product_obj.browse(cr,uid,data['product'],context).taxes_id
13
14 ctx = context.copy()
15 ctx.update({'uom':uom})
16@@ -125,7 +127,6 @@
17 else:
18 price = 0.0
19
20- taxes = product.taxes_id
21 tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
22 account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
23 if not account_id: