mirror of
https://github.com/NaN-tic/trytond-commission_manager.git
synced 2023-12-14 04:03:00 +01:00
update to 4.7
This commit is contained in:
parent
ab3127d1d3
commit
124f7e5fbb
9 changed files with 103 additions and 50 deletions
64
.drone.yml
64
.drone.yml
|
@ -1,9 +1,57 @@
|
||||||
image: python:all
|
clone:
|
||||||
env:
|
hg:
|
||||||
- POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
|
image: plugins/hg
|
||||||
- MYSQL_URI=mysql://root@127.0.0.1:3306/
|
|
||||||
script:
|
pipeline:
|
||||||
- pip install tox sqlitebck
|
tox:
|
||||||
- tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
|
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}"
|
||||||
|
notify:
|
||||||
|
image: drillster/drone-email
|
||||||
|
from: drone@localhost
|
||||||
|
host: smtp
|
||||||
|
port: 25
|
||||||
|
skip_verify: true
|
||||||
|
when:
|
||||||
|
status: [ changed, failure ]
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- postgres
|
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
|
||||||
|
|
59
setup.py
59
setup.py
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# This file is part commission_manager module for Tryton.
|
# encoding: utf-8
|
||||||
# The COPYRIGHT file at the top level of this repository contains
|
|
||||||
# the full copyright notices and license terms.
|
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
import re
|
import re
|
||||||
|
@ -12,6 +10,8 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ConfigParser import ConfigParser
|
from ConfigParser import ConfigParser
|
||||||
|
|
||||||
|
MODULE = 'commission_manager'
|
||||||
|
PREFIX = 'nantic'
|
||||||
MODULE2PREFIX = {}
|
MODULE2PREFIX = {}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,12 +36,11 @@ info = dict(config.items('tryton'))
|
||||||
for key in ('depends', 'extras_depend', 'xml'):
|
for key in ('depends', 'extras_depend', 'xml'):
|
||||||
if key in info:
|
if key in info:
|
||||||
info[key] = info[key].strip().splitlines()
|
info[key] = info[key].strip().splitlines()
|
||||||
|
|
||||||
version = info.get('version', '0.0.1')
|
version = info.get('version', '0.0.1')
|
||||||
major_version, minor_version, _ = version.split('.', 2)
|
major_version, minor_version, _ = version.split('.', 2)
|
||||||
major_version = int(major_version)
|
major_version = int(major_version)
|
||||||
minor_version = int(minor_version)
|
minor_version = int(minor_version)
|
||||||
name = 'nantic_commission_manager'
|
|
||||||
download_url = 'https://bitbucket.org/nantic/trytond-commission_manager'
|
|
||||||
|
|
||||||
requires = []
|
requires = []
|
||||||
for dep in info.get('depends', []):
|
for dep in info.get('depends', []):
|
||||||
|
@ -50,30 +49,38 @@ for dep in info.get('depends', []):
|
||||||
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
||||||
requires.append(get_require_version('trytond'))
|
requires.append(get_require_version('trytond'))
|
||||||
|
|
||||||
tests_require = [get_require_version('proteus')]
|
tests_require = [
|
||||||
|
get_require_version('proteus'),
|
||||||
|
]
|
||||||
|
|
||||||
|
series = '%s.%s' % (major_version, minor_version)
|
||||||
|
if minor_version % 2:
|
||||||
|
branch = 'default'
|
||||||
|
else:
|
||||||
|
branch = series
|
||||||
|
|
||||||
dependency_links = []
|
dependency_links = []
|
||||||
|
|
||||||
if minor_version % 2:
|
if minor_version % 2:
|
||||||
# Add development index for testing with proteus
|
# Add development index for testing with proteus
|
||||||
dependency_links.append('https://trydevpi.tryton.org/')
|
dependency_links.append('https://trydevpi.tryton.org/')
|
||||||
|
|
||||||
setup(name=name,
|
setup(name='%s_%s' % (PREFIX, MODULE),
|
||||||
version=version,
|
version=version,
|
||||||
description='Tryton Tryton Commission Manager Module',
|
description='',
|
||||||
long_description=read('README'),
|
long_description=read('README'),
|
||||||
author='NaN-TIC',
|
author='NaN·tic',
|
||||||
author_email='info@nan-tic.com',
|
author_email='info@nan-tic.com',
|
||||||
url='https://bitbucket.org/nantic/',
|
url='http://www.nan-tic.com/',
|
||||||
download_url=download_url,
|
download_url="https://bitbucket.org/nantic/trytond-%s" % MODULE,
|
||||||
keywords='',
|
package_dir={'trytond.modules.%s' % MODULE: '.'},
|
||||||
package_dir={'trytond.modules.commission_manager': '.'},
|
|
||||||
packages=[
|
packages=[
|
||||||
'trytond.modules.commission_manager',
|
'trytond.modules.%s' % MODULE,
|
||||||
'trytond.modules.commission_manager.tests',
|
'trytond.modules.%s.tests' % MODULE,
|
||||||
],
|
],
|
||||||
package_data={
|
package_data={
|
||||||
'trytond.modules.commission_manager': (info.get('xml', [])
|
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
||||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
|
+ ['tryton.cfg', 'locale/*.po', 'tests/*.rst']),
|
||||||
'icons/*.svg', 'tests/*.rst']),
|
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
@ -83,14 +90,20 @@ setup(name=name,
|
||||||
'Intended Audience :: Financial and Insurance Industry',
|
'Intended Audience :: Financial and Insurance Industry',
|
||||||
'Intended Audience :: Legal Industry',
|
'Intended Audience :: Legal Industry',
|
||||||
'License :: OSI Approved :: GNU General Public License (GPL)',
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||||
|
'Natural Language :: Bulgarian',
|
||||||
'Natural Language :: Catalan',
|
'Natural Language :: Catalan',
|
||||||
|
'Natural Language :: Czech',
|
||||||
|
'Natural Language :: Dutch',
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
|
'Natural Language :: French',
|
||||||
|
'Natural Language :: German',
|
||||||
|
'Natural Language :: Russian',
|
||||||
'Natural Language :: Spanish',
|
'Natural Language :: Spanish',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Programming Language :: Python :: 3.3',
|
|
||||||
'Programming Language :: Python :: 3.4',
|
'Programming Language :: Python :: 3.4',
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
|
'Programming Language :: Python :: 3.6',
|
||||||
'Programming Language :: Python :: Implementation :: CPython',
|
'Programming Language :: Python :: Implementation :: CPython',
|
||||||
'Programming Language :: Python :: Implementation :: PyPy',
|
'Programming Language :: Python :: Implementation :: PyPy',
|
||||||
'Topic :: Office/Business',
|
'Topic :: Office/Business',
|
||||||
|
@ -101,11 +114,13 @@ setup(name=name,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
entry_points="""
|
entry_points="""
|
||||||
[trytond.modules]
|
[trytond.modules]
|
||||||
commission_manager = trytond.modules.commission_manager
|
%s = trytond.modules.%s
|
||||||
""",
|
""" % (MODULE, MODULE),
|
||||||
test_suite='tests',
|
test_suite='tests',
|
||||||
test_loader='trytond.test_loader:Loader',
|
test_loader='trytond.test_loader:Loader',
|
||||||
tests_require=tests_require,
|
tests_require=tests_require,
|
||||||
use_2to3=True,
|
use_2to3=True,
|
||||||
convert_2to3_doctests=['tests/scenario_commission_manager.rst'],
|
convert_2to3_doctests=[
|
||||||
|
'tests/scenario_commision_manager.rst',
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,23 +10,16 @@ Imports::
|
||||||
>>> from proteus import config, Model, Wizard
|
>>> from proteus import config, Model, Wizard
|
||||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||||
... get_company
|
... get_company
|
||||||
|
>>> from trytond.tests.tools import activate_modules
|
||||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
|
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
|
||||||
... create_chart, get_accounts, create_tax, set_tax_code
|
... create_chart, get_accounts, create_tax
|
||||||
>>> from trytond.modules.account_invoice.tests.tools import \
|
>>> from trytond.modules.account_invoice.tests.tools import \
|
||||||
... set_fiscalyear_invoice_sequences, create_payment_term
|
... set_fiscalyear_invoice_sequences, create_payment_term
|
||||||
>>> today = datetime.date.today()
|
>>> today = datetime.date.today()
|
||||||
|
|
||||||
Create database::
|
Install product_cost_plan Module::
|
||||||
|
|
||||||
>>> config = config.set_trytond()
|
>>> config = activate_modules('commission_manager')
|
||||||
>>> config.pool.test = True
|
|
||||||
|
|
||||||
Install commission::
|
|
||||||
|
|
||||||
>>> Module = Model.get('ir.module')
|
|
||||||
>>> module, = Module.find([('name', '=', 'commission_manager')])
|
|
||||||
>>> module.click('install')
|
|
||||||
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
|
|
||||||
|
|
||||||
Create company::
|
Create company::
|
||||||
|
|
||||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,18 +1,15 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
envlist = {py27,py34,py35,py36}-{sqlite,postgresql},pypy-{sqlite,postgresql}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands = {envpython} setup.py test
|
commands = {envpython} setup.py test
|
||||||
deps =
|
deps =
|
||||||
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
|
{py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
|
||||||
pypy-postgresql: psycopg2cffi >= 2.5
|
pypy-postgresql: psycopg2cffi >= 2.5
|
||||||
mysql: MySQL-python
|
|
||||||
sqlite: sqlitebck
|
sqlite: sqlitebck
|
||||||
setenv =
|
setenv =
|
||||||
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
|
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
|
||||||
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
|
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
|
||||||
mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
|
|
||||||
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
|
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
|
||||||
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
|
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
|
||||||
mysql: DB_NAME={env:MYSQL_NAME:test}
|
install_command = pip install --pre --process-dependency-links {opts} {packages}
|
||||||
install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=4.0.0
|
version=4.7.0
|
||||||
depends:
|
depends:
|
||||||
ir
|
ir
|
||||||
commission
|
commission
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<form string="Manager">
|
<form>
|
||||||
<label name="agent"/>
|
<label name="agent"/>
|
||||||
<field name="agent"/>
|
<field name="agent"/>
|
||||||
<label name="company"/>
|
<label name="company"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<tree string="Managers">
|
<tree>
|
||||||
<field name="agent"/>
|
<field name="agent"/>
|
||||||
<field name="company"/>
|
<field name="company"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
|
Loading…
Reference in a new issue