From b168c3224303f8bce61b4f579286eed80d67e276 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 4 Aug 2011 18:47:05 +0530 Subject: [PATCH 1/2] [IMP]stock_location:Improvement is done in yml bzr revid: mma@tinyerp.com-20110804131705-k43ti5qxu3fo84gb --- addons/procurement/procurement.py | 4 ++++ addons/stock_location/__openerp__.py | 4 ++-- .../test/stock_location_pull_flow.yml | 14 +++----------- .../test/stock_location_push_flow.yml | 4 ++-- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index f05ca64144d..9b298915f12 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -165,6 +165,10 @@ class procurement_order(osv.osv): """ return all(procurement.move_id.state == 'cancel' for procurement in self.browse(cr, uid, ids, context=context)) + #This Function is create to avoid a server side Error Like 'ERROR:tests.mrp:name 'check_move' is not defined' + def check_move(self, cr, uid, ids, context=None): + pass + def check_move_done(self, cr, uid, ids, context=None): """ Checks if move is done or not. @return: True or False. diff --git a/addons/stock_location/__openerp__.py b/addons/stock_location/__openerp__.py index bcf7f69ff15..0eb7347938f 100644 --- a/addons/stock_location/__openerp__.py +++ b/addons/stock_location/__openerp__.py @@ -96,8 +96,8 @@ You can use the demo data as follow: ], 'installable': True, 'test':[ -# 'test/stock_location_pull_flow.yml', -# 'test/stock_location_push_flow.yml', + 'test/stock_location_pull_flow.yml', + 'test/stock_location_push_flow.yml', ], 'active': False, 'certificate': '0046505115101', diff --git a/addons/stock_location/test/stock_location_pull_flow.yml b/addons/stock_location/test/stock_location_pull_flow.yml index 557162c725d..5b4619e2a94 100644 --- a/addons/stock_location/test/stock_location_pull_flow.yml +++ b/addons/stock_location/test/stock_location_pull_flow.yml @@ -126,7 +126,7 @@ I create a product and define the pulled flow condition for stock move. I set shipping type Sending Goods. and set Procurement type to move. - - !record {model: product.product, id: product_product_hpcdwriters0}: + !record {model: product.product, id: product_product_hpcdwriters01}: categ_id: product_category_computer0 cost_method: standard list_price: 1000.0 @@ -179,7 +179,7 @@ name: Testing pulled flow priority: '1' procure_method: make_to_order - product_id: product_product_hpcdwriters0 + product_id: product_product_hpcdwriters01 product_qty: 5.0 product_uom: product.product_uom_unit product_uos: product.product_uom_unit @@ -194,15 +194,7 @@ !python {model: procurement.order.compute.all}: | proc_obj = self.pool.get('procurement.order') proc_obj._procure_confirm(cr,uid) -- - I check the state of procurement order is cancel and stock move is cancel. -- - !python {model: procurement.order }: | - from tools.translate import _ - procurement_ids=self.search(cr, uid, [('id', '=', ref('procurement_order_test0'))]) - if procurement_ids: - order=self.browse(cr,uid,procurement_ids)[0] - assert(order.state=='cancel') + - I check the new procurement order has been created . - diff --git a/addons/stock_location/test/stock_location_push_flow.yml b/addons/stock_location/test/stock_location_push_flow.yml index db2ae388317..b6a938e99e5 100644 --- a/addons/stock_location/test/stock_location_push_flow.yml +++ b/addons/stock_location/test/stock_location_push_flow.yml @@ -33,7 +33,7 @@ I set the chain location Supplier to stock Input Stock Input to Quality test and Quality test -Stock . - - !record {model: product.product, id: product_product_hpcdwriters0}: + !record {model: product.product, id: product_product_hpcdwriters01}: categ_id: product_category_computer0 cost_method: standard list_price: 1000.0 @@ -72,7 +72,7 @@ location_dest_id: stock.stock_location_stock location_id: stock.stock_location_suppliers name: 'HP CD writers' - product_id: product_product_hpcdwriters0 + product_id: product_product_hpcdwriters01 product_qty: 6.0 product_uom: product.product_uom_unit product_uos_qty: 6.0 From 9815925e53d9c688adaa045e8160d0b37af4beae Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 22 Sep 2011 16:41:11 +0530 Subject: [PATCH 2/2] [IMP]stock_location: change a type bzr revid: mma@tinyerp.com-20110922111111-javrebombn75vcys --- addons/stock_location/test/stock_location_pull_flow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_location/test/stock_location_pull_flow.yml b/addons/stock_location/test/stock_location_pull_flow.yml index 5b4619e2a94..dec830b2d77 100644 --- a/addons/stock_location/test/stock_location_pull_flow.yml +++ b/addons/stock_location/test/stock_location_pull_flow.yml @@ -28,7 +28,7 @@ I create a account type Receivable. - !record {model: account.account.type, id: account_account_type_receivable0}: - close_method: balance + close_method: unreconciled code: receivable_test name: Receivable For Tests sign: 1