-
+
+
@@ -1111,7 +1116,7 @@
-
+
@@ -1137,29 +1142,29 @@
-
-
-
-
-
+
+
+
+
+
-
+
-
-
+
-
+
@@ -1205,9 +1210,9 @@
-
-
-
+
+
+
@@ -1264,9 +1269,9 @@
-
-
-
+
+
+
@@ -1302,8 +1307,9 @@
-
+
+
@@ -1327,7 +1333,7 @@
-
+
@@ -1335,11 +1341,11 @@
-
-
+
+
-
+
@@ -1351,7 +1357,7 @@
-
+
-
+
diff --git a/addons/stock/wizard/__init__.py b/addons/stock/wizard/__init__.py
index 8fac3041fb3..82825000eaa 100644
--- a/addons/stock/wizard/__init__.py
+++ b/addons/stock/wizard/__init__.py
@@ -23,8 +23,8 @@ import stock_traceability
import stock_move
import stock_partial_picking
import stock_partial_move
-import wizard_replacement
-import wizard_ups
+import stock_replacement
+import stock_ups
import stock_inventory_merge
import stock_inventory_set_stock_zero
import stock_fill_inventory
diff --git a/addons/stock/wizard/stock_replacement.py b/addons/stock/wizard/stock_replacement.py
new file mode 100644
index 00000000000..a6f39212ef8
--- /dev/null
+++ b/addons/stock/wizard/stock_replacement.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+
+from osv import fields, osv
+from service import web_services
+from tools.translate import _
+import netsvc
+import pooler
+import time
+import wizard
+
+class stock_replacement(osv.osv_memory):
+ """
+ This class has been defined for replacement wizard
+ """
+ _name = "stock.replacement"
+ _description = "Stock Replacement"
+
+ def get_composant(self, cr, uid, ids, context = {}):
+ return {}
+
+ def replace_composant(self, cr, uid, ids, context = {}):
+ """
+ to open a new wizard that acknowledge, a replacement task
+
+ @return: it returns the replacement acknowledgement form
+
+ """
+ return {
+ 'name': False,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'stock.replacement.result',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+
+stock_replacement()
+
+class stock_replacement_result(osv.osv_memory):
+ """
+ This class has been defined for replacement result
+ """
+ _name = "stock.replacement.result"
+ _description = "Stock Replacement result"
+
+stock_replacement_result()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/stock/wizard/stock_replacement_view.xml b/addons/stock/wizard/stock_replacement_view.xml
new file mode 100644
index 00000000000..ce5f7efbc9f
--- /dev/null
+++ b/addons/stock/wizard/stock_replacement_view.xml
@@ -0,0 +1,41 @@
+
+
+
+
+ Stock Replacement
+ stock.replacement
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Stock Replacement result
+ stock.replacement.result
+ form
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/stock/wizard/stock_ups.py b/addons/stock/wizard/stock_ups.py
new file mode 100644
index 00000000000..5bde686402f
--- /dev/null
+++ b/addons/stock/wizard/stock_ups.py
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+from osv import fields, osv
+from service import web_services
+from tools.translate import _
+import netsvc
+import pooler
+import time
+import wizard
+
+class stock_ups(osv.osv_memory):
+ _name = "stock.ups"
+ _description = "Stock ups"
+
+ def ups_save(self, cr, uid, ids, context = {}):
+
+ return {
+ 'name': False,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'stock.ups.final',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+ def ups_upload(self, cr, uid, ids, context = {}):
+
+ return {
+ 'name': False,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'stock.ups.upload',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+ _columns = {
+ 'weight': fields.float('Lot weight', required=True),
+ }
+
+ _defaults = {
+ 'weight': lambda *a: 3.0,
+ }
+stock_ups()
+
+class stock_ups_final(osv.osv_memory):
+ _name = "stock.ups.final"
+ _description = "Stock ups final"
+
+ def create_xmlfile(self, cr, uid, ids, context = {}):
+ report = netsvc._group['report']['report.stock.move.lot.ups_xml']
+ data['report_type'] = 'raw'
+ return {'xmlfile' : report.create(uid, context['active_id'], ids, {})}
+
+ _columns = {
+ 'xmlfile': fields.binary('XML File'),
+ }
+
+stock_ups_final()
+
+class stock_ups_upload(osv.osv_memory):
+ _name = "stock.ups.upload"
+ _description = "Stock ups upload"
+
+ def upload_xmlfile(self, cr, uid, ids, context = {}):
+ report = netsvc._group['report']['report.stock.move.lot.ups_xml']
+ data['report_type'] = 'raw'
+#FIXME: this seems unfinished
+ fp = file('/tmp/test.xml', 'w').write(report.create(uid, context['active_id'], ids, {}))
+ return {}
+
+stock_ups_upload()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/stock/wizard/stock_ups_view.xml b/addons/stock/wizard/stock_ups_view.xml
new file mode 100644
index 00000000000..89b5fe131e8
--- /dev/null
+++ b/addons/stock/wizard/stock_ups_view.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+ Stock ups
+ stock.ups
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Stock ups
+ stock.ups.final
+ form
+
+
+
+
+
+
+
+
+
+
+
+ Stock ups
+ stock.ups.upload
+ form
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/stock/wizard/wizard_replacement.py b/addons/stock/wizard/wizard_replacement.py
deleted file mode 100644
index 5b066aaab9f..00000000000
--- a/addons/stock/wizard/wizard_replacement.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-import wizard
-
-class wizard_replacement(wizard.interface):
-
- def getComposant(self, cr, uid, data, context):
- return {}
-
- def replaceComposant(self, cr, uid, data, context):
- return {}
-
- comp_form = '''
'''
- comp_fields = {}
-
- replace_form = '''
'''
- replace_fields = {}
-
- states = {
- 'init' : {
- 'actions' : [getComposant],
- 'result' : {
- 'type' : 'form',
- 'arch' : comp_form,
- 'fields' : comp_fields,
- 'state' : [('end', 'Cancel'), ('replace', 'Replace')]}
- },
- 'replace' : {
- 'action' : [replaceComposant],
- 'result' : {
- 'type' : 'form',
- 'arch' : replace_form,
- 'fields' : replace_fields,
- 'state' : [('end', 'Ok')]}
- },
- }
-
-wizard_replacement('stock.move.replace')
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/stock/wizard/wizard_ups.py b/addons/stock/wizard/wizard_ups.py
deleted file mode 100644
index f57128c78fc..00000000000
--- a/addons/stock/wizard/wizard_ups.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-import os
-
-import wizard
-import netsvc
-import time
-
-_ups_form = '''
-