[tryton-debian-vcs] tryton-modules-stock-supply branch debian-jessie-3.0 updated. debian/3.0.1-1-5-g7f27f04
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Aug 26 16:45:39 UTC 2014
The following commit has been merged in the debian-jessie-3.0 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock-supply.git;a=commitdiff;h=debian/3.0.1-1-5-g7f27f04
commit 7f27f04ae72ad8c14ec6b5f05f692c6145483558
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Aug 26 14:21:01 2014 +0200
Releasing debian version 3.0.2-1.
diff --git a/debian/changelog b/debian/changelog
index f5258cf..bdf824a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+tryton-modules-stock-supply (3.0.2-1) unstable; urgency=medium
+
+ * Setting the branch in the watch file to the fixed version 3.0.
+ * Updating signing key while using now plain .asc files instead of .pgp
+ binaries.
+ * Merging upstream version 3.0.2.
+ * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Tue, 26 Aug 2014 14:21:01 +0200
+
tryton-modules-stock-supply (3.0.1-1) unstable; urgency=medium
* Removing LC_ALL=C.UTF-8 as build environment.
commit 9de8541defbc9912bbe68a06c776f84bf37c5787
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Aug 26 14:20:58 2014 +0200
Updating copyright file.
diff --git a/debian/copyright b/debian/copyright
index c8f12d2..4a9b6a3 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
-Copyright: 2013 NaN-tic
+Copyright: 2013-2014 NaN-tic
2008-2014 Cédric Krier
2008-2013 Bertrand Chenal
2008-2014 B2CK SPRL
commit bf280d9878cabc9d347619895a7ae7f29afd6fee
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Aug 26 14:20:58 2014 +0200
Merging upstream version 3.0.2.
diff --git a/CHANGELOG b/CHANGELOG
index e815e21..4fdaf91 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.2 - 2014-08-03
+* Bug fixes (see mercurial logs for details)
+
Version 3.0.1 - 2014-03-22
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index afdd87b..d218cc9 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,4 +1,4 @@
-Copyright (C) 2013 NaN-tic.
+Copyright (C) 2013-2014 NaN-tic.
Copyright (C) 2008-2014 Cédric Krier.
Copyright (C) 2008-2013 Bertrand Chenal.
Copyright (C) 2008-2014 B2CK SPRL.
diff --git a/MANIFEST.in b/MANIFEST.in
index 2569955..fc0b03e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -10,3 +10,4 @@ include view/*.xml
include *.odt
include locale/*.po
include doc/*
+include tests/*.rst
diff --git a/PKG-INFO b/PKG-INFO
index f5a53c7..710fbce 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_stock_supply
-Version: 3.0.1
+Version: 3.0.2
Summary: Tryton module for stock supply
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/setup.py b/setup.py
index d61c602..2c05514 100644
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ setup(name='trytond_stock_supply',
],
package_data={
'trytond.modules.stock_supply': (info.get('xml', [])
- + ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
+ + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
diff --git a/tests/scenario_stock_internal_supply.rst b/tests/scenario_stock_internal_supply.rst
new file mode 100644
index 0000000..70ecdc0
--- /dev/null
+++ b/tests/scenario_stock_internal_supply.rst
@@ -0,0 +1,178 @@
+===========================
+Stock Shipment Out Scenario
+===========================
+
+=============
+General Setup
+=============
+
+Imports::
+
+ >>> import datetime
+ >>> from dateutil.relativedelta import relativedelta
+ >>> from decimal import Decimal
+ >>> from proteus import config, Model, Wizard
+ >>> today = datetime.date.today()
+
+Create database::
+
+ >>> config = config.set_trytond()
+ >>> config.pool.test = True
+
+Install stock Module::
+
+ >>> Module = Model.get('ir.module.module')
+ >>> modules = Module.find([('name', '=', 'stock_supply')])
+ >>> Module.install([x.id for x in modules], config.context)
+ >>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
+
+Create company::
+
+ >>> Currency = Model.get('currency.currency')
+ >>> CurrencyRate = Model.get('currency.currency.rate')
+ >>> Company = Model.get('company.company')
+ >>> Party = Model.get('party.party')
+ >>> company_config = Wizard('company.company.config')
+ >>> company_config.execute('company')
+ >>> company = company_config.form
+ >>> party = Party(name='Dunder Mifflin')
+ >>> party.save()
+ >>> company.party = party
+ >>> currencies = Currency.find([('code', '=', 'USD')])
+ >>> if not currencies:
+ ... currency = Currency(name='US Dollar', symbol=u'$', code='USD',
+ ... rounding=Decimal('0.01'), mon_grouping='[3, 3, 0]',
+ ... mon_decimal_point='.')
+ ... currency.save()
+ ... CurrencyRate(date=today + relativedelta(month=1, day=1),
+ ... rate=Decimal('1.0'), currency=currency).save()
+ ... else:
+ ... currency, = currencies
+ >>> company.currency = currency
+ >>> company_config.execute('add')
+ >>> company, = Company.find()
+
+Reload the context::
+
+ >>> User = Model.get('res.user')
+ >>> Group = Model.get('res.group')
+ >>> config._context = User.get_preferences(True, config.context)
+
+Create stock admin user::
+
+ >>> stock_admin_user = User()
+ >>> stock_admin_user.name = 'Stock Admin'
+ >>> stock_admin_user.login = 'stock_admin'
+ >>> stock_admin_user.main_company = company
+ >>> stock_admin_group, = Group.find([('name', '=', 'Stock Administration')])
+ >>> stock_admin_user.groups.append(stock_admin_group)
+ >>> stock_admin_user.save()
+
+Create stock user::
+
+ >>> stock_user = User()
+ >>> stock_user.name = 'Stock'
+ >>> stock_user.login = 'stock'
+ >>> stock_user.main_company = company
+ >>> stock_group, = Group.find([('name', '=', 'Stock')])
+ >>> stock_user.groups.append(stock_group)
+ >>> stock_user.save()
+
+Create product user::
+
+ >>> product_admin_user = User()
+ >>> product_admin_user.name = 'Product'
+ >>> product_admin_user.login = 'product'
+ >>> product_admin_user.main_company = company
+ >>> product_admin_group, = Group.find([
+ ... ('name', '=', 'Product Administration')
+ ... ])
+ >>> product_admin_user.groups.append(product_admin_group)
+ >>> product_admin_user.save()
+
+Create product::
+
+ >>> config.user = product_admin_user.id
+ >>> ProductUom = Model.get('product.uom')
+ >>> ProductTemplate = Model.get('product.template')
+ >>> Product = Model.get('product.product')
+ >>> unit, = ProductUom.find([('name', '=', 'Unit')])
+ >>> product = Product()
+ >>> template = ProductTemplate()
+ >>> template.name = 'Product'
+ >>> template.default_uom = unit
+ >>> template.type = 'goods'
+ >>> template.list_price = Decimal('20')
+ >>> template.cost_price = Decimal('8')
+ >>> template.save()
+ >>> product.template = template
+ >>> product.save()
+
+Get stock locations::
+
+ >>> config.user = stock_admin_user.id
+ >>> Location = Model.get('stock.location')
+ >>> warehouse_loc, = Location.find([('code', '=', 'WH')])
+ >>> supplier_loc, = Location.find([('code', '=', 'SUP')])
+ >>> customer_loc, = Location.find([('code', '=', 'CUS')])
+ >>> output_loc, = Location.find([('code', '=', 'OUT')])
+ >>> storage_loc, = Location.find([('code', '=', 'STO')])
+
+Create new internal location::
+
+ >>> Location = Model.get('stock.location')
+ >>> provisioning_loc = Location()
+ >>> provisioning_loc.name = 'Provisioning Location'
+ >>> provisioning_loc.type = 'storage'
+ >>> provisioning_loc.parent = warehouse_loc
+ >>> provisioning_loc.save()
+
+Create internal order point::
+
+ >>> OrderPoint = Model.get('stock.order_point')
+ >>> order_point = OrderPoint()
+ >>> order_point.product = product
+ >>> order_point.warehouse_location = warehouse_loc
+ >>> order_point.storage_location = storage_loc
+ >>> order_point.provisioning_location = provisioning_loc
+ >>> order_point.type = 'internal'
+ >>> order_point.min_quantity = 10
+ >>> order_point.max_quantity = 15
+ >>> order_point.save()
+
+Create inventory to add enough quantity in Provisioning Location::
+
+ >>> config.user = stock_user.id
+ >>> Inventory = Model.get('stock.inventory')
+ >>> InventoryLine = Model.get('stock.inventory.line')
+ >>> Location = Model.get('stock.location')
+ >>> inventory = Inventory()
+ >>> inventory.location = provisioning_loc
+ >>> inventory.save()
+ >>> inventory_line = InventoryLine(product=product, inventory=inventory)
+ >>> inventory_line.quantity = 100.0
+ >>> inventory_line.expected_quantity = 0.0
+ >>> inventory.save()
+ >>> inventory_line.save()
+ >>> Inventory.confirm([inventory.id], config.context)
+ >>> inventory.state
+ u'done'
+
+Execute internal supply::
+
+ >>> ShipmentInternal = Model.get('stock.shipment.internal')
+ >>> Wizard('stock.shipment.internal.create').execute('create_')
+ >>> shipment, = ShipmentInternal.find([])
+ >>> shipment.state
+ u'waiting'
+ >>> len(shipment.moves)
+ 1
+ >>> move, = shipment.moves
+ >>> move.product.template.name
+ u'Product'
+ >>> move.quantity
+ 15.0
+ >>> move.from_location.name
+ u'Provisioning Location'
+ >>> move.to_location.code
+ u'STO'
diff --git a/tryton.cfg b/tryton.cfg
index d13f669..c4d3382 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.1
+version=3.0.2
depends:
account
ir
diff --git a/trytond_stock_supply.egg-info/PKG-INFO b/trytond_stock_supply.egg-info/PKG-INFO
index 51f5cf2..f87119b 100644
--- a/trytond_stock_supply.egg-info/PKG-INFO
+++ b/trytond_stock_supply.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-stock-supply
-Version: 3.0.1
+Version: 3.0.2
Summary: Tryton module for stock supply
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond_stock_supply.egg-info/SOURCES.txt b/trytond_stock_supply.egg-info/SOURCES.txt
index f49268f..b9c26a3 100644
--- a/trytond_stock_supply.egg-info/SOURCES.txt
+++ b/trytond_stock_supply.egg-info/SOURCES.txt
@@ -28,6 +28,7 @@ locale/fr_FR.po
locale/nl_NL.po
locale/ru_RU.po
locale/sl_SI.po
+tests/scenario_stock_internal_supply.rst
trytond_stock_supply.egg-info/PKG-INFO
trytond_stock_supply.egg-info/SOURCES.txt
trytond_stock_supply.egg-info/dependency_links.txt
--
tryton-modules-stock-supply
More information about the tryton-debian-vcs
mailing list