This question has been flagged

In Odoo 12, 13 or 14 (I don't know about the older versions), how can I get an Inventory report for a specific date? Odoo makes it possible only for the current report, but when a past date is selected, Odoo removes the possibility to group by location, WHYYYYYYY?????

It is even worse in Inventory Valuation, where you don't have this choice (group by location) at all!!!!!!!!

Please, anyone knows how to solve this?


Avatar
Discard

Hello Talal, did you get the solution to this?

I'm also looking for a solution to this problem. I'd rather an odoo solution as opposed to a third party app

Best Answer

In Odoo, you can use the "Stock Inventory" module to get a by-location inventory report, which will show both the quantity and value of the products in each location. Here are the steps you can follow to generate a by-location inventory report:


Go to the "Inventory" app in Odoo and select the "Inventories" menu option.

Click on the "Create" button to create a new inventory.

Select the locations for which you want to generate the report and set the appropriate date for the inventory.

In the "Inventory lines" tab, you will see a list of all the products in the selected locations, along with their current quantities and values.

You can filter the products by location by using the dropdown on the top right corner of the inventory lines tab.

Once you have the inventory, you can also export it in a variety of formats, like Excel, PDF, or CSV.

Alternatively, you can also use the stock.inventory.line model to filter by location and get the same data through a programmatic way.


Copy code

from odoo import api, fields, models


class StockInventoryLine(models.Model):

    _inherit = 'stock.inventory.line'


    location_id = fields.Many2one('stock.location', 'Location')


    @api.model

    def get_location_inventory(self, location_id):

        inventory_lines = self.search([('location_id', '=', location_id)])

        return inventory_lines

You can use the above method to get the inventory data of a specific location by passing the location's id to it.


Please note that these are basic examples and you may need to adapt them to your specific use case and add additional error handling and security measures as needed

Avatar
Discard

Muhammad,
I Iooked for the inventory stock module but couldn't find it. I'm using Odoo version 14. Is that why I can't find it?

Best Answer

Hi Tatal Albahra,

please check below apps link which helps you to find the stock valuation with location and without location as well.

https://apps.odoo.com/apps/modules/12.0/eq_inventory_valuation_report

For any questions or queries please contact us over skype "equickerp". 

Thanks.

Avatar
Discard