diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/stock/test/stock_test_wizard.yml | 14 | ||||
| -rw-r--r-- | addons/stock/wizard/__init__.py | 1 | ||||
| -rw-r--r-- | addons/stock/wizard/stock_move.py | 29 | ||||
| -rw-r--r-- | addons/stock/wizard/stock_move_view.xml | 29 | ||||
| -rw-r--r-- | addons/stock/wizard/stock_replacement.py | 61 | ||||
| -rw-r--r-- | addons/stock/wizard/stock_replacement_view.xml | 41 |
6 files changed, 11 insertions, 164 deletions
diff --git a/addons/stock/test/stock_test_wizard.yml b/addons/stock/test/stock_test_wizard.yml index ff1f7f48b54..f6b253186ae 100644 --- a/addons/stock/test/stock_test_wizard.yml +++ b/addons/stock/test/stock_test_wizard.yml @@ -141,15 +141,23 @@ state: assigned - - I Check onchange and _getSSCC function of stock.move object + I Check onchange function of stock.move object - !python {model: stock.move }: | self.onchange_lot_id(cr, uid, [ref("stock_move_test0")], ref("stock.stock_production_lot0"), 5, ref("stock.stock_location_suppliers"), ref("product.product_product_pc1"), ref("product.product_uom_unit"), None) self.onchange_quantity(cr, uid, [ref("stock_move_test0")], ref("product.product_product_pc1"), 10, ref("product.product_uom_unit"), ref("product.product_uom_unit")) self.onchange_uos_quantity(cr, uid, [ref("stock_move_test0")], ref("product.product_product_pc1"), 10, ref("product.product_uom_unit"), ref("product.product_uom_unit")) self.onchange_product_id(cr, uid, [ref("stock_move_test0")], ref("product.product_product_pc1"), ref("stock.stock_location_suppliers"), ref("stock.stock_location_shop0"), False) - self._getSSCC(cr, uid , {"lang": 'en_US', "default_location_dest_id": ref("stock.stock_location_shop0"), "active_model": - "stock.move", "search_default_receive": 1, 'product_receive': True, "default_location_id": ref("stock.stock_location_suppliers"),"active_ids":[ref("stock_move_test0")], "tz": False, "active_id":ref("stock_move_test0")}) + +- + I Check _getSSCC and action_partial_move function of stock.move object +- + !python {model: stock.move }: | + context = {"lang": 'en_US', "default_location_dest_id": ref("stock.stock_location_shop0"), "active_model": + "stock.move", "search_default_receive": 1, 'product_receive': True, "default_location_id": ref("stock.stock_location_suppliers"),"active_ids":[ref("stock_move_test0")], "tz": False, "active_id":ref("stock_move_test0")} + self._getSSCC(cr, uid , context) + self.action_partial_move(cr, uid , [ref("stock_move_test0")], context) + - I check write function - diff --git a/addons/stock/wizard/__init__.py b/addons/stock/wizard/__init__.py index b0b091be07a..e37483bfb37 100644 --- a/addons/stock/wizard/__init__.py +++ b/addons/stock/wizard/__init__.py @@ -24,7 +24,6 @@ import stock_move import stock_splitinto import stock_partial_picking import stock_partial_move -import stock_replacement import stock_inventory_merge import stock_fill_inventory import stock_inventory_line_split diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index b075af80c7d..f2eff0b6b27 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -23,35 +23,6 @@ from osv import fields, osv import decimal_precision as dp -class stock_move_track(osv.osv_memory): - _name = "stock.move.track" - _description = "Track moves" - - _columns = { - 'tracking_prefix': fields.char('Tracking prefix', size=64), - 'quantity': fields.float("Quantity per lot") - } - - _defaults = { - 'quantity': lambda *x: 1 - } - - def track_lines(self, cr, uid, ids, context=None): - """ To track stock moves lines - @param self: The object pointer. - @param cr: A database cursor - @param uid: ID of the user currently logged in - @param ids: An ID or list of IDs if we want more than one - @param context: A standard dictionary - @return: - """ - datas = self.read(cr, uid, ids)[0] - move_obj = self.pool.get('stock.move') - move_obj._track_lines(cr, uid, context['active_id'], datas, context=context) - return {'type': 'ir.actions.act_window_close'} - -stock_move_track() - class stock_move_consume(osv.osv_memory): _name = "stock.move.consume" _description = "Consume Products" diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml index baaa581b4f3..591940fab29 100644 --- a/addons/stock/wizard/stock_move_view.xml +++ b/addons/stock/wizard/stock_move_view.xml @@ -1,35 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - - <record id="view_stock_move_track_wizard" model="ir.ui.view"> - <field name="name">Tracking a move</field> - <field name="model">stock.move.track</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Tracking a move"> - <field name="tracking_prefix" colspan="4"/> - <field name="quantity" colspan="4"/> - <newline/> - <separator string="" colspan="4" /> - <button icon='gtk-cancel' special="cancel" - string="_Cancel" /> - <button name="track_lines" string="Ok" - type="object" icon="gtk-ok" /> - </form> - </field> - </record> - - <record id="track_line_old" model="ir.actions.act_window"> - <field name="name">Tracking a move</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">stock.move.track</field> - <field name="view_type">form</field> - <field name="view_mode">form</field> - <field name="target">new</field> - </record> - - <!-- Consume, scrap move --> <record id="view_stock_move_consume_wizard" model="ir.ui.view"> diff --git a/addons/stock/wizard/stock_replacement.py b/addons/stock/wizard/stock_replacement.py deleted file mode 100644 index 17f4d5a62ab..00000000000 --- a/addons/stock/wizard/stock_replacement.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). -# -# 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 <http://www.gnu.org/licenses/>. -# -############################################################################## - -from osv import fields, osv -from tools.translate import _ -import time - -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=None): - return {} - - def replace_composant(self, cr, uid, ids, context=None): - """ 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 deleted file mode 100644 index cea5bfedbe8..00000000000 --- a/addons/stock/wizard/stock_replacement_view.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<openerp> - <data> - <record id="view_stock_replacement" model="ir.ui.view"> - <field name="name">Stock Replacement</field> - <field name="model">stock.replacement</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Replace a component"> - <label string="Component" colspan="4"/> - <separator string="" colspan="4" /> - <button icon='gtk-cancel' special="cancel" string="_Cancel" /> - <button name="replace_composant" string="Replace" type="object" /> - </form> - </field> - </record> - - <act_window name="Stock Replacement" - res_model="stock.replacement" - src_model="" - view_mode="form" - target="new" - key2="client_action_multi" - id="action_view_stock_replacement"/> - - - <record id="view_stock_replacement_result" model="ir.ui.view"> - <field name="name">Stock Replacement result</field> - <field name="model">stock.replacement.result</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Replace result"> - <label string="Replacing successful !" colspan="4"/> - <separator string="" colspan="4" /> - <button special="cancel" string="Ok" /> - </form> - </field> - </record> - - </data> -</openerp> |
