-
- Downloads
[CLEAN] stock: pre-migration cleaning
General remarks concerning cleaning commits preparing the stock migration ========================================================================= Small update / cleaning before moving and migrating. This commit contains the cleaning of stock_picking_type and stock_picking models. The first cleaning performed is to clean methods having a browse record or a list of records replacing ids parameter. Those are converted into classic old API methods using cr, uid, ids. This eases the migration as they are then migrated into multi methods. Another cleaning concerns naming things. Some methods are renamed to ease the code readability. Some parameters are also renamed as well as some variables. This kind of change is performed only when the readability is improved. Otherwise the code is kept as it is to avoid rewriting too much of the code. Finally unnecessary stuff is also removed. This concerns dead code (methods not used in community nor in enterprise) and unnecessary code splitting (tools methods called once without real added value are directly put into their called method). - stock.move: no specific changes; note that a method called only in mrp has been moved to mrp. - product: no specific changes - config settings: no specific changes - wizards: no specific changes stock.quant main changes ======================== - ``apply_removal_strategy`` method updated to return only the removal strategy instead of having a mix of several things (overrides updated) - ``quants_get_**`` methods renamed to ease code understanding - quants_unreserve from stock.quant to stock.move model because its primary record is a move, not quants stock.inventory and stock.inventory.line main changes ===================================================== - stock.inventory: ``move_ids_exist`` field remove. Unused. stock.picking and stock.picking.type main changes ================================================= - stock.picking: ``move_lines_related`` is removed. Indeed it is used only to display a slightly different view of moves contained inside a picking. However this field causes a lot of issues when migrated into the new API. The view is updated to keep the same look and feel while avoiding an unnecessary field. - stock.picking.type: complete_name field is removed. Using display_name is sufficient for the existing use cases. stock.warehouse and stock.orderpoint main changes ================================================= - stock.warehouse: removed ``resupply_from_wh``, unused field stock.pack.operation main changes ================================= - stock.pack.operation: ``processed_boolean`` fields renamed to ``is_done`` to match its use in the code. stock.location main changes =========================== Note that in this commit a strange override in create has been replaced by a cleaner override in default_get in order to have something more understandable procurement main changes ======================== - in this commit some code located in procurement has been moved to the orderpoint model. Indeed those methods take an orderpoint as main argument, making it more orderpoint methods than procurement methods - ``_prepare_orderpoint_procurement`` method has been merged with its strange override in stock_calendar to have something a bit more modular
Showing
- addons/mrp/mrp.py 3 additions, 3 deletionsaddons/mrp/mrp.py
- addons/mrp/procurement.py 6 additions, 4 deletionsaddons/mrp/procurement.py
- addons/mrp/stock.py 30 additions, 9 deletionsaddons/mrp/stock.py
- addons/procurement/procurement.py 10 additions, 16 deletionsaddons/procurement/procurement.py
- addons/product_expiry/models/stock_quant.py 3 additions, 3 deletionsaddons/product_expiry/models/stock_quant.py
- addons/purchase/purchase.py 12 additions, 11 deletionsaddons/purchase/purchase.py
- addons/purchase/stock.py 22 additions, 16 deletionsaddons/purchase/stock.py
- addons/sale_mrp/sale_mrp.py 5 additions, 5 deletionsaddons/sale_mrp/sale_mrp.py
- addons/sale_stock/sale_stock.py 3 additions, 3 deletionsaddons/sale_stock/sale_stock.py
- addons/sale_timesheet/models/sale_service.py 10 additions, 7 deletionsaddons/sale_timesheet/models/sale_service.py
- addons/stock/procurement.py 99 additions, 228 deletionsaddons/stock/procurement.py
- addons/stock/product.py 2 additions, 13 deletionsaddons/stock/product.py
- addons/stock/res_config.py 0 additions, 9 deletionsaddons/stock/res_config.py
- addons/stock/stock.py 426 additions, 461 deletionsaddons/stock/stock.py
- addons/stock/stock_dashboard.xml 0 additions, 1 deletionaddons/stock/stock_dashboard.xml
- addons/stock/stock_view.xml 6 additions, 7 deletionsaddons/stock/stock_view.xml
- addons/stock/wizard/stock_immediate_transfer.py 1 addition, 1 deletionaddons/stock/wizard/stock_immediate_transfer.py
- addons/stock/wizard/stock_immediate_transfer.xml 2 additions, 2 deletionsaddons/stock/wizard/stock_immediate_transfer.xml
- addons/stock_account/stock_account.py 13 additions, 11 deletionsaddons/stock_account/stock_account.py
- addons/stock_calendar/procurement.py 25 additions, 132 deletionsaddons/stock_calendar/procurement.py
Loading
Please register or sign in to comment