Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to automatically create additionnal account move lines to a stock move?

By
Pascal Tremblay
on 9/28/16, 6:21 PM 277 views

hello there,

We are on a problem since many days.

We are in a "real-time (automated)" stock management for all our products.

We have set a virtual location with location name = "gift to customer" and location type = Inventory.

Stock valuation account (incoming and outgoing) for this location is set to the charge account "5.2.200.3 - gift to customer"

So, when we make an internal transfert from "stock" location to "gift to customer" location, we get this journal entry :

    114006 - stock valuation : 100 (CT)

    5.2.200.3 - gift to customer : 100 (DT)


But it is not enough for us. This internal transfert should bring these journal entry :

    114006 - stock valuation : 100 (CT)

    5.2.200.3 - gift to customer : 100 (DT)

    114004 - stock output : 100 (DT)

    411000 - Inside Sales (CT)


Questions

How to add lines automatically to an account move already created by a stock move?

How could we proceed to manage this?

Should we use an existing module? Which module?

Should we create our own module?


Could you please help

Thanks!


EDIT #1

An other way to make what we want should be this way...

Actually, we could make a delivery order. Journal items created by this stock move would be :

    114006 - stock valuation : 100 (CT)

    114004 - stock output : 100 (DT)
 

But it is not enough for us. This delivery order should bring these journal entry. The result should be exactly the same than above :

    114006 - stock valuation : 100 (CT)

    114004 - stock output : 100 (DT)

    5.2.200.3 - gift to customer : 100 (DT)

    411000 - Inside Sales (CT)


0

Pascal Tremblay

--Pascal Tremblay--
1312
| 5 2 7
Alma, Canada
--Pascal Tremblay--


Pascal Tremblay
On 9/30/16, 1:53 PM

Here is our solution.

We have created a new module who override the existing stock_account module.

Two new fields are created on the virtual location of type "inventory".

These two new fields contain a debit and a credit account.

The new module add two lines in the account move associated to an internal transfert.

OUr code : https://github.com/lapagept/odoo-8/tree/master/virtual_location_inventory_account_move_lapagept

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/28/16, 6:21 PM
Seen: 277 times
Last updated: 9/30/16, 1:53 PM