← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 711737] Re: [V6.0.1 & V5.0.15] account_analytic_analysis: last_invoice_date field does not include manual invoices

 

Hello Mustufa,

Thanks for your answer.

Let me add some comments because I think it should be reopen...

Regarding the "Date of Last cost/work", it is not the good one for
seeing the manual invoice date, because this date is refreshed each time
a new analytic entry is created (you bill today, and if tomorrow someone
posts time on the timesheet/task, the date of tomorrow will appear in
that  "Date of Last cost/work").

The field last_invoice_date is fundamental for a project manager, because he can see quickly if the project has been invoiced for a while.  
So my opinion is that two options are here:
 - changing the code to include also manual invoice, 
 - changing the text decription and help of that field to explain it takes not all the invoice but only the ones created from automatic cost billing.

Regards,

Bernard

** Changed in: openobject-addons
       Status: Invalid => New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/711737

Title:
  [V6.0.1 & V5.0.15] account_analytic_analysis: last_invoice_date field
  does not include manual invoices

Status in OpenERP Modules (addons):
  New

Bug description:
  Hello,

  When installing module account_analytic_analysis, it provides a new
  tab in the analytic account form with many informations about the
  account (mainly used in services companies).

  Amongst all the fields, you find these two fields with the following
  help text:

  1. Date of last invoiced cost (last_worked_invoiced_date): "If invoice
  from the costs, this is the date of the latest work or cost that have
  been invoiced". This means this date is refreshed each time you create
  an invoice from the automatic billing (action button) and it works
  fine.

  2. Last invoice date (last_invoice_date): "Date of the last invoice created for this analytic account". This means you should see the latest invoice date, the invoice coming from the automatic billing or the invoice having been made manually. Here is the issue: you never see manual invoices date in that field ! 
  So this field brings nothing different than the "Date of last invoiced cost"
   
  I had a look on the code and see where is the issue:

  In the cr.execute that feeds last_invoice_date, it mentions "AND
  account_analytic_line.invoice_id IS NOT NULL". As only automatic
  billing feeds the field invoice_id, it can't read the manual invoices
  put on the analytic account...

  I see two ways to fix that issue:
  - Feeding automatically account_analytic_line.invoice_id also when a manual invoice is done.
  - Changing the SQL in the cr.execute to include also a search on account_invoice_line using current analytic account (probably the worst solution in terms of system performance)

  In both cases there should be a check on parent account_invoice
  record, in order to see if the invoice type is "out_invoice" so we are
  sure it is only billing to the client.

  I think this change will be very useful as many service companies are not always using automatic billing, but are using manual invoices: 
  - no pure time & materials contracts, so you can't charge all of the costs automatically 
  - when using several accounts for the different phases on a huge project, they want to be able to provide periodically invoices on all phases in one invoice document (using the automatic billing generates one invoice per analytic account).

  I hope it helps.

  Regards,

  Bernard





References