On Tuesday, September 26, 2017 at 3:29:22 PM UTC+5, Sergi Almacellas Abellana 
wrote:
> El 26/09/17 a les 11:25, Khurram Shahzad ha escrit:
> > 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?
> 
> 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.

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.


> 
> Hope it helps.
> 
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/39ce3086-85e3-480c-93a1-5440c80654c6%40googlegroups.com.

Reply via email to