Merge lp:~openerp-dev/openobject-addons/6.1-opw-584776-han into lp:openobject-addons/6.1

Proposed by Hardik Ansodariya (OpenERP)
Status: Merged
Approved by: Xavier ALT
Approved revision: no longer in the source branch.
Merged at revision: 7169
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-584776-han
Merge into: lp:openobject-addons/6.1
Diff against target: 17 lines (+5/-2)
1 file modified
hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+5/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-584776-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+150495@code.launchpad.net

Description of the change

Hello,

Fixed the issue of periodical billing.

When we created an invoice from an account analytic line. If we use another product with a different taxes, this one isn't set in the invoice.

Steps:

Accounting > Periodical Processing > Billing > Bill Tasks Works

Create Bill Tasks works.

Now create invoice from wizard > select another product than selected in Bill task works.

Taxes of new product will be taken into consideration in created invoice.

This branch fixes the issue.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py'
--- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2011-11-16 14:59:58 +0000
+++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py 2013-02-26 06:28:22 +0000
@@ -124,8 +124,11 @@
124 price = pro_price_obj.price_get(cr,uid,[pl], data.get('product', False) or product_id, qty or 1.0, account.partner_id.id, context=ctx)[pl]124 price = pro_price_obj.price_get(cr,uid,[pl], data.get('product', False) or product_id, qty or 1.0, account.partner_id.id, context=ctx)[pl]
125 else:125 else:
126 price = 0.0126 price = 0.0
127127 product_tax = product_obj.browse(cr, uid, data.get('product', product_id), context=context)
128 taxes = product.taxes_id128 if data.get('product', product_id):
129 taxes = product_tax.taxes_id
130 else:
131 taxes = product.taxes_id
129 tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)132 tax = fiscal_pos_obj.map_tax(cr, uid, account.partner_id.property_account_position, taxes)
130 account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id133 account_id = product.product_tmpl_id.property_account_income.id or product.categ_id.property_account_income_categ.id
131 if not account_id:134 if not account_id: