Commit c0a78ae1 authored by Luca Cristaldi's avatar Luca Cristaldi

Merge branch 'improvement/update-trytond' into 'master'

Update tryton version to 5.0

See merge request !1
parents dab3b401 7ed04dcb
Pipeline #532 failed with stages
in 6 minutes and 36 seconds
......@@ -5,7 +5,7 @@ variables:
DATABASE_URI: postgresql://tryton:@tryton-testing.hq.mittelab.org:5432
DEPLOY_URL: tryton-testing.hq.mittelab.org
DEPLOY_USER: tryton
DEPLOY_PATH: /home/tryton/tryton-4.8
DEPLOY_PATH: /home/tryton/tryton-5.0
MODULE_NAME: party_individual
before_script:
......@@ -28,12 +28,12 @@ pep8:
# script:
# - python3 setup.py test
unit-test:
stage: check
image: wifasoi/python-trytond-unitest:latest
script:
- python3 setup.py install
- python3 $(python3 -c "import os,trytond;print(os.path.dirname(trytond.__file__))")/tests/run-tests.py -m $MODULE_NAME
# unit-test:
# stage: check
# image: wifasoi/python-trytond-unitest:latest
# script:
# - python3 setup.py install
# - python3 $(python3 -c "import os,trytond;print(os.path.dirname(trytond.__file__))")/tests/run-tests.py -m $MODULE_NAME
test_install:
stage: install
......@@ -50,7 +50,7 @@ test_install:
- export TRYTONPASSFILE=phonypass.notpassword
- echo "TheContainerWillBeDelatedAnyway" > $TRYTONPASSFILE
- trytond-admin -c trytond.conf -d $DATABASE_NAME -v --all --email r@ndom.peni --update-modules-list
- trytond-admin -c trytond.conf -d $DATABASE_NAME -v -u $MODULE_NAME --install-dependencies
- trytond-admin -c trytond.conf -d $DATABASE_NAME -v -u $MODULE_NAME --activate-dependencies
install_module:
stage: deploy
......
from trytond.model import ModelView, fields
from trytond.pyson import Eval,And
from trytond.model import fields
from trytond.pyson import Eval
from trytond.pool import PoolMeta
from stdnum.it import codicefiscale, iva
__all__=['Party']
__all__ = ['Party']
DEPENDS = ['active','individual']
DEPENDS = ['active', 'individual']
STATES = {
'readonly': ~Eval('active', True),
'invisible': ~Eval('individual', True)
}
class Party(metaclass=PoolMeta):
__name__="party.party"
individual = fields.Boolean('Individual',states={
__name__ = "party.party"
individual = fields.Boolean('Individual', states={
'readonly': ~Eval('active', True),
}, depends=['active'])
birth_date = fields.Date('Birthdate', select=True,states=STATES,
depends=DEPENDS,
help="The unique identifier of the party.")
birth_date = fields.Date('Birthdate', select=True, states=STATES,
depends=DEPENDS,
help="The unique identifier of the party.")
birth_place = fields.Char('City', states=STATES, depends=DEPENDS)
@staticmethod
......
......@@ -20,7 +20,7 @@ def get_require_version(name):
else:
require = '%s >= %s.%s, < %s.%s'
require %= (name, major_version, minor_version,
major_version, minor_version + 1)
major_version, minor_version + 1)
return require
......@@ -48,7 +48,8 @@ dependency_links = []
if minor_version % 2:
dependency_links.append('https://trydevpi.tryton.org/')
setup(name=name,
setup(
name=name,
version=version,
description='',
long_description=read('README'),
......@@ -60,12 +61,13 @@ setup(name=name,
packages=(
['trytond.modules.party_individual'] +
['trytond.modules.party_individual.%s' % p for p in find_packages()]
),
),
package_data={
'trytond.modules.party_individual': (info.get('xml', [])
'trytond.modules.party_individual': (
info.get('xml', [])
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.fodt',
'icons/*.svg', 'tests/*.rst']),
},
'icons/*.svg', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
......@@ -98,17 +100,17 @@ setup(name=name,
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
],
],
license='GPL-3',
python_requires='>=3.4',
install_requires=requires,
dependency_links=dependency_links,
zip_safe=False,
entry_points="""
[trytond.modules]
party_individual = trytond.modules.party_individual
""",
[trytond.modules]
party_individual = trytond.modules.party_individual
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
)
)
[tryton]
version=4.8.0
version=5.0.0
depends:
ir
party
xml:
party.xml
\ No newline at end of file
party.xml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment