Setting Opening Inventory for the warehouse

83 views
Skip to first unread message

Khurram Shahzad

unread,
Sep 26, 2017, 6:10:08 AM9/26/17
to try...@googlegroups.com
Dear All,

Our purchases and stocks were managed manually before installation of Tryton (GNU Health).
After installation of GNU Health, now we want to set up the opening inventory for the warehouse. Can anybody please guide me on how to set the opening inventory for a warehouse using Tryton?


--
 
Regards,
Khurram.

Sergi Almacellas Abellana

unread,
Sep 26, 2017, 6:29:22 AM9/26/17
to try...@googlegroups.com
El 26/09/17 a les 11:25, Khurram Shahzad ha escrit:
You may enter an Inventory (from Invetories & Stock -> Inventories menú)
that for each storage location specified the list of product with their
real quantities. Once the inventory is confirmed the needed moves are
created to reflect the stock quantities.

This has a drawback as only the quantity is defined on inventory but not
the unit_price (which is specially relevant when using a non fixed
cost_price). Here is a recent issue that improved the situation:

https://bugs.tryton.org/issue6764

Which is only available on tryton trunk.

Hope it helps.

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Khurram Shahzad

unread,
Jan 11, 2018, 3:50:07 AM1/11/18
to tryton
I could not find update for this issue on trunk (https://github.com/tryton/stock/blob/develop/inventory.py).

So, I updated the inventory.py to input unit_price and updated get_move() method of stock.inventory.line as following:

origin=self,
+unit_price = unit_price,
+cost_price = unit_price,

Now, when I confirm inventory after this update, the Account Move is fine and it is using the passed cost_price, but the product's cost_price (cost method is Average) is not updated.

To resolve this issue, I updated following method of stock.move class in move.py file and added 'lost_found' location type:

def _do(self):
if (self.from_location.type in ('supplier', 'production', 'lost_found')

Now the average cost price of the product is updated but it is not correctly calculated.

Kindly guide me where to get the latest code for resolving this issue, if it is fixed or kindly help me writing the code to resolve this issue.

Cédric Krier

unread,
Jan 11, 2018, 4:05:07 AM1/11/18
to tryton
Indeed making an inventory for the initial stock was a wrong advise.
The proper way is to create moves from supplier to the warehouse
location for each product with the initial quantity and a proper unit
price.

The question was raised at the TUL2017 and here is the answer:
https://youtu.be/Gw6kAXkOmMg?list=PL4ydsflJkP9XSsx1wAjke3EjF6setZoGY&t=3988

PS: The sound was not very good on the first day.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Cédric Krier

unread,
Jan 11, 2018, 5:00:07 AM1/11/18
to tryton
On 2018-01-11 10:01, Cédric Krier wrote:
> Indeed making an inventory for the initial stock was a wrong advise.
> The proper way is to create moves from supplier to the warehouse
> location for each product with the initial quantity and a proper unit
> price.

And we have added a warning about that in the documentation:
http://doc.tryton.org/4.6/modules/stock/doc/index.html#inventory

Khurram Shahzad

unread,
Jan 11, 2018, 5:35:07 AM1/11/18
to tryton
How can we create moves from supplier to the warehouse?

Cédric Krier

unread,
Jan 11, 2018, 6:10:05 AM1/11/18
to tryton
On 2018-01-11 02:11, Khurram Shahzad wrote:
> How can we create moves from supplier to the warehouse?

As Stock Administrator under the "Inventory & Stock>Moves" menu.

Khurram Shahzad

unread,
Jan 11, 2018, 7:15:07 AM1/11/18
to try...@googlegroups.com
On Thu, Jan 11, 2018 at 4:06 PM, Cédric Krier <cedric...@b2ck.com> wrote:
On 2018-01-11 02:11, Khurram Shahzad wrote:
> How can we create moves from supplier to the warehouse?

As Stock Administrator under the "Inventory & Stock>Moves" menu.

I am able to save new Stock Move, but it always remains in 'draft' state. The only button available on the form is 'Cancel'. There is no 'Receive' or 'Done' button as appearing in Shipment form. I have given 'Stock Administration' access to the user. Is there some other configuration to make the 'Done' button visible?
--
 
Regards,
Khurram.

Cédric Krier

unread,
Jan 11, 2018, 7:30:06 AM1/11/18
to try...@googlegroups.com
The "Do" button was added by https://bugs.tryton.org/issue5042
Reply all
Reply to author
Forward
0 new messages