[tryton-debian-vcs] tryton-modules-purchase-request branch upstream updated. upstream/4.4.2-1-g176fe05
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Fri Nov 10 12:16:16 UTC 2017
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-purchase-request.git;a=commitdiff;h=upstream/4.4.2-1-g176fe05
commit 176fe05c079237bf71e50ebfdbefc51d2869ba3f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Nov 6 14:41:11 2017 +0100
Adding upstream version 4.6.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..e0bc2f7
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,51 @@
+clone:
+ hg:
+ image: plugins/hg
+
+pipeline:
+ tox:
+ image: ${IMAGE}
+ environment:
+ - CFLAGS=-O0
+ - DB_CACHE=/cache
+ - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
+ - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
+ commands:
+ - pip install tox
+ - tox -e "${TOXENV}-${DATABASE}"
+ volumes:
+ - cache:/root/.cache
+
+services:
+ postgresql:
+ image: postgres
+ when:
+ matrix:
+ DATABASE: postgresql
+
+matrix:
+ include:
+ - IMAGE: python:2.7
+ TOXENV: py27
+ DATABASE: sqlite
+ - IMAGE: python:2.7
+ TOXENV: py27
+ DATABASE: postgresql
+ - IMAGE: python:3.4
+ TOXENV: py34
+ DATABASE: sqlite
+ - IMAGE: python:3.4
+ TOXENV: py34
+ DATABASE: postgresql
+ - IMAGE: python:3.5
+ TOXENV: py35
+ DATABASE: sqlite
+ - IMAGE: python:3.5
+ TOXENV: py35
+ DATABASE: postgresql
+ - IMAGE: python:3.6
+ TOXENV: py36
+ DATABASE: sqlite
+ - IMAGE: python:3.6
+ TOXENV: py36
+ DATABASE: postgresql
diff --git a/CHANGELOG b/CHANGELOG
index 2a73029..59df38c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,6 @@
-Version 4.4.2 - 2017-07-01
-* Bug fixes (see mercurial logs for details)
-
-Version 4.4.1 - 2017-06-06
+Version 4.6.0 - 2017-10-30
* Bug fixes (see mercurial logs for details)
+* Remove required on request origin
Version 4.4.0 - 2017-05-01
* Bug fixes (see mercurial logs for details)
diff --git a/MANIFEST.in b/MANIFEST.in
index fb91042..4a5843d 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,7 +6,7 @@ include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
-include *.odt
+include *.fodt
include locale/*.po
include doc/*
include icons/*
diff --git a/PKG-INFO b/PKG-INFO
index 9d1af5c..5ea5c51 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_purchase_request
-Version: 4.4.2
+Version: 4.6.0
Summary: Tryton module for purchase requests
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.4/
+Download-URL: http://downloads.tryton.org/4.6/
Description: trytond_purchase_request
========================
@@ -69,9 +69,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 :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/locale/bg.po b/locale/bg.po
index 46fff85..290d8d9 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -103,10 +103,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr "Количество"
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Условие за плащане"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/locale/ca.po b/locale/ca.po
index 3f33b29..f8be2f3 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,8 +95,8 @@ msgid "Quantity"
msgstr "Quantitat"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Nom"
+msgid "Record Name"
+msgstr "Nom del registre"
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/cs.po b/locale/cs.po
index 8955c89..aabc479 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -92,10 +92,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr ""
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Namu"
+msgid "Record Name"
+msgstr ""
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/de.po b/locale/de.po
index 282cc9a..432266d 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,8 +95,8 @@ msgid "Quantity"
msgstr "Anzahl"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Name"
+msgid "Record Name"
+msgstr ""
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/es.po b/locale/es.po
index e3d889b..e07b5f8 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,8 +95,8 @@ msgid "Quantity"
msgstr "Cantidad"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Nombre"
+msgid "Record Name"
+msgstr "Nombre del registro"
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/es_419.po b/locale/es_419.po
index 523ed88..aa6ecd1 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,7 +95,7 @@ msgid "Quantity"
msgstr ""
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
+msgid "Record Name"
msgstr ""
msgctxt "field:purchase.request,state:"
diff --git a/locale/fr.po b/locale/fr.po
index f34e62d..662dccb 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,8 +95,8 @@ msgid "Quantity"
msgstr "Quantité"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Nom"
+msgid "Record Name"
+msgstr "Nom de l'enregistrement"
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index 5c9089a..304964d 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -101,10 +101,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr "Mennyiség"
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Név"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 0ed0b2c..12c0742 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -102,10 +102,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr "Quantità"
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Nome"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index d637895..d2f2b9f 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -93,7 +93,7 @@ msgid "Quantity"
msgstr ""
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
+msgid "Record Name"
msgstr ""
msgctxt "field:purchase.request,state:"
diff --git a/locale/lo.po b/locale/lo.po
index f83d346..aabec86 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -102,10 +102,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr "ຈຳນວນ"
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "ຊື່"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/locale/lt.po b/locale/lt.po
index 8955c89..aabc479 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -92,10 +92,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr ""
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Namu"
+msgid "Record Name"
+msgstr ""
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/nl.po b/locale/nl.po
index f40bcbd..e502d61 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -102,10 +102,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr "Hoeveelheid"
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Naam bijlage"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/locale/pl.po b/locale/pl.po
index d637895..69d1ff8 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -30,7 +30,7 @@ msgstr ""
msgctxt "field:purchase.request,company:"
msgid "Company"
-msgstr ""
+msgstr "Firma"
msgctxt "field:purchase.request,computed_quantity:"
msgid "Computed Quantity"
@@ -42,11 +42,11 @@ msgstr ""
msgctxt "field:purchase.request,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Data utworzenia"
msgctxt "field:purchase.request,create_uid:"
msgid "Create User"
-msgstr ""
+msgstr "Utworzył"
msgctxt "field:purchase.request,default_uom_digits:"
msgid "Default UOM Digits"
@@ -54,7 +54,7 @@ msgstr ""
msgctxt "field:purchase.request,description:"
msgid "Description"
-msgstr ""
+msgstr "Opis"
msgctxt "field:purchase.request,exception_ignored:"
msgid "Ignored Exception"
@@ -62,7 +62,7 @@ msgstr ""
msgctxt "field:purchase.request,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:purchase.request,origin:"
msgid "Origin"
@@ -70,35 +70,35 @@ msgstr ""
msgctxt "field:purchase.request,party:"
msgid "Party"
-msgstr ""
+msgstr "Strona"
msgctxt "field:purchase.request,product:"
msgid "Product"
-msgstr ""
+msgstr "Produkt"
msgctxt "field:purchase.request,purchase:"
msgid "Purchase"
-msgstr ""
+msgstr "Zakup"
msgctxt "field:purchase.request,purchase_date:"
msgid "Best Purchase Date"
-msgstr ""
+msgstr "Optymalna data zakupu"
msgctxt "field:purchase.request,purchase_line:"
msgid "Purchase Line"
-msgstr ""
+msgstr "Wiersz zakupu"
msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
-msgstr ""
+msgstr "Ilość"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr ""
+msgid "Record Name"
+msgstr "Nazwa rekordu"
msgctxt "field:purchase.request,state:"
msgid "State"
-msgstr ""
+msgstr "Stan"
msgctxt "field:purchase.request,stock_level:"
msgid "Stock at Supply Date"
@@ -106,86 +106,86 @@ msgstr ""
msgctxt "field:purchase.request,supply_date:"
msgid "Expected Supply Date"
-msgstr ""
+msgstr "Oczekiwana data dostawy"
msgctxt "field:purchase.request,uom:"
msgid "UOM"
-msgstr ""
+msgstr "Jm"
msgctxt "field:purchase.request,uom_digits:"
msgid "UOM Digits"
-msgstr ""
+msgstr "Cyfry jm"
msgctxt "field:purchase.request,warehouse:"
msgid "Warehouse"
-msgstr ""
+msgstr "Magazyn"
msgctxt "field:purchase.request,warehouse_required:"
msgid "Warehouse Required"
-msgstr ""
+msgstr "Wymagany magazyn"
msgctxt "field:purchase.request,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Data zapisu"
msgctxt "field:purchase.request,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Zapisał"
msgctxt "field:purchase.request.create_purchase.ask_party,company:"
msgid "Company"
-msgstr ""
+msgstr "Firma"
msgctxt "field:purchase.request.create_purchase.ask_party,description:"
msgid "Description"
-msgstr ""
+msgstr "Opis"
msgctxt "field:purchase.request.create_purchase.ask_party,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:purchase.request.create_purchase.ask_party,party:"
msgid "Supplier"
-msgstr ""
+msgstr "Dostawca"
msgctxt "field:purchase.request.create_purchase.ask_party,product:"
msgid "Product"
-msgstr ""
+msgstr "Produkt"
msgctxt "field:purchase.request.handle.purchase.cancellation.start,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "model:ir.action,name:act_purchase_request_form"
msgid "Purchase Requests"
-msgstr "Purchase Requests"
+msgstr ""
msgctxt "model:ir.action,name:wizard_create_purchase"
msgid "Create Purchase"
-msgstr "Create Purchase"
+msgstr "Utwórz zakup"
msgctxt "model:ir.action,name:wizard_purchase_cancellation_handle_exception"
msgid "Handle Purchase Cancellation"
-msgstr "Handle Purchase Cancellation"
+msgstr ""
msgctxt ""
"model:ir.action.act_window.domain,name:act_purchase_request_form_domain_all"
msgid "All"
-msgstr "All"
+msgstr "Wszystko"
msgctxt ""
"model:ir.action.act_window.domain,name:act_purchase_request_form_domain_draft"
msgid "Draft"
-msgstr "Draft"
+msgstr ""
msgctxt ""
"model:ir.action.act_window.domain,name:act_purchase_request_form_domain_exception"
msgid "Exception"
-msgstr "Exception"
+msgstr "Wyjątek"
msgctxt "model:ir.ui.menu,name:menu_purchase_request_form"
msgid "Purchase Requests"
-msgstr "Purchase Requests"
+msgstr ""
#, fuzzy
msgctxt "model:purchase.request,name:"
@@ -202,29 +202,28 @@ msgstr ""
msgctxt "model:res.group,name:group_purchase_request"
msgid "Purchase Request"
-msgstr "Purchase Request"
+msgstr ""
msgctxt "selection:purchase.request,state:"
msgid "Cancel"
-msgstr ""
+msgstr "Anuluj"
msgctxt "selection:purchase.request,state:"
msgid "Done"
-msgstr ""
+msgstr "Wykonano"
#, fuzzy
msgctxt "selection:purchase.request,state:"
msgid "Draft"
msgstr "Draft"
-#, fuzzy
msgctxt "selection:purchase.request,state:"
msgid "Exception"
-msgstr "Exception"
+msgstr "Wyjątek"
msgctxt "selection:purchase.request,state:"
msgid "Purchased"
-msgstr ""
+msgstr "Zakupiono"
msgctxt "view:purchase.request.handle.purchase.cancellation.start:"
msgid "Do you want to cancel the request or to reset it to draft?"
@@ -237,19 +236,19 @@ msgstr "Handle Purchase Cancellation"
msgctxt "view:purchase.request:"
msgid "Product Info"
-msgstr ""
+msgstr "Informacja o produkcie"
msgctxt "view:purchase.request:"
msgid "Supply Info"
-msgstr ""
+msgstr "Informacja o dostawie"
msgctxt "wizard_button:purchase.request.create_purchase,ask_party,end:"
msgid "Cancel"
-msgstr ""
+msgstr "Anuluj"
msgctxt "wizard_button:purchase.request.create_purchase,ask_party,start:"
msgid "Continue"
-msgstr ""
+msgstr "Kontynuuj"
msgctxt ""
"wizard_button:purchase.request.handle.purchase.cancellation,start,cancel_request:"
@@ -259,7 +258,7 @@ msgstr ""
msgctxt ""
"wizard_button:purchase.request.handle.purchase.cancellation,start,end:"
msgid "Cancel"
-msgstr ""
+msgstr "Anuluj"
msgctxt ""
"wizard_button:purchase.request.handle.purchase.cancellation,start,reset:"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 1187ff1..13c7737 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,8 +95,8 @@ msgid "Quantity"
msgstr "Quantidade"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Nome"
+msgid "Record Name"
+msgstr "Nome do Registro"
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/ru.po b/locale/ru.po
index bbd420e..5d93542 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -103,10 +103,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr "Кол-во"
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Правило оплаты"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/locale/sl.po b/locale/sl.po
index 2263714..0681cad 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -95,8 +95,8 @@ msgid "Quantity"
msgstr "Količina"
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "Ime"
+msgid "Record Name"
+msgstr ""
msgctxt "field:purchase.request,state:"
msgid "State"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index 4be4ae6..f472fca 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
@@ -96,10 +96,9 @@ msgctxt "field:purchase.request,quantity:"
msgid "Quantity"
msgstr ""
-#, fuzzy
msgctxt "field:purchase.request,rec_name:"
-msgid "Name"
-msgstr "纳木"
+msgid "Record Name"
+msgstr ""
#, fuzzy
msgctxt "field:purchase.request,state:"
diff --git a/purchase_request.py b/purchase_request.py
index 56a23ea..94d44aa 100644
--- a/purchase_request.py
+++ b/purchase_request.py
@@ -76,8 +76,7 @@ class PurchaseRequest(ModelSQL, ModelView):
('id', If(In('company', Eval('context', {})), '=', '!='),
Eval('context', {}).get('company', -1)),
])
- origin = fields.Reference('Origin', selection='get_origin', readonly=True,
- required=True)
+ origin = fields.Reference('Origin', selection='get_origin', readonly=True)
exception_ignored = fields.Boolean('Ignored Exception')
state = fields.Selection([
('purchased', "Purchased"),
@@ -161,6 +160,9 @@ class PurchaseRequest(ModelSQL, ModelView):
[state],
where=request.id == request_id))
+ # Migration from 4.4: remove required on origin
+ tablehandler.not_null_action('origin', action='remove')
+
def get_rec_name(self, name):
product_name = (self.product.name if self.product else
self.description.splitlines()[0])
@@ -194,7 +196,7 @@ class PurchaseRequest(ModelSQL, ModelView):
@classmethod
def search_purchase(cls, name, clause):
- return [('purchase_line.purchase',) + tuple(clause[1:])]
+ return [('purchase_line.' + clause[0],) + tuple(clause[1:])]
@property
def currency(self):
@@ -252,7 +254,7 @@ class PurchaseRequest(ModelSQL, ModelView):
models = IrModel.search([
('model', 'in', list(cls._get_origin())),
])
- return [(m.model, m.name) for m in models]
+ return [(None, '')] + [(m.model, m.name) for m in models]
@classmethod
def create(cls, vlist):
diff --git a/setup.py b/setup.py
index 9041698..dfda736 100644
--- a/setup.py
+++ b/setup.py
@@ -76,7 +76,7 @@ setup(name=name,
],
package_data={
'trytond.modules.purchase_request': (info.get('xml', [])
- + ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
+ + ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
@@ -104,9 +104,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 :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
diff --git a/tests/scenario_purchase_request.rst b/tests/scenario_purchase_request.rst
index cc03a83..c0e4b64 100644
--- a/tests/scenario_purchase_request.rst
+++ b/tests/scenario_purchase_request.rst
@@ -8,7 +8,7 @@ Imports::
>>> from dateutil.relativedelta import relativedelta
>>> from decimal import Decimal
>>> from proteus import Model, Wizard
- >>> from trytond.tests.tools import activate_modules
+ >>> from trytond.tests.tools import activate_modules, set_user
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
>>> from trytond.modules.account.tests.tools import (create_chart,
@@ -86,27 +86,26 @@ Create purchase user::
Create product::
- >>> config.user = product_admin_user.id
+ >>> set_user(product_admin_user)
>>> 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.purchasable = True
>>> template.account_expense = expense
+ >>> product, = template.products
+ >>> product.cost_price = Decimal('8')
>>> template.save()
- >>> product.template = template
- >>> product.save()
+ >>> product, = template.products
Get stock locations::
- >>> config.user = stock_admin_user.id
+ >>> set_user(stock_admin_user)
>>> Location = Model.get('stock.location')
>>> warehouse_loc, = Location.find([('code', '=', 'WH')])
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
@@ -116,7 +115,7 @@ Get stock locations::
Create a need for missing product::
- >>> config.user = stock_user.id
+ >>> set_user(stock_user)
>>> ShipmentOut = Model.get('stock.shipment.out')
>>> shipment_out = ShipmentOut()
>>> shipment_out.planned_date = today
@@ -148,7 +147,7 @@ Create the purchase request::
There is now a draft purchase request::
- >>> config.user = purchase_user.id
+ >>> set_user(purchase_user)
>>> pr, = PurchaseRequest.find([('state', '=', 'draft')])
>>> pr.product == product
True
@@ -207,7 +206,7 @@ Re-create the purchase request::
Create a second purchase request manually::
- >>> config.user = 1 # admin
+ >>> set_user(1) # admin
>>> pr = PurchaseRequest()
>>> pr.product = product
>>> pr.quantity = 1
@@ -218,7 +217,7 @@ Create a second purchase request manually::
There is now 2 draft purchase requests::
- >>> config.user = purchase_user.id
+ >>> set_user(purchase_user)
>>> prs = PurchaseRequest.find([('state', '=', 'draft')])
>>> len(prs)
2
@@ -245,7 +244,7 @@ Create the purchase with a unique line::
Create a purchase request without product::
- >>> config.user = 1 # admin
+ >>> set_user(1) # admin
>>> pr = PurchaseRequest()
>>> pr.description = "Custom product"
>>> pr.quantity = 1
@@ -268,3 +267,10 @@ Create the purchase without product::
>>> pr.purchase_line.unit
>>> pr.purchase_line.unit_price
Decimal('0.0000')
+
+It's not possible to delete a purchase linked to a purchase_request::
+
+ >>> pr.purchase_line.purchase.delete() # doctest: +IGNORE_EXCEPTION_DETAIL
+ Traceback (most recent call last):
+ ...
+ UserError: ...
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..527d859
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+ {py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
+ pypy-postgresql: psycopg2cffi >= 2.5
+ mysql: MySQL-python
+ sqlite: sqlitebck
+setenv =
+ sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
+ postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
+ mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
+ sqlite: DB_NAME={env:SQLITE_NAME::memory:}
+ postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
+ mysql: DB_NAME={env:MYSQL_NAME:test}
+install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
diff --git a/tryton.cfg b/tryton.cfg
index da0fb67..edd52de 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.4.2
+version=4.6.0
depends:
ir
purchase
diff --git a/trytond_purchase_request.egg-info/PKG-INFO b/trytond_purchase_request.egg-info/PKG-INFO
index 3d4d7bf..cf94ae6 100644
--- a/trytond_purchase_request.egg-info/PKG-INFO
+++ b/trytond_purchase_request.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-purchase-request
-Version: 4.4.2
+Version: 4.6.0
Summary: Tryton module for purchase requests
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.4/
+Download-URL: http://downloads.tryton.org/4.6/
Description: trytond_purchase_request
========================
@@ -69,9 +69,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 :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/trytond_purchase_request.egg-info/SOURCES.txt b/trytond_purchase_request.egg-info/SOURCES.txt
index 0c73283..a7e4870 100644
--- a/trytond_purchase_request.egg-info/SOURCES.txt
+++ b/trytond_purchase_request.egg-info/SOURCES.txt
@@ -1,12 +1,19 @@
+.drone.yml
+.hgtags
CHANGELOG
COPYRIGHT
INSTALL
LICENSE
MANIFEST.in
README
+__init__.py
+party.py
+purchase.py
purchase.xml
+purchase_request.py
purchase_request.xml
setup.py
+tox.ini
tryton.cfg
./__init__.py
./party.py
@@ -60,7 +67,9 @@ locale/pt_BR.po
locale/ru.po
locale/sl.po
locale/zh_CN.po
+tests/__init__.py
tests/scenario_purchase_request.rst
+tests/test_purchase_request.py
trytond_purchase_request.egg-info/PKG-INFO
trytond_purchase_request.egg-info/SOURCES.txt
trytond_purchase_request.egg-info/dependency_links.txt
diff --git a/trytond_purchase_request.egg-info/requires.txt b/trytond_purchase_request.egg-info/requires.txt
index 278f8b3..d8f81cd 100644
--- a/trytond_purchase_request.egg-info/requires.txt
+++ b/trytond_purchase_request.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_purchase >= 4.4, < 4.5
-trytond_product >= 4.4, < 4.5
-trytond >= 4.4, < 4.5
+trytond_purchase >= 4.6, < 4.7
+trytond_product >= 4.6, < 4.7
+trytond >= 4.6, < 4.7
--
tryton-modules-purchase-request
More information about the tryton-debian-vcs
mailing list