hr_timesheet_invoice: Created invoice from bill task work ignore the default taxes.

Bug #1048305 reported by Stéphane Bidoul (Acsone)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

Hello,

When running "invoice task work", the generate invoice has no taxes if the product "Services on Timesheets" (6.1) or "Service on Demand" (trunk) has no taxes defined on it (which is the default). In such a situation the default taxes from the sales account should be proposed.

This applies to 6.1 and trunk.

How to reproduce:
1. install module hr_timesheet_invoice
2. create a project with to_invoice = Yes and set a customer on the analytic account
3. create a timesheet line for that project
4. run invoice task work -> the generated invoice has no tax

This is because in hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py, the taxes are taken from the product only.

The correct behaviour is found in account/account_invoice.py in product_id_change where it uses the taxes from the sales account if no taxes are defined on the product.

Best regards,

-sbi

Related branches

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I invalidate this bug as it's not the way tax selection are defined in OpenERP.
The correct behaviour is to take from the product whenever the product is used.
If there is not tax on the product, there is no tax to apply.

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

Hi Fabien,

I must have missing something here. May I reopen to discuss?

Actually, I understand that picking the taxes from the general account when there are no taxes on the product is the current behaviour when creating an invoice manually. See http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/account_invoice.py#L1438 ; so my patche simply does the same when creating invoices in Bill Task Work.

The other thing is a multi-company scenario, when you have the same user/employee entering timesheets for projects of company A and company B. There is only one product associated to the employee for its timesheets. Now, on the product, the general accounts to use are defined as properties, so the correct account is selected depending on the company. The taxes however are not defined as properties, so how can we obtain the correct tax in such situation?

Thanks for your attention,

-sbi

Changed in openobject-addons:
status: Invalid → New
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Stephane,

I have checked your issue, If you assigned the sales tax on your product then you can see this taxes on invoice created from "Bill Invoice Task". And its working fine.

So would you please check it and notify us.

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

Hello Amit,

Indeed when the tax is set on the product it works.

However, when you create an invoice manually and select a product without taxes, the default tax from the account is proposed.

I believe the same behaviour is desirable in Bill Tasks Work because the tax field on product is not a property hence not multi-company aware.

If you try for instance to set a tax on the "Services On Timesheet" product, you can't get the correct tax when running Bill Tasks Work for projects of different companies.

Best regards,

-sbi

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Stephane,

Thanks for your quick reply.

Now I faced the same problem.

Thank you!

summary: - hr_timesheet_invoice: bill task work generates invoice without taxes
+ hr_timesheet_invoice: bill task work ingnor the defauklt taxes on
+ invocie
summary: - hr_timesheet_invoice: bill task work ingnor the defauklt taxes on
- invocie
+ hr_timesheet_invoice: Created invoice form bill task work ignore the
+ default taxes.
summary: - hr_timesheet_invoice: Created invoice form bill task work ignore the
+ hr_timesheet_invoice: Created invoice from bill task work ignore the
default taxes.
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

The fix plus a comprehensive regression test have landed in trunk addons at rev. 7896
rev-id: <email address hidden>, courtesy of Stephane Bidoul during our community test sprint! :-)

Changed in openobject-addons:
milestone: none → 7.0
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.