Monday, January 13, 2025
2 changes · saas-18.1
Enhancements to existing features
Odoo now treats product packaging as units and removes unit categories, giving businesses more flexibility to buy, sell, stock, and replenish products in different units. This reduces duplicate setup and makes unit handling more consistent across sales, purchasing, inventory, accounting, POS, and related apps.
Original PR description
*: account, account_edi_ubl_cii, analytic, barcodes_gs1_nomenclature, delivery, event_product, hr_expense, hr_timesheet, l10n_ar, l10n_eg_edi_eta, l10n_es_edi_facturae, l10n_hu_edi, l10n_in,…
*: account, account_edi_ubl_cii, analytic, barcodes_gs1_nomenclature, delivery, event_product, hr_expense, hr_timesheet, l10n_ar, l10n_eg_edi_eta, l10n_es_edi_facturae, l10n_hu_edi, l10n_in, l10n_it_edi, l10n_it_stock_ddt, l10n_mx, l10n_us_account, mrp, mrp_subcontracting, mrp_subcontracting_account, mrp_subcontracting_dropshipping, point_of_sale, pos_discount, pos_loyalty, pos_restaurant, pos_sale, product, product_matrix, project_mrp_account, project_purchase, purchase, purchase_mrp, purchase_requisition, purchase_requisition_stock, purchase_stock, repair, sale, sale_expense, sale_management, sale_mrp, sale_project, sale_purchase, sale_stock, sale_timesheet, sale_timesheet_margin, stock, stock_account, stock_delivery, stock_dropshipping, stock_landed_costs, stock_picking_batch, uom, web, website_sale This commit introduces major changes to units of measurement and product packaging features: ### Removing UoM categories: Previous to this commit, units were classified into categories such as length, weight, etc. If the user defined a base unit for a product, any movement on that product (stock move, order line, etc.) can be only done in a unit in the same category of the base unit of the product. This commit removes unit categories and the previously mentioned enforcement. This is useful for some business cases that need more flexibility (for example: buying from vendors in pieces and selling in kilograms, etc.). To allow for some structure, a new field is added to `uom.uom` model to define a reference unit for any unit. This will be explained further in a later section. ### Merging `product.packaging` model into `uom.uom`: Previous to this commit, users could activate packagings setting to be able to define packagings for specific product. This caused some confusion as there is no intrinsic difference between a packaging and a unit. Another source of confusion is that `stock.move`, `sale.order.line`, `purchase.order.line`, etc. had two different fields for the unit and the packaging. They also had two different fields for the quantity, one based on the unit of the line and the other based on the packaging. This was confusing for some users and there was also some technical complexity to mainatain the consistency between those fields. This commit removes `product.packaging` model completely and all of its related fields. If the user wants to define some packaging, they just need to create a new unit and define its quantity (and optionally its package type). Then, the user can make this packaging usable on some product by adding it to the new many2many field "Packagings" `uom_ids` on `product.template`. Users can also define one (or more) barcode for the packaging of a specific product. ### Cleaning `uom.uom` model: This commit removes some of the unnecessary fields on `uom.uom` model after removing UoM categories. Category, type and color are no longer needed. Ratio and inverse factor are also removed. Factors now are defined a bit differently. Now, each unit can (optionally) have a reference unit (`relative_uom_id`) on which the user-defined factor (`relative_factor`) is based. Since the relative unit can have another relative unit on its own, a hierarchy of units can be made. Therefore, the absolute factor (`factor`) needs to be computed behind the scenes to be used in quantity and conversion calculations. The rounding field is also removed from `uom.uom` model because this introduced some inconsistency with the decimal accuracy record "Product Unit of Measure" defined on the system level. After this commit, all conversions related to UoMs are rounded based on that value. ### Cleaning UoM data: This commit makes some of the data units to be archived by default when the `uom` module is installed, so that the list of units is not cluttered with a lot of units that may not be needed by users. ### Misc. changes: * This commit removes `uom_po_id` field from `product_template` and it should be replaced by the unit of the vendor on making a purchase order. * `qty_multiple` field is removed from `stock.orderpoint` and replaced by `replenishment_uom_id`. The new field works in the same way, the generated replenishment should be in a multiple of the defined unit. * Package types can now have its own routes. Enterprise PR: odoo/enterprise#72206 Upgrade PR: odoo/upgrade#6629 Task-4252043 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo simplifies product units by removing unit categories and folding product packaging into the standard Unit system. This gives businesses more flexibility to buy, sell, stock, and report products in different units while reducing duplicate setup and improving consistency across sales, purchasing, inventory, barcode, accounting, and localization flows.
Original PR description
*: account_3way_match, account_asset, account_budget, account_inter_company_rules, account_intrastat, approvals, approvals_purchase, delivery_easypost, delivery_fedex_rest, documents_project_sale,…
*: account_3way_match, account_asset, account_budget, account_inter_company_rules, account_intrastat, approvals, approvals_purchase, delivery_easypost, delivery_fedex_rest, documents_project_sale, helpdesk_sale_timesheet, helpdesk_timesheet, industry_fsm_sale, l10n_br_edi, l10n_cl_edi_stock, l10n_co_edi, l10n_in_reports_gstr, l10n_ke_edi_oscu, l10n_ke_edi_oscu_stock, l10n_lu_reports, l10n_mx_edi, l10n_mx_edi_extended, l10n_mx_edi_sale, l10n_pe_edi, l10n_pe_reports_stock, l10n_ro_saft, mrp_plm, mrp_workorder, pos_blackbox_be, pos_sale_stock_renting, product_unspsc, project_sale_subscription, quality_control, quality_mrp, sale_planning, sale_purchase_inter_company_rules, sale_purchase_stock_inter_company_rules, sale_renting, sale_stock_renting, sale_subscription, sale_subscription_stock, sale_subscription_timesheet, stock_barcode, stock_barcode_mrp, stock_enterprise, test_sale_subscription, web_studio To adapt to the changes made in odoo/odoo#184131, all the references to product packagings or UoM categories are removed. Also, the packaging unit is shown in barcode app interface in case it's different from the main unit. Upgrade PR: odoo/upgrade#6629 Task-4252043