Add method to wizard to get manifest

This commit is contained in:
jmartin 2014-05-27 14:29:09 +02:00
parent 33cfc6e054
commit 44b0cd7cd1
2 changed files with 21 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# This file is part of the carrier_send_shipments_seurvalencia module for Tryton.
# This file is part of carrier_send_shipments_seurvalencia module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# copyright notices and license terms. the full
from trytond.pool import Pool
from .api import *
from .shipment import *
from .manifest import *
def register():
@ -11,3 +12,6 @@ def register():
CarrierApi,
ShipmentOut,
module='carrier_send_shipments_seurvalencia', type_='model')
Pool.register(
StockManifest,
module='carrier_send_shipments_seurvalencia', type_='wizard')

16
manifest.py Normal file
View File

@ -0,0 +1,16 @@
# This file is part of carrier_send_shipments_seurvalencia module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from seurvalencia import Picking
from trytond.pool import PoolMeta
__all__ = ['StockManifest']
__metaclass__ = PoolMeta
class StockManifest:
__name__ = 'stock.manifest'
def get_manifest_seurvalencia(self, api, from_date, to_date):
with Picking(api.username, api.password, api.debug) as picking_api:
return picking_api.info()