From 30f27b8cbb09be031fcea6f1e4850ba16633e752 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 9 Sep 2013 13:55:15 +0200 Subject: [PATCH] [IMP] Move route_ids from product from stock_location to stock and remove supply_method (change with route) bzr revid: jco@openerp.com-20130909115515-7z6ixaxe7bpxxe73 --- .../hr_expense/hr_expense_installer_view.xml | 2 +- addons/mrp/mrp.py | 11 +- addons/mrp/mrp_data.xml | 16 +++ addons/mrp/mrp_view.xml | 23 +--- addons/mrp/procurement.py | 7 +- addons/mrp/stock.py | 100 +++++++++--------- addons/multi_company/multi_company_demo.xml | 1 - addons/product_expiry/product_expiry_demo.xml | 4 - addons/project_mrp/project_mrp_view.xml | 10 -- .../worktask_entry_to_timesheetline_entry.yml | 1 - addons/purchase/purchase.py | 5 +- addons/purchase/purchase_data.xml | 10 +- addons/purchase/purchase_view.xml | 12 --- .../purchase/test/process/run_scheduler.yml | 20 ++-- .../purchase_requisition_view.xml | 2 +- addons/sale/sale.py | 12 ++- addons/sale/sale_demo.xml | 1 - addons/sale_mrp/sale_mrp.py | 4 +- addons/sale_mrp/test/sale_mrp.yml | 13 ++- addons/sale_stock/sale_stock.py | 11 ++ .../sale_stock_location_view.xml | 2 +- addons/stock/procurement.py | 36 +++++-- addons/stock/procurement_demo.xml | 19 ---- addons/stock/product.py | 2 + addons/stock/stock.py | 33 ++++-- addons/stock/stock_data.xml | 21 +++- addons/stock/stock_view.xml | 27 ++++- .../stock_complex_routes.xml | 1 + addons/stock_location/stock_location.py | 24 +---- addons/stock_location/stock_location_data.xml | 92 ++++++++-------- addons/stock_location/stock_location_view.xml | 34 +++--- .../test/stock_location_push_flow.yml | 1 - addons/stock_multi_warehouse/__openerp__.py | 4 +- .../stock_multi_warehouse.yml | 10 +- 34 files changed, 297 insertions(+), 274 deletions(-) diff --git a/addons/hr_expense/hr_expense_installer_view.xml b/addons/hr_expense/hr_expense_installer_view.xml index b897673f4ec..e5187650e1c 100644 --- a/addons/hr_expense/hr_expense_installer_view.xml +++ b/addons/hr_expense/hr_expense_installer_view.xml @@ -27,7 +27,7 @@ product.product form tree,form - + [('hr_expense_ok','=',True)] Define one product for each expense type allowed for an employee (travel by car, hostel, restaurant, etc). If you reimburse the employees at a fixed rate, set a cost and a unit of measure on the product. If you reimburse based on real costs, set the cost at 0.00. The user will set the real price when recording his expense sheet. diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 15d034e0010..363981209d6 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -187,7 +187,7 @@ class mrp_bom(osv.osv): result[bom.id] = [] if bom.bom_lines: continue - ok = ((name=='child_complete_ids') and (bom.product_id.supply_method=='produce')) + ok = ((name=='child_complete_ids')) if (bom.type=='phantom' or ok): sids = bom_obj.search(cr, uid, [('bom_id','=',False),('product_id','=',bom.product_id.id)]) if sids: @@ -209,11 +209,10 @@ class mrp_bom(osv.osv): continue if line.bom_lines or line.type == 'phantom': continue - if line.product_id.supply_method == 'produce': - if line.product_id.procure_method == 'make_to_stock': - res[line.id] = 'stock' - else: - res[line.id] = 'order' + if line.product_id.procure_method == 'make_to_stock': + res[line.id] = 'stock' + else: + res[line.id] = 'order' return res _columns = { diff --git a/addons/mrp/mrp_data.xml b/addons/mrp/mrp_data.xml index a6b65b7c475..42290edde38 100644 --- a/addons/mrp/mrp_data.xml +++ b/addons/mrp/mrp_data.xml @@ -27,5 +27,21 @@ This application supports complete integration and production scheduling for sto 1 + + + + Manufacture + 5 + + + + Manufacture to stock + manufacture + + + + diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 583669277e2..0e47396cfbd 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -347,7 +347,7 @@
- +