cucumber-openerpscenario 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/cucumber-openerp.gemspec +1 -1
- data/cucumber-openerpscenario-0.1.0.gem +0 -0
- data/lib/cucumber/lib/ERPConnector.rb +0 -13
- data/lib/cucumber/lib/utils/sequel_utils.rb +1 -1
- data/lib/cucumber/openerp/world.rb +20 -20
- metadata +1 -16
- data/lib/cucumber/lib/Helpers/AccountBankStatement.rb +0 -156
- data/lib/cucumber/lib/Helpers/AccountInvoice.rb +0 -122
- data/lib/cucumber/lib/Helpers/AccountTax.rb +0 -85
- data/lib/cucumber/lib/Helpers/AccountVoucher.rb +0 -51
- data/lib/cucumber/lib/Helpers/IrModuleModule.rb +0 -228
- data/lib/cucumber/lib/Helpers/ModuleQualityCheck.rb +0 -93
- data/lib/cucumber/lib/Helpers/Ooor.rb +0 -41
- data/lib/cucumber/lib/Helpers/ProductProduct.rb +0 -126
- data/lib/cucumber/lib/Helpers/PurchaseOrder.rb +0 -53
- data/lib/cucumber/lib/Helpers/ResCurrency.rb +0 -49
- data/lib/cucumber/lib/Helpers/ResPartner.rb +0 -89
- data/lib/cucumber/lib/Helpers/ResUsers.rb +0 -121
- data/lib/cucumber/lib/Helpers/SaleOrder.rb +0 -76
- data/lib/cucumber/lib/Helpers/SaleOrderLine.rb +0 -72
- data/lib/cucumber/lib/Helpers/StockPicking.rb +0 -49
@@ -1,49 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#################################################################################
|
3
|
-
# #
|
4
|
-
# OERPScenario, OpenERP Functional Tests #
|
5
|
-
# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com> #
|
6
|
-
# #
|
7
|
-
# This program is free software: you can redistribute it and/or modify #
|
8
|
-
# it under the terms of the GNU General Public License as published by #
|
9
|
-
# the Free Software Foundation, either version 3 Afero of the License, or #
|
10
|
-
# (at your option) any later version. #
|
11
|
-
# #
|
12
|
-
# This program is distributed in the hope that it will be useful, #
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
15
|
-
# GNU General Public License for more details. #
|
16
|
-
# #
|
17
|
-
# You should have received a copy of the GNU General Public License #
|
18
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
19
|
-
# #
|
20
|
-
#################################################################################
|
21
|
-
require 'pp'
|
22
|
-
require 'rubygems'
|
23
|
-
require 'ooor'
|
24
|
-
|
25
|
-
begin
|
26
|
-
if Object.const_defined? 'StockPicking'
|
27
|
-
StockPicking.class_eval do
|
28
|
-
$utils.log.debug("Extending #{self.class} #{self.name}")
|
29
|
-
# Add useful methode on stock picking handling
|
30
|
-
|
31
|
-
def self.to_ary
|
32
|
-
return [name]
|
33
|
-
end
|
34
|
-
|
35
|
-
def validate_picking()
|
36
|
-
res = {'delivery_date' => (DateTime.now).strftime(fmt="%Y-%m-%d %H:%M:%S")}
|
37
|
-
stock_moves = move_lines
|
38
|
-
stock_moves.each do |move_line|
|
39
|
-
res["move#{move_line.id}"] = {'prodlot_id' => move_line.prodlot_id && move_line.prodlot_id.id || false, 'product_id' => move_line.product_id.id, 'product_uom' => move_line.product_uom.id, 'product_qty' => move_line.product_qty}
|
40
|
-
end
|
41
|
-
StockPicking.do_partial([id], res)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
else
|
45
|
-
$utils.log.debug("StockPicking helper not initialized")
|
46
|
-
end
|
47
|
-
rescue Exception => e
|
48
|
-
$utils.log.fatal("ERROR : #{e.to_s}")
|
49
|
-
end
|