[tryton-debian-vcs] tryton-modules-account-tax-rule-country branch upstream updated. upstream/4.4.0-1-gaa1570d
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Fri Nov 10 12:08:28 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-account-tax-rule-country.git;a=commitdiff;h=upstream/4.4.0-1-gaa1570d
commit aa1570de233201ed3c264b6ffa44a4568878034c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Nov 6 14:40:34 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 a8969ee..fb41ee5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.6.0 - 2017-10-30
+* Bug fixes (see mercurial logs for details)
+* Add support for stock_consigment
+
Version 4.4.0 - 2017-05-01
* Bug fixes (see mercurial logs for details)
@@ -12,4 +16,4 @@ Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
Version 3.6.0 - 2015-04-20
-* Initial release
\ No newline at end of file
+* Initial release
diff --git a/PKG-INFO b/PKG-INFO
index 9cc5aee..04b1854 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_account_tax_rule_country
-Version: 4.4.0
+Version: 4.6.0
Summary: Tryton module to add countries on tax rules
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_account_tax_rule_country
================================
@@ -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/__init__.py b/__init__.py
index c3c0584..76e1176 100644
--- a/__init__.py
+++ b/__init__.py
@@ -5,6 +5,7 @@ from trytond.pool import Pool
from .account import *
from .sale import *
from .purchase import *
+from . import stock
def register():
@@ -15,4 +16,5 @@ def register():
Sale,
SaleLine,
PurchaseLine,
+ stock.Move,
module='account_tax_rule_country', type_='model')
diff --git a/doc/index.rst b/doc/index.rst
index e1268d4..1c97480 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -23,3 +23,10 @@ The countries are picked from the origin document:
- The origin country comes from the invoice address.
- The destination country comes from the address of the warehouse.
+
+- Stock Consignment:
+
+ - The origin country comes from the warehouse's address of the location or
+ the delivery address for returned customer shipment.
+ - The destination country comes from the warehouse's address of the location
+ or the delivery address for customer shipment.
diff --git a/locale/bg.po b/locale/bg.po
index ede2b7a..8268e28 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/ca.po b/locale/ca.po
index a928ec5..cb63924 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/cs.po b/locale/cs.po
index ede2b7a..8268e28 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/de.po b/locale/de.po
index 92bd894..5360df8 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/es.po b/locale/es.po
index 9bd3402..14378d2 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/es_419.po b/locale/es_419.po
index ede2b7a..8268e28 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"
diff --git a/locale/fr.po b/locale/fr.po
index d682aa2..1b8aa3e 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index ede2b7a..8268e28 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"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 30a5580..4efdded 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"
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index ede2b7a..8268e28 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"
diff --git a/locale/lo.po b/locale/lo.po
index c92d0aa..9d3d49d 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/lt.po b/locale/lt.po
index ede2b7a..8268e28 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/nl.po b/locale/nl.po
index ede2b7a..8268e28 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/pl.po b/locale/pl.po
index bcbed9d..2eb4b47 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 9c764f1..e555e8e 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"
diff --git a/locale/ru.po b/locale/ru.po
index ede2b7a..8268e28 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/sl.po b/locale/sl.po
index 65aa1fd..c2bf0a7 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -1,4 +1,4 @@
-#
+#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index ede2b7a..8268e28 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"
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..8bfd5a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff --git a/setup.py b/setup.py
index 8f4b827..236f1dc 100644
--- a/setup.py
+++ b/setup.py
@@ -96,9 +96,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/stock.py b/stock.py
new file mode 100644
index 0000000..8aa02c8
--- /dev/null
+++ b/stock.py
@@ -0,0 +1,32 @@
+# 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 trytond.pool import PoolMeta, Pool
+
+
+class Move:
+ __metaclass__ = PoolMeta
+ __name__ = 'stock.move'
+
+ def _get_tax_rule_pattern(self):
+ pool = Pool()
+ ShipmentOut = pool.get('stock.shipment.out')
+ ShipmentOutReturn = pool.get('stock.shipment.out.return')
+
+ pattern = super(Move, self)._get_tax_rule_pattern()
+
+ from_country, to_country = None, None
+ if self.from_location.warehouse:
+ if self.from_location.warehouse.address:
+ from_country = self.from_location.warehouse.address.country
+ elif isinstance(self.origin, ShipmentOutReturn):
+ from_country = self.origin.delivery_address.country
+ if self.to_location.warehouse:
+ if self.to_location.warehouse.address:
+ to_country = self.to_location.warehouse.address.country
+ elif isinstance(self.origin, ShipmentOut):
+ to_country = self.origin.delivery_address.country
+
+ pattern['from_country'] = from_country.id if from_country else None
+ pattern['to_country'] = to_country.id if to_country else None
+ return pattern
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 de89549..00da071 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.4.0
+version=4.6.0
depends:
account
country
@@ -7,5 +7,6 @@ extras_depend:
account_invoice
purchase
sale
+ stock_consignment
xml:
account.xml
diff --git a/trytond_account_tax_rule_country.egg-info/PKG-INFO b/trytond_account_tax_rule_country.egg-info/PKG-INFO
index 06e2b44..60e1efb 100644
--- a/trytond_account_tax_rule_country.egg-info/PKG-INFO
+++ b/trytond_account_tax_rule_country.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-account-tax-rule-country
-Version: 4.4.0
+Version: 4.6.0
Summary: Tryton module to add countries on tax rules
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_account_tax_rule_country
================================
@@ -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_account_tax_rule_country.egg-info/SOURCES.txt b/trytond_account_tax_rule_country.egg-info/SOURCES.txt
index 9232e45..bd5f991 100644
--- a/trytond_account_tax_rule_country.egg-info/SOURCES.txt
+++ b/trytond_account_tax_rule_country.egg-info/SOURCES.txt
@@ -1,17 +1,26 @@
+.drone.yml
+.hgtags
CHANGELOG
COPYRIGHT
INSTALL
LICENSE
MANIFEST.in
README
+__init__.py
+account.py
account.xml
+purchase.py
+sale.py
setup.py
+stock.py
+tox.ini
tryton.cfg
./__init__.py
./account.py
./account.xml
./purchase.py
./sale.py
+./stock.py
./tryton.cfg
./locale/bg.po
./locale/ca.po
@@ -57,6 +66,8 @@ locale/pt_BR.po
locale/ru.po
locale/sl.po
locale/zh_CN.po
+tests/__init__.py
+tests/test_account_tax_rule_country.py
trytond_account_tax_rule_country.egg-info/PKG-INFO
trytond_account_tax_rule_country.egg-info/SOURCES.txt
trytond_account_tax_rule_country.egg-info/dependency_links.txt
diff --git a/trytond_account_tax_rule_country.egg-info/requires.txt b/trytond_account_tax_rule_country.egg-info/requires.txt
index 4be71d6..fa683e1 100644
--- a/trytond_account_tax_rule_country.egg-info/requires.txt
+++ b/trytond_account_tax_rule_country.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_account >= 4.4, < 4.5
-trytond_country >= 4.4, < 4.5
-trytond >= 4.4, < 4.5
+trytond_account >= 4.6, < 4.7
+trytond_country >= 4.6, < 4.7
+trytond >= 4.6, < 4.7
--
tryton-modules-account-tax-rule-country
More information about the tryton-debian-vcs
mailing list