[tryton-debian-vcs] tryton-modules-sale-supply branch upstream updated. upstream/3.8.0-2-g02c0eee
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Jun 2 16:01:51 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale-supply.git;a=commitdiff;h=upstream/3.8.0-2-g02c0eee
commit 02c0eeeedfd3eeffe91117145335b2a263f7ad5e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 27 18:35:30 2016 +0200
Adding upstream version 4.0.1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 15eadeb..a8fe9a8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.1 - 2016-05-11
+* Bug fixes (see mercurial logs for details)
+
Version 4.0.0 - 2016-05-02
* Bug fixes (see mercurial logs for details)
* Add Python3 support
diff --git a/PKG-INFO b/PKG-INFO
index 91980ea..3799bb5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_sale_supply
-Version: 4.0.0
+Version: 4.0.1
Summary: Tryton module for sale supply
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 6d99802..1cc353d 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -2,7 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Subministra a la venda"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index dc9891a..e2a1833 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -2,7 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Beschaffung bei Verkauf"
@@ -25,7 +24,7 @@ msgstr "Bestellvorschläge"
msgctxt "selection:sale.line,purchase_request_state:"
msgid ""
-msgstr ""
+msgstr " "
msgctxt "selection:sale.line,purchase_request_state:"
msgid "Cancel"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 7e64499..7ca5545 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -2,7 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Suministra en la venta"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index d9d782e..e7726d9 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -2,10 +2,9 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
-msgstr "Provisión en Venta"
+msgstr "Provee en Venta"
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
@@ -25,7 +24,7 @@ msgstr "Ordenes de Compra"
msgctxt "selection:sale.line,purchase_request_state:"
msgid ""
-msgstr ""
+msgstr " "
msgctxt "selection:sale.line,purchase_request_state:"
msgid "Cancel"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 47bae6a..b602045 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -2,7 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Provisión en venta"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 7e64499..eb0e3a7 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -2,10 +2,9 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
-msgstr "Suministra en la venta"
+msgstr "Suministrar en la venta"
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 22a2b1e..2346a0a 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -2,7 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Approvisionnement sur vente"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 3dd1e40..22a115c 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -2,7 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Dobava ob prodaji"
diff --git a/tryton.cfg b/tryton.cfg
index 297c6c7..b2ccf26 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.0
+version=4.0.1
depends:
ir
purchase
diff --git a/trytond_sale_supply.egg-info/PKG-INFO b/trytond_sale_supply.egg-info/PKG-INFO
index ffb7cb1..c57e9dd 100644
--- a/trytond_sale_supply.egg-info/PKG-INFO
+++ b/trytond_sale_supply.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-sale-supply
-Version: 4.0.0
+Version: 4.0.1
Summary: Tryton module for sale supply
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond_sale_supply.egg-info/SOURCES.txt b/trytond_sale_supply.egg-info/SOURCES.txt
index 76e6e6e..cc76b43 100644
--- a/trytond_sale_supply.egg-info/SOURCES.txt
+++ b/trytond_sale_supply.egg-info/SOURCES.txt
@@ -29,11 +29,13 @@ tryton.cfg
./locale/hu_HU.po
./locale/it_IT.po
./locale/ja_JP.po
+./locale/lo_LA.po
./locale/lt_LT.po
./locale/nl_NL.po
./locale/pt_BR.po
./locale/ru_RU.po
./locale/sl_SI.po
+./locale/zh_CN.po
./tests/__init__.py
./tests/scenario_sale_supply.rst
./tests/test_sale_supply.py
diff --git a/trytond_sale_supply.egg-info/requires.txt b/trytond_sale_supply.egg-info/requires.txt
index 805e1dc..1695356 100644
--- a/trytond_sale_supply.egg-info/requires.txt
+++ b/trytond_sale_supply.egg-info/requires.txt
@@ -2,4 +2,4 @@ trytond_purchase >= 4.0, < 4.1
trytond_purchase_request >= 4.0, < 4.1
trytond_sale >= 4.0, < 4.1
trytond_stock >= 4.0, < 4.1
-trytond >= 4.0, < 4.1
\ No newline at end of file
+trytond >= 4.0, < 4.1
commit 8668cab97dd19572ac3c72678efc41b39316dbc8
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 27 18:26:18 2016 +0200
Adding upstream version 4.0.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 75bc43a..15eadeb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.0.0 - 2016-05-02
+* Bug fixes (see mercurial logs for details)
+* Add Python3 support
+
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 196a420..93ef5be 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2011-2015 Cédric Krier.
-Copyright (C) 2011-2015 B2CK SPRL.
+Copyright (C) 2011-2016 Cédric Krier.
+Copyright (C) 2011-2016 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 00db226..91980ea 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_sale_supply
-Version: 3.8.0
+Version: 4.0.0
Summary: Tryton module for sale supply
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
Description: sale_supply
===========
@@ -54,6 +54,7 @@ Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
@@ -67,6 +68,9 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index c9e6c5c..f39eafa 100644
--- a/__init__.py
+++ b/__init__.py
@@ -16,4 +16,8 @@ def register():
Purchase,
ShipmentIn,
Template,
+ Product,
module='sale_supply', type_='model')
+ Pool.register(
+ HandlePurchaseCancellationException,
+ module='sale_supply', type_='wizard')
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 0e75b0e..0d8e188 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 0b6b981..6d99802 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Subministra a la venda"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Subministra a la venda"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 7149a85..96d4b90 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 6bbc82e..dc9891a 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Beschaffung bei Verkauf"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Beschaffung bei Verkauf"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 2867427..7e64499 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Suministra en la venta"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Suministra en la venta"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 43a5a71..d9d782e 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Provisión en Venta"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Provisión en Venta"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index b8b7dcd..47bae6a 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Provisión en venta"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Provisión en venta"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 2867427..7e64499 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Suministra en la venta"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Suministra en la venta"
diff --git a/locale/es_MX.po b/locale/es_MX.po
index 2867427..7e64499 100644
--- a/locale/es_MX.po
+++ b/locale/es_MX.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Suministra en la venta"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Suministra en la venta"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 720ec70..22a2b1e 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Approvisionnement sur vente"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Approvisionnement sur vente"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index 7149a85..96d4b90 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 7149a85..96d4b90 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 7149a85..96d4b90 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/hu_HU.po b/locale/lo_LA.po
similarity index 89%
copy from locale/hu_HU.po
copy to locale/lo_LA.po
index 7149a85..96d4b90 100644
--- a/locale/hu_HU.po
+++ b/locale/lo_LA.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/lt_LT.po b/locale/lt_LT.po
index 7149a85..96d4b90 100644
--- a/locale/lt_LT.po
+++ b/locale/lt_LT.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 56ef90b..81391da 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index b3a82a3..0d917fc 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Suprir Na Venda"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Suprir Na Venda"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index c39f5d3..df3efae 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index e9b6173..3dd1e40 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -2,6 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr "Dobava ob prodaji"
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Dobava ob prodaji"
diff --git a/locale/hu_HU.po b/locale/zh_CN.po
similarity index 89%
copy from locale/hu_HU.po
copy to locale/zh_CN.po
index 7149a85..96d4b90 100644
--- a/locale/hu_HU.po
+++ b/locale/zh_CN.po
@@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+msgctxt "field:product.product,supply_on_sale:"
+msgid "Supply On Sale"
+msgstr ""
+
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
diff --git a/product.py b/product.py
index 61a8896..85abb69 100644
--- a/product.py
+++ b/product.py
@@ -4,11 +4,11 @@ from trytond.model import fields
from trytond.pool import PoolMeta
from trytond.pyson import Eval
-__all__ = ['Template']
-__metaclass__ = PoolMeta
+__all__ = ['Template', 'Product']
class Template:
+ __metaclass__ = PoolMeta
__name__ = 'product.template'
supply_on_sale = fields.Boolean('Supply On Sale',
@@ -16,3 +16,8 @@ class Template:
'invisible': ~Eval('purchasable') | ~Eval('salable'),
},
depends=['purchasable', 'salable'])
+
+
+class Product:
+ __metaclass__ = PoolMeta
+ __name__ = 'product.product'
diff --git a/purchase.py b/purchase.py
index 5abadba..b49bac4 100644
--- a/purchase.py
+++ b/purchase.py
@@ -7,11 +7,12 @@ from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
from trytond.tools import grouped_slice
-__all__ = ['PurchaseRequest', 'Purchase']
-__metaclass__ = PoolMeta
+__all__ = ['PurchaseRequest', 'Purchase',
+ 'HandlePurchaseCancellationException']
class PurchaseRequest:
+ __metaclass__ = PoolMeta
__name__ = 'purchase.request'
@classmethod
@@ -48,6 +49,7 @@ class PurchaseRequest:
class Purchase:
+ __metaclass__ = PoolMeta
__name__ = 'purchase.purchase'
@classmethod
@@ -81,3 +83,25 @@ class Purchase:
def cancel(cls, purchases):
super(Purchase, cls).cancel(purchases)
cls._sale_supply_process(purchases)
+
+
+class HandlePurchaseCancellationException:
+ __metaclass__ = PoolMeta
+ __name__ = 'purchase.request.handle.purchase.cancellation'
+
+ def transition_cancel_request(self):
+ pool = Pool()
+ SaleLine = pool.get('sale.line')
+ Move = pool.get('stock.move')
+
+ next_state = super(HandlePurchaseCancellationException,
+ self).transition_cancel_request()
+ moves = []
+ for sub_ids in grouped_slice(Transaction().context['active_ids']):
+ sale_lines = SaleLine.search([
+ ('purchase_request', 'in', sub_ids),
+ ])
+ moves += [m for line in sale_lines for m in line.moves]
+ if moves:
+ Move.cancel(moves)
+ return next_state
diff --git a/sale.py b/sale.py
index 1417115..842b170 100644
--- a/sale.py
+++ b/sale.py
@@ -5,10 +5,10 @@ from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
__all__ = ['Sale', 'SaleLine']
-__metaclass__ = PoolMeta
class Sale:
+ __metaclass__ = PoolMeta
__name__ = 'sale.sale'
def is_done(self):
@@ -60,6 +60,7 @@ class Sale:
class SaleLine:
+ __metaclass__ = PoolMeta
__name__ = 'sale.line'
purchase_request = fields.Many2One('purchase.request', 'Purchase Request',
@@ -126,7 +127,7 @@ class SaleLine:
product = self.product
supplier, purchase_date = Request.find_best_supplier(product,
- self.delivery_date)
+ self.shipping_date)
uom = product.purchase_uom or product.default_uom
quantity = Uom.compute_qty(self.unit, self.quantity, uom)
return Request(
@@ -137,7 +138,7 @@ class SaleLine:
computed_quantity=quantity,
computed_uom=uom,
purchase_date=purchase_date,
- supply_date=self.delivery_date,
+ supply_date=self.shipping_date,
company=self.sale.company,
warehouse=self.warehouse,
origin=self.sale,
diff --git a/sale.xml b/sale.xml
index d52bb21..45c2582 100644
--- a/sale.xml
+++ b/sale.xml
@@ -25,7 +25,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action-res.group"
id="action_purchase_request_group_purchase_request">
<field name="action" ref="act_purchase_request_form"/>
- <field name="group" ref="stock_supply.group_purchase_request"/>
+ <field name="group" ref="purchase_request.group_purchase_request"/>
</record>
<record model="ir.action-res.group"
id="action_purchase_request_group_purchase">
diff --git a/setup.py b/setup.py
index a2f52af..03ee35c 100644
--- a/setup.py
+++ b/setup.py
@@ -5,11 +5,17 @@
from setuptools import setup
import re
import os
-import ConfigParser
+import io
+try:
+ from configparser import ConfigParser
+except ImportError:
+ from ConfigParser import ConfigParser
def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ return io.open(
+ os.path.join(os.path.dirname(__file__), fname),
+ 'r', encoding='utf-8').read()
def get_require_version(name):
@@ -21,7 +27,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
-config = ConfigParser.ConfigParser()
+config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
@@ -43,7 +49,7 @@ if minor_version % 2:
requires = []
for dep in info.get('depends', []):
- if not re.match(r'(ir|res|webdav)(\W|$)', dep):
+ if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
@@ -81,6 +87,7 @@ setup(name=name,
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
+ 'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
@@ -94,6 +101,9 @@ setup(name=name,
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
@@ -110,4 +120,8 @@ setup(name=name,
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
+ use_2to3=True,
+ convert_2to3_doctests=[
+ 'tests/scenario_sale_supply.rst',
+ ],
)
diff --git a/stock.py b/stock.py
index 3739cc4..0be650a 100644
--- a/stock.py
+++ b/stock.py
@@ -5,10 +5,10 @@ from trytond.pool import Pool, PoolMeta
__all__ = ['ShipmentIn']
-__metaclass__ = PoolMeta
class ShipmentIn:
+ __metaclass__ = PoolMeta
__name__ = 'stock.shipment.in'
@classmethod
diff --git a/tests/__init__.py b/tests/__init__.py
index e80754c..140c68b 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,6 +1,9 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
-from test_sale_supply import suite
+try:
+ from trytond.modules.sale_supply.tests.test_sale_supply import suite
+except ImportError:
+ from .test_sale_supply import suite
__all__ = ['suite']
diff --git a/tests/scenario_sale_supply.rst b/tests/scenario_sale_supply.rst
index 04b8e3b..b357323 100644
--- a/tests/scenario_sale_supply.rst
+++ b/tests/scenario_sale_supply.rst
@@ -12,7 +12,7 @@ Imports::
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts
- >>> from.trytond.modules.account_invoice.tests.tools import \
+ >>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences, create_payment_term
>>> today = datetime.date.today()
@@ -25,8 +25,7 @@ Install sale_supply, sale, purchase::
>>> Module = Model.get('ir.module')
>>> modules = Module.find([
- ... ('name', 'in', ('sale_supply', 'sale', 'purchase',
- ... 'stock_supply')),
+ ... ('name', 'in', ('sale_supply', 'sale', 'purchase')),
... ])
>>> for module in modules:
... module.click('install')
@@ -98,12 +97,6 @@ Create parties::
>>> customer = Party(name='Customer')
>>> customer.save()
-Create category::
-
- >>> ProductCategory = Model.get('product.category')
- >>> category = ProductCategory(name='Category')
- >>> category.save()
-
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -113,7 +106,6 @@ Create product::
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'product'
- >>> template.category = category
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.purchasable = True
@@ -227,7 +219,6 @@ not create a new purchase request::
>>> changing_product = Product()
>>> changing_template = ProductTemplate()
>>> changing_template.name = 'product'
- >>> changing_template.category = category
>>> changing_template.default_uom = unit
>>> changing_template.type = 'goods'
>>> changing_template.purchasable = True
diff --git a/tests/test_sale_supply.py b/tests/test_sale_supply.py
index d136f10..5ecc782 100644
--- a/tests/test_sale_supply.py
+++ b/tests/test_sale_supply.py
@@ -5,6 +5,7 @@ import doctest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
+from trytond.tests.test_tryton import doctest_checker
class SaleSupplyTestCase(ModuleTestCase):
@@ -18,5 +19,6 @@ def suite():
SaleSupplyTestCase))
suite.addTests(doctest.DocFileSuite('scenario_sale_supply.rst',
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
+ checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
diff --git a/tryton.cfg b/tryton.cfg
index db49f8b..297c6c7 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,11 +1,11 @@
[tryton]
-version=3.8.0
+version=4.0.0
depends:
ir
purchase
+ purchase_request
sale
stock
- stock_supply
xml:
product.xml
sale.xml
diff --git a/trytond_sale_supply.egg-info/PKG-INFO b/trytond_sale_supply.egg-info/PKG-INFO
index 952e711..ffb7cb1 100644
--- a/trytond_sale_supply.egg-info/PKG-INFO
+++ b/trytond_sale_supply.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-sale-supply
-Version: 3.8.0
+Version: 4.0.0
Summary: Tryton module for sale supply
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
Description: sale_supply
===========
@@ -54,6 +54,7 @@ Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
@@ -67,6 +68,9 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/trytond_sale_supply.egg-info/SOURCES.txt b/trytond_sale_supply.egg-info/SOURCES.txt
index 74082f2..76e6e6e 100644
--- a/trytond_sale_supply.egg-info/SOURCES.txt
+++ b/trytond_sale_supply.egg-info/SOURCES.txt
@@ -53,11 +53,13 @@ locale/fr_FR.po
locale/hu_HU.po
locale/it_IT.po
locale/ja_JP.po
+locale/lo_LA.po
locale/lt_LT.po
locale/nl_NL.po
locale/pt_BR.po
locale/ru_RU.po
locale/sl_SI.po
+locale/zh_CN.po
tests/scenario_sale_supply.rst
trytond_sale_supply.egg-info/PKG-INFO
trytond_sale_supply.egg-info/SOURCES.txt
diff --git a/trytond_sale_supply.egg-info/requires.txt b/trytond_sale_supply.egg-info/requires.txt
index 68c5160..805e1dc 100644
--- a/trytond_sale_supply.egg-info/requires.txt
+++ b/trytond_sale_supply.egg-info/requires.txt
@@ -1,5 +1,5 @@
-trytond_purchase >= 3.8, < 3.9
-trytond_sale >= 3.8, < 3.9
-trytond_stock >= 3.8, < 3.9
-trytond_stock_supply >= 3.8, < 3.9
-trytond >= 3.8, < 3.9
\ No newline at end of file
+trytond_purchase >= 4.0, < 4.1
+trytond_purchase_request >= 4.0, < 4.1
+trytond_sale >= 4.0, < 4.1
+trytond_stock >= 4.0, < 4.1
+trytond >= 4.0, < 4.1
\ No newline at end of file
diff --git a/view/sale_line_form.xml b/view/sale_line_form.xml
index ba160bc..5e5fe25 100644
--- a/view/sale_line_form.xml
+++ b/view/sale_line_form.xml
@@ -2,7 +2,7 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
- <xpath expr="/form/notebook/page/field[@name='delivery_date']"
+ <xpath expr="/form/notebook/page/field[@name='shipping_date']"
position="after">
<label name="purchase_request_state"/>
<field name="purchase_request_state"/>
--
tryton-modules-sale-supply
More information about the tryton-debian-vcs
mailing list