Community mailing list archives

community@mail.odoo.com

Avatar

Re: Back-dated Inventory Adjustments

by
tim
- 04/27/2017 08:54:34
Hi All,

  I also had this problem - especially when moving from one ERP system to the next and you need to run in parallel for some time where the legacy system is the "lead" system. I don't know if this is the right method either, but seemed to work in my limited testing of v9 using "real" inventory valuation:

  1) Make the the existing "date" field of stock.picking visible in stock.view_picking_form so you can set the date
  2) Extend stock.quant's _quant_create() to a) set record_date to picking date (if there is a picking), b) set the "force_period_date" context variable to record_date, and c) write the quant with "in_date" of record_date
  3) Extend move_quant_write() like (a) and (b) above
  4) Extend stock.move's write() method to take the picking_id's date

  Feel free to email me if you'd like my code. 

  Best,

_Tim

--
Timothy Stonis





April 27, 2017 8:10 AM, "Cybrosys Technologies" <techsupport@cybrosys.com> wrote:
 
 
We have gone through such a situation with one of ours client. They must enter their old purchase orders and sale orders into the system.

They created some purchase order with the correct date. But stock valuation and related journal entries are using current date and time.

So we created a small module that adds an extra DateTime field into picking. and overrode some functions to consider the date mentioned in the new field while creating quant and journal entry. If there is any date in the new field, The system will take that date. Otherwise, the system will go with its usual flow.

We hope it is a right method. Let us know if it is not


 
 
On Thu, Apr 27, 2017 at 1:55 PM, aasim ansari <aasim333@gmail.com> wrote:

 
But this is not a practical solution.
For v8 there is a module called stock_move_backdating. For v9 and v10, I don't know if there is any such module available.
Regards.
 
 

--

Aasim Ahmed Ansari

Cell: +91 9619 424 386

 
On Thu, Apr 27, 2017 at 12:50 PM, Jesse Morgan <jmorgan.nz@gmail.com> wrote:
I found a workaround (or hack) to this issue.
It's a bit outside the square - but it works:
1) Make sure everyone is logged out of the system
2) Change the date on the server back to 31/03/2017
3) Create a stock move to fill all the counted stock quants from virtual/inventory loss to stock
4) Validate
5) Change clock back to now
Does exactly what I want. Anyone see any issues?
 
On 27 April 2017 at 14:21, Jesse Morgan <jmorgan.nz@gmail.com> wrote:
Hi there,
We started using Odoo at the beginning of April.
When we started, we made the decision to start with no stock levels loaded; allowing the point of sale module to sell stock into negatives.
The reasoning for this is that the previous system before Odoo was much more manual, and needed to be manually updated with sales records before being closed off, to get the final closing stock to import into Odoo.
We now have the closing stock levels as at March 31st, and I am trying to get them loaded into Odoo.
What I was hoping was that I could do a back-dated inventory adjustment, and date it at March 31.
So if we had qty 10 of a product in stock as at March 31, but we had sold 5 in Odoo during April, - before the inventory adjustment the quantity in Odoo would be -5; but after the adjustment it would be +5
However looking at the code for stock.inventory, it does not seem that any date checks are done at all when looking at quants in the system.
I know you can override the accounting date for a stock adjustment - but you can't override the inventory date.
If I modify the inventory date in the database (as a test), it is effectively ignored; with any created stock moves still having the current date, and including 'minusing out' the CURRENT stock on hand (negative), before adding in the stock on hand as at March 31; effectively nullifying April's moves.
Does anyone else have experience with this situation?
The only thing I can think to do is manually subtract any goods sold in April from the March closing stock using Excel, then do that as an adjusment dated at current date.
Any input much appreciated.
Cheers,
Jesse

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Cybrosys 
www.cybrosys.com
TECHNICAL SUPPORT
Cybrosys Odoo Department
 techsupport@cybrosys.com
 +91 494 3015006 / 07
 +91 8606827707
 cybrosystech
Facebook Twitter LinkedIn Google Plus Pinterest Company
This email and any file transmitted with it are confidential and intended solely for the use of the individual or entity whom they are addressed.If you have received this email in error please notify the system manager. The company accepts no liability for any damage caused by any virus transmitted by this email.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

Reference