parent
4f7f76afb9
commit
3e06894454
12
.drone.yml
12
.drone.yml
|
@ -38,18 +38,6 @@ matrix:
|
||||||
- IMAGE: python:2.7
|
- IMAGE: python:2.7
|
||||||
TOXENV: py27
|
TOXENV: py27
|
||||||
DATABASE: postgresql
|
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
|
- IMAGE: python:3.6
|
||||||
TOXENV: py36
|
TOXENV: py36
|
||||||
DATABASE: sqlite
|
DATABASE: sqlite
|
||||||
|
|
|
@ -38,3 +38,8 @@ class SaleCost(ApplyMethodCostDocumentMixin):
|
||||||
super(SaleCost, self).on_change_template()
|
super(SaleCost, self).on_change_template()
|
||||||
if self.template:
|
if self.template:
|
||||||
self.invoice_party = self.template.invoice_party
|
self.invoice_party = self.template.invoice_party
|
||||||
|
|
||||||
|
def on_change_type_(self):
|
||||||
|
super(SaleCost, self).on_change_type_()
|
||||||
|
if self.type_:
|
||||||
|
self.invoice_party = self.type_.invoice_party
|
||||||
|
|
36
setup.py
36
setup.py
|
@ -46,33 +46,41 @@ minor_version = int(minor_version)
|
||||||
name = 'datalife_sale_cost_apply_invoice'
|
name = 'datalife_sale_cost_apply_invoice'
|
||||||
download_url = 'https://bitbucket.org/datalife_sco/trytond-sale_cost_apply_invoice'
|
download_url = 'https://bitbucket.org/datalife_sco/trytond-sale_cost_apply_invoice'
|
||||||
|
|
||||||
requires = []
|
|
||||||
for dep in info.get('depends', []):
|
|
||||||
if not re.match(r'(ir|res)(\W|$)', dep):
|
|
||||||
prefix = MODULE2PREFIX.get(dep, 'trytond')
|
|
||||||
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
|
||||||
requires.append(get_require_version('trytond'))
|
|
||||||
|
|
||||||
tests_require = [get_require_version('proteus')]
|
|
||||||
series = '%s.%s' % (major_version, minor_version)
|
series = '%s.%s' % (major_version, minor_version)
|
||||||
if minor_version % 2:
|
if minor_version % 2:
|
||||||
branch = 'default'
|
branch = 'default'
|
||||||
else:
|
else:
|
||||||
branch = series
|
branch = series
|
||||||
dependency_links = [
|
dependency_links = {
|
||||||
('hg+https://bitbucket.org/datalife_sco/'
|
'sale_cost':
|
||||||
|
'hg+https://bitbucket.org/datalife_sco/'
|
||||||
'trytond-sale_cost@%(branch)s'
|
'trytond-sale_cost@%(branch)s'
|
||||||
'#egg=datalife_sale_cost-%(series)s' % {
|
'#egg=datalife_sale_cost-%(series)s' % {
|
||||||
'branch': branch,
|
'branch': branch,
|
||||||
'series': series,
|
'series': series,
|
||||||
}),
|
},
|
||||||
('hg+https://bitbucket.org/datalife_sco/'
|
'document_cost_apply_invoice':
|
||||||
|
'hg+https://bitbucket.org/datalife_sco/'
|
||||||
'trytond-document_cost_apply_invoice@%(branch)s'
|
'trytond-document_cost_apply_invoice@%(branch)s'
|
||||||
'#egg=datalife_document_cost_apply_invoice-%(series)s' % {
|
'#egg=datalife_document_cost_apply_invoice-%(series)s' % {
|
||||||
'branch': branch,
|
'branch': branch,
|
||||||
'series': series,
|
'series': series,
|
||||||
}),
|
},
|
||||||
]
|
}
|
||||||
|
|
||||||
|
requires = []
|
||||||
|
for dep in info.get('depends', []):
|
||||||
|
if not re.match(r'(ir|res)(\W|$)', dep):
|
||||||
|
prefix = MODULE2PREFIX.get(dep, 'trytond')
|
||||||
|
req = get_require_version('%s_%s' % (prefix, dep))
|
||||||
|
if dep in dependency_links:
|
||||||
|
req = '%s_%s @ %s' % (prefix, dep, dependency_links[dep])
|
||||||
|
requires.append(req)
|
||||||
|
requires.append(get_require_version('trytond'))
|
||||||
|
|
||||||
|
tests_require = [get_require_version('proteus')]
|
||||||
|
|
||||||
|
dependency_links = list(dependency_links.values())
|
||||||
if minor_version % 2:
|
if minor_version % 2:
|
||||||
dependency_links.append('https://trydevpi.tryton.org/')
|
dependency_links.append('https://trydevpi.tryton.org/')
|
||||||
|
|
||||||
|
|
6
tox.ini
6
tox.ini
|
@ -1,10 +1,10 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
envlist = {py27,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands = {envpython} setup.py test
|
commands = {envpython} setup.py test
|
||||||
deps =
|
deps =
|
||||||
{py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
|
{py27,py36}-postgresql: psycopg2 >= 2.5
|
||||||
pypy-postgresql: psycopg2cffi >= 2.5
|
pypy-postgresql: psycopg2cffi >= 2.5
|
||||||
mysql: MySQL-python
|
mysql: MySQL-python
|
||||||
sqlite: sqlitebck
|
sqlite: sqlitebck
|
||||||
|
@ -15,4 +15,4 @@ setenv =
|
||||||
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}
|
mysql: DB_NAME={env:MYSQL_NAME:test}
|
||||||
install_command = pip install --pre --process-dependency-links {opts} {packages}
|
install_command = pip install --pre {opts} {packages}
|
||||||
|
|
Loading…
Reference in New Issue