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
|
||||
env:
|
||||
- POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
|
||||
- MYSQL_URI=mysql://root@127.0.0.1:3306/
|
||||
script:
|
||||
- pip install tox sqlitebck
|
||||
- tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
|
||||
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}"
|
||||
notify:
|
||||
image: drillster/drone-email
|
||||
from: drone@localhost
|
||||
host: smtp
|
||||
port: 25
|
||||
skip_verify: true
|
||||
when:
|
||||
status: [ changed, failure ]
|
||||
|
||||
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
|
||||
# This file is part commission_manager module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
# encoding: utf-8
|
||||
|
||||
from setuptools import setup
|
||||
import re
|
||||
|
@ -12,6 +10,8 @@ try:
|
|||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
MODULE = 'commission_manager'
|
||||
PREFIX = 'nantic'
|
||||
MODULE2PREFIX = {}
|
||||
|
||||
|
||||
|
@ -36,12 +36,11 @@ info = dict(config.items('tryton'))
|
|||
for key in ('depends', 'extras_depend', 'xml'):
|
||||
if key in info:
|
||||
info[key] = info[key].strip().splitlines()
|
||||
|
||||
version = info.get('version', '0.0.1')
|
||||
major_version, minor_version, _ = version.split('.', 2)
|
||||
major_version = int(major_version)
|
||||
minor_version = int(minor_version)
|
||||
name = 'nantic_commission_manager'
|
||||
download_url = 'https://bitbucket.org/nantic/trytond-commission_manager'
|
||||
|
||||
requires = []
|
||||
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('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 = []
|
||||
|
||||
if minor_version % 2:
|
||||
# Add development index for testing with proteus
|
||||
dependency_links.append('https://trydevpi.tryton.org/')
|
||||
|
||||
setup(name=name,
|
||||
setup(name='%s_%s' % (PREFIX, MODULE),
|
||||
version=version,
|
||||
description='Tryton Tryton Commission Manager Module',
|
||||
description='',
|
||||
long_description=read('README'),
|
||||
author='NaN-TIC',
|
||||
author='NaN·tic',
|
||||
author_email='info@nan-tic.com',
|
||||
url='https://bitbucket.org/nantic/',
|
||||
download_url=download_url,
|
||||
keywords='',
|
||||
package_dir={'trytond.modules.commission_manager': '.'},
|
||||
url='http://www.nan-tic.com/',
|
||||
download_url="https://bitbucket.org/nantic/trytond-%s" % MODULE,
|
||||
package_dir={'trytond.modules.%s' % MODULE: '.'},
|
||||
packages=[
|
||||
'trytond.modules.commission_manager',
|
||||
'trytond.modules.commission_manager.tests',
|
||||
'trytond.modules.%s' % MODULE,
|
||||
'trytond.modules.%s.tests' % MODULE,
|
||||
],
|
||||
package_data={
|
||||
'trytond.modules.commission_manager': (info.get('xml', [])
|
||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
|
||||
'icons/*.svg', 'tests/*.rst']),
|
||||
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
||||
+ ['tryton.cfg', 'locale/*.po', 'tests/*.rst']),
|
||||
},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
|
@ -83,14 +90,20 @@ setup(name=name,
|
|||
'Intended Audience :: Financial and Insurance Industry',
|
||||
'Intended Audience :: Legal Industry',
|
||||
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||
'Natural Language :: Bulgarian',
|
||||
'Natural Language :: Catalan',
|
||||
'Natural Language :: Czech',
|
||||
'Natural Language :: Dutch',
|
||||
'Natural Language :: English',
|
||||
'Natural Language :: French',
|
||||
'Natural Language :: German',
|
||||
'Natural Language :: Russian',
|
||||
'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',
|
||||
|
@ -101,11 +114,13 @@ setup(name=name,
|
|||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
commission_manager = trytond.modules.commission_manager
|
||||
""",
|
||||
%s = trytond.modules.%s
|
||||
""" % (MODULE, MODULE),
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
tests_require=tests_require,
|
||||
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 trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> 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 \
|
||||
... set_fiscalyear_invoice_sequences, create_payment_term
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Create database::
|
||||
Install product_cost_plan Module::
|
||||
|
||||
>>> config = config.set_trytond()
|
||||
>>> 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')
|
||||
>>> config = activate_modules('commission_manager')
|
||||
|
||||
Create company::
|
||||
|
||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,18 +1,15 @@
|
|||
[tox]
|
||||
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
||||
envlist = {py27,py34,py35,py36}-{sqlite,postgresql},pypy-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands = {envpython} setup.py test
|
||||
deps =
|
||||
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
|
||||
{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}
|
||||
install_command = pip install --pre --process-dependency-links {opts} {packages}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=4.0.0
|
||||
version=4.7.0
|
||||
depends:
|
||||
ir
|
||||
commission
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Manager">
|
||||
<form>
|
||||
<label name="agent"/>
|
||||
<field name="agent"/>
|
||||
<label name="company"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Managers">
|
||||
<tree>
|
||||
<field name="agent"/>
|
||||
<field name="company"/>
|
||||
</tree>
|
||||
|
|
Loading…
Reference in a new issue