Inventory¶
Definitions¶
Double-Entry Inventory Management
See: Introduction to Inventory Management.
A double-entry inventory has no stock input, output or transformation. Instead, all operations are stock moves between locations (possibly virtual). Stock moves represent the transit of goods and materials between locations. The different stock moves are stored in the PostgresSQL table stock_move. The workflow of the stock move is described in Stock Move. The python function odoo_xmlrpc_twisted.functions.create_order() creates the stock moves in the odoo system.
Warehouses
See: What is the difference between warehouses and locations? .
In Odoo, a Warehouse is the actual building/place in which your items are stocked. You can setup multiple warehouses and create moves between warehouses.
A warehouse is a location where you store products. It is either a physical or a virtual warehouse. It could be a store or a repository.
A Location is a specific space within your warehouse. It can be considered as a sublocation of your warehouse, as a shelf, a floor, an aisle, etc. Therefore, a location is part of one warehouse only and it is not possible to link one location to multiple warehouses. You can configure as much locations as you need under one warehouse.
Locations are used to structure storage zones within a warehouse. In addition to internal locations (your warehouse), Odoo has locations for suppliers, customers, inventory loss counter-parts, etc.
There are 3 types of locations:
The Physical Locations are internal locations that are part of the warehouses for which you are the owner. They can be the loading and unloading area of your warehouse, a shelf or a department, etc.
The Partner Locations are spaces within a customer and/or vendor’s warehouse. They work the same way as Physical Locations with the only difference being that you are not the owner of the warehouse.
The Virtual Locations are places that do not exist, but in which products can be placed when they are not physically in an inventory yet (or anymore). They come in handy when you want to place lost products out of your stock (in the Inventory Loss), or when you want to take into account products that are on their way to your warehouse (Procurements).
In Odoo, locations are structured hierarchically. You can structure your locations as a tree, dependent on a parent-child relationship. This gives you more detailed levels of analysis of your stock operations and the organization of your warehouses.
Overall¶
See for overal settings 5. Inventory. By a program like TablePlus, the csv files can be imported in the PostgresSQL database during the setup of a new odoo system. The import musst be done according to the following sequence.
Warehouse Management¶
Warehouse
Change the name of the warehouse id 1 (table “stock_warehouse”) as follows
ID |
Name |
Short Name |
|---|---|---|
1 |
Logistics AG |
LO |
Table res_partner_category
Used by the program python function odoo_xmlrpc_twisted.functions.create_user().
Import the csv file res_partner_category.csv to add the following record.
Name |
active |
|---|---|
Transfer Order Customer |
TRUE |
Table “crm_team”
Import the csv file crm_team.csv to add the following records.
Sales Team |
Alias |
|---|---|
Transfer Order Sales |
Inactive Alias |
Abo Model Sales |
Inactive Alias |
Locations
For the flow of the objects between the different locations see Stock Move.
PostgresSQL table: “stock_location”
csv file:
stock_location.csv
Operations Types
See What is Stock Picking Type and how to edit them?.
The picking type is an operation, if you check the settings of each picking type you can see how that specific operation does. For example, with the warehouse set to 2 steps, the pick takes two actions from the stock and delivers it to the output.
Change the date of the id 2 (table “stock_picking_type”) as follows
ID |
Name |
sequence_code |
default_location_src_id |
default_location_dest_id |
|---|---|---|---|---|
2 |
Delivery Orders |
OUT |
8 |
100 |
Stock Rule
Change the data of the sequence id 2 (table “stock_rule”) as follows
ID |
Name |
default_location_id |
default_location_dest_id |
route_id |
|---|---|---|---|---|
2 |
WH: Stock → Customers |
5 |
100 |
3 |
Products¶
Product Categories
PostgresSQL table: “product_category”
csv file:
product_category.csv
Product Tag (only from Odoo version 16)
PostgresSQL table: “product_tag”
csv file:
product_tag.csv
Product Template and Product
Create the product.template model for the tables “product_template” and “product_product” by usind odooly functionality (see Odooly). Execute the following commands in the odooly shell in several steps:
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Abo Model Fixed Basic', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Abo Model Fixed Minimum', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Abo Model Fixed Maximum', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Error Transit', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Client Transit', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Client Reception', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Client Transitback', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Client Delivery', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Disposal Allocation', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Disposal Transit', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Disposal Delivery', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Sales Allocation', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Sales Transit', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Sales Delivery', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Sales Backward', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 5, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Lending Allocation', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Lending Transit', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Lending Delivery', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Lending Transitback', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Lending Reception', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Lending Backward', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Donation Allocation', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Donation Transit', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
env['product.product'].create({'categ_id': 6, 'detailed_type': 'service', 'type': 'service', 'name': 'Transfer Object Donation Delivery', 'list_price': 1.0, 'sale_ok': True, 'purchase_ok': False, 'active': True})
Product_Tag_Product_Template_Rel (only from Odoo version 16)
PostgresSQL table: “product_tag_product_template_rel”
csv file:
product_tag_product_template_rel.csv
Product Pricelist
Delete the default pricelist with id = 1. Then import the following pricelist:
PostgresSQL table: “product_pricelist”
csv file:
product_pricelist.csv
Product Pricelist Item
PostgresSQL table: “product_pricelist_item”
csv file:
product_pricelist_item.csv