From 3f34cd4be4c880cbb112e2b66ba36ea841a6e42a Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 2 Aug 2013 22:25:40 +0200 Subject: [PATCH] [FIX] tests bzr revid: fp@openerp.com-20130802202540-0izq99ki5bbvgu27 --- addons/stock_location/stock_location.py | 1 - .../test/stock_location_pull_flow.yml | 53 ++++++++++--------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 3e7f12cbca0..15e07347e27 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -127,7 +127,6 @@ class procurement_rule(osv.osv): help="If route_id is False, the rule is global"), 'delay': fields.integer('Number of Hours'), 'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."), - #'type_proc': fields.selection([('produce','Produce'),('buy','Buy'),('move','Move')], 'Type of Procurement', required=True), 'partner_address_id': fields.many2one('res.partner', 'Partner Address'), 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), diff --git a/addons/stock_location/test/stock_location_pull_flow.yml b/addons/stock_location/test/stock_location_pull_flow.yml index 0cfeb2379ed..bfdbea394aa 100644 --- a/addons/stock_location/test/stock_location_pull_flow.yml +++ b/addons/stock_location/test/stock_location_pull_flow.yml @@ -1,6 +1,33 @@ - In order to test the stock_location module, I create a product and define its pulled flows. If a product is needed either in Chicago Shop or in Birmingham shop, there must be a incomming move from transit location to these shops, and an outgoing move from Stock to the transit location. - + !record {model: stock.location.route, id: stock_location_route}: + name: 'Route from one company to the other' + pull_ids: + - invoice_state: none + location_id: stock.stock_location_shop0 + location_src_id: stock.stock_location_intermediatelocation0 + name: E001 + picking_type: in + action: move + company_id: stock.res_company_1 + - invoice_state: none + location_id: stock.stock_location_shop1 + location_src_id: stock.stock_location_intermediatelocation0 + name: E002 + picking_type: in + procure_method: make_to_order + action: move + company_id: stock.res_company_2 + - invoice_state: none + location_id: stock.stock_location_intermediatelocation0 + location_src_id: stock.stock_location_stock + name: E003 + action: move + picking_type: out + company_id: base.main_company + +- !record {model: product.product, id: product_product_hpcdwriters01}: list_price: 1000.0 mes_type: fixed @@ -10,31 +37,7 @@ uom_po_id: product.product_uom_unit property_account_expense: account.a_expense property_account_income: account.rev - route_ids: - - name: 'Route from one company to the other' - pull_ids: - - invoice_state: none - location_id: stock.stock_location_shop0 - location_src_id: stock.stock_location_intermediatelocation0 - name: E001 - picking_type: in - type_proc: move - company_id: stock.res_company_1 - - invoice_state: none - location_id: stock.stock_location_shop1 - location_src_id: stock.stock_location_intermediatelocation0 - name: E002 - picking_type: in - procure_method: make_to_order - type_proc: move - company_id: stock.res_company_2 - - invoice_state: none - location_id: stock.stock_location_intermediatelocation0 - location_src_id: stock.stock_location_stock - name: E003 - type_proc: move - picking_type: out - company_id: base.main_company + route_ids: stock_location_route property_stock_inventory: stock.location_inventory property_stock_procurement: stock.location_procurement property_stock_production: stock.location_production