Invoice tasks creates new tasks to invoice

Bug #948876 reported by Martin Hermann on 2012-03-07
74
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP Publisher's Warranty Team
OpenERP Community Backports (Addons)
Undecided
Unassigned

Bug Description

Server-Version/addon-version: 6.1 and 6.2 trunk

-module: create tasks on SO
-module: bill time on tasks
-Product: Service / supply-mothode: produce

-a project can be created
-create SO
-start tasks and include some time in tasks
-select "invoice tasks work"
-select: force product - select product:Service
-complete invoice

if you check again "invoice tasks work" you can find the sum of work, which was created during the creation of invoice and this is again for invoice.

Related branches

Amit Parik (amit-parik) on 2012-03-07
affects: openobject-server → openobject-addons
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)

Can I ask to please give this bug a higher prio. I can't invoice my timesheets!

Thanks!

Erwin

Amit Parik (amit-parik) wrote :

Hello Erwin,

Thanks for your reply!

It's broken the functionality for that reason I am raising the priority of this bug.

Changed in openobject-addons:
importance: Low → Medium

Is there an estimation when this wil be solved?

Thanks, I need the fix!

Erwin

Hello Erwin and Martin Hermann,

As the task work creates Analytic Line which allows you to creates invoice from Analytic Line.
Now when you are validating the created invoice it will create another costing entry from invoice line by taking analytic account.
So there is no mean to create invoice from this analytic line.The system only restrict when the invoice is linked with a particular analytic line.
This case is a special case where analytic line does not contain invoice link.So the system will always allow you to create invoice.
This entry is considering in a costing entry part so as per my opinion this issue may not consider in a bugs this is wrong configuration issue.

I think this requires more discussion on different experts side.

@experts: Would you please share your opinion on this.

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 1 (openerp-dev-addons1) → OpenERP Publisher's Warranty Team (openerp-opw)
status: Confirmed → New
importance: Medium → Undecided
tags: added: maintenance
Martin Hermann (office-idbb) wrote :

Hi,
the config, i did for this is the same, as in my older version 6.0 and in this older version, the system is not marking the new lines for invoice. I think this is the issue here. the differnece is only, that the field: "Type of invoicing" is then again marked with 100% (in the branch version) and in the old version it is not.

in version 6.0: the tasks creates entries in analytic journal with analytic-journal="Timesheet Journal" and Type-of-Invoicing="Yes 100%". if i select then those lines and go for "Invoice analytic lines" then i can create invoice and the system generates then the SUM in analytic journal with: "Analytic Journal" = SALES and Type-of-invoice="" (--> empty).

in branch version: when you go for "Invoice analytic lines", the system then also creates this new entry but the Type-of-invoice="Yes 100%".

I think that´s the differnce. so my workaround would be to manually go into this line and remove the "Yes 100" from type-of-invoicing....

at the end, i would need to generate invoices based on tasks, which i generated from SO... basically that was fine in 6.0.

br Martin

Hello Martin,

I have checked this complete cycle in both the stable revision : 6.0 & 6.1 but I did not find any different behavior.Both the environment 'Type-of-invoice' did fill with blank value so When you want to create a invoice from analytic line you need to assign this field.

I've made a video of what goes wrong in my opinion. I invoice the timesheet and then the invoice of that timeshjeet is added again to the analitic account. That is wrong. The hours are allready invoiced!

See attachment

Erwin

gde (OpenERP) (gde-openerp) wrote :

When you invoice some time spent on a task , a second analytic line have to be generated to see the profit we made on a task. But this line must not be invoiced.

The problem is not the creation of the second analytic line but the possibility to invoice this second line!

Thans for responding!
Yes you are right. But the line has the status "To be invoiced" and there is nog lock on the line. So in practice this goes wrong. So I assume that you agree that it is a bug.

Erwin

gde (OpenERP) (gde-openerp) wrote :

Exactly, there is a bug. but the bug is not the creation of the second analytic line. the bug is to have the possibility to invoice this second line.

Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress

Hello Erwin and Martin Hermann,

It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-573448-ksa
revision-id: <email address hidden>
revno: 6723

It will be merged in soon.

Thanks.

Changed in openobject-addons:
status: In Progress → Fix Committed
Martin Hermann (proconion) wrote :

Hi,
i did the fix my branch version, but now when i try to generate an invoice from tasks and click "validate", an error message is shown which says:

Error !
You cannot modify an invoiced analytic line!

... therefore it is not possible to generate the invoice.

br martin

Amit Parik (amit-parik) wrote :

Hello Kirti,

You fix created a another major problem for invoice because after applied your patch invoice can not be validated and faced the error msg martin said.

Yes, Martin you are absolutely right . This fix will create the problem

Please follow this steps.
Create the invoice with analytic account and try to vallidate it, You have faced the following message."You cannot modify an invoiced analytic line! " . It 's raised from the _check_inv method from hr_timesheet_invoice.py

@Maintenance team:

This issue faced the trunk too, also this issue reported on 4 times and many users faced it. That's why I request to you when it will fixed for 6.1 please reassign to RD team for back-port for trunk.

Thanks in advance!

Changed in openobject-addons:
status: Fix Committed → Confirmed
importance: Undecided → Medium
Changed in openobject-addons:
status: Confirmed → Fix Committed

Hello,

I have improved the previous fix in branch,
lp:~openerp-dev/openobject-addons/6.1-opw-573448-ksa
Revision 7024, Revision ID: <email address hidden>

Please do let me know if you face any problem.
Kind regards.

I think this issue still persist in trunk, I will propose forward port fix of 6.1
Thanks!

I confirm that it's not fixed even on version 6.1. At less the merge was never made.
It should be important merging the correct patch and fixing it.

Thank you:

Ana

Changed in ocb-addons:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers