Remove Open Warehouse quantities Wizard extension

Since changeset 6de0e55a67d0 this wizard no longer exists, so it does not
make sense to extend it.

issue6067
review29841002
This commit is contained in:
Sergi Almacellas Abellana
2016-12-21 10:10:23 +01:00
parent 0b97f06cff
commit 31e56dc9ea
2 changed files with 1 additions and 33 deletions
-1
View File
@@ -40,6 +40,5 @@ def register():
OpenSupplier,
HandleShipmentException,
HandleInvoiceException,
OpenProductQuantitiesByWarehouse,
PartyReplace,
module='purchase', type_='wizard')
+1 -32
View File
@@ -1,23 +1,18 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
from sql import Null
from sql.aggregate import Max
from sql.operators import Concat
from trytond.model import Workflow, ModelView, fields
from trytond.pyson import Eval
from trytond.wizard import Wizard
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
from trytond.pyson import PYSONDecoder, PYSONEncoder
from trytond import backend
from trytond.modules.product import price_digits
__all__ = ['ShipmentIn', 'ShipmentInReturn', 'Move', 'Location',
'OpenProductQuantitiesByWarehouse']
__all__ = ['ShipmentIn', 'ShipmentInReturn', 'Move', 'Location']
class ShipmentIn:
@@ -358,29 +353,3 @@ class Location:
],
depends=['type', 'active', 'id'],
help='If empty the Storage location is used')
class OpenProductQuantitiesByWarehouse(Wizard):
__name__ = 'stock.product_quantities_warehouse'
def do_open_(self, action):
Product = Pool().get('product.product')
action, data = super(OpenProductQuantitiesByWarehouse,
self).do_open_(action)
product = Product(Transaction().context['active_id'])
if product.product_suppliers:
product_supplier = product.product_suppliers[0]
supply_date = product_supplier.compute_supply_date()
if supply_date != datetime.date.max:
search_value = \
PYSONDecoder().decode(action['pyson_search_value'])
clause = ('date', '<=', supply_date)
if search_value and search_value[0] != 'OR':
search_value.append(clause)
else:
search_value = [search_value, clause]
action['pyson_search_value'] = PYSONEncoder().encode(
search_value)
return action, data