Update to 4.7
This commit is contained in:
parent
73eaf02101
commit
3976425519
56
.drone.yml
56
.drone.yml
|
@ -1,9 +1,49 @@
|
|||
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
|
||||
- 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}"
|
||||
|
||||
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
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
from trytond.pool import Pool
|
||||
from .product import *
|
||||
from . import product
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
ProductPriceByPriceListStart,
|
||||
Product,
|
||||
product.ProductPriceByPriceListStart,
|
||||
product.Product,
|
||||
module='product_price_by_list_price', type_='model')
|
||||
Pool.register(
|
||||
ProductPriceByPriceList,
|
||||
product.ProductPriceByPriceList,
|
||||
module='product_price_by_list_price', type_='wizard')
|
||||
|
|
|
@ -7,7 +7,8 @@ from trytond.pool import PoolMeta
|
|||
from trytond.pyson import PYSONEncoder
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
__all__ = ['ProductPriceByPriceListStart', 'ProductPriceByPriceList', 'Product']
|
||||
__all__ = ['ProductPriceByPriceListStart', 'ProductPriceByPriceList',
|
||||
'Product']
|
||||
|
||||
|
||||
class ProductPriceByPriceListStart(ModelView):
|
||||
|
@ -21,11 +22,13 @@ class ProductPriceByPriceList(Wizard):
|
|||
'Product Price By Price List'
|
||||
__name__ = 'product.price.by_price_list'
|
||||
start = StateView('product.price.by.list_price.start',
|
||||
'product_price_by_list_price.product_price_by_list_price_start_view_form', [
|
||||
'product_price_by_list_price'
|
||||
'.product_price_by_list_price_start_view_form', [
|
||||
Button('Cancel', 'end', 'tryton-cancel'),
|
||||
Button('Get prices', 'open', 'tryton-ok', default=True),
|
||||
])
|
||||
open = StateAction('product_price_by_list_price.act_product_price_by_list_price_tree')
|
||||
open = StateAction(
|
||||
'product_price_by_list_price.act_product_price_by_list_price_tree')
|
||||
|
||||
def do_open(self, action):
|
||||
price_list = self.start.price_list
|
||||
|
|
|
@ -18,7 +18,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
|||
<record model="ir.action.act_window" id="act_product_price_by_list_price_tree">
|
||||
<field name="name">Price by Price List</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="window_name" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_product_price_by_list_price_tree_view">
|
||||
<field name="sequence" eval="10"/>
|
||||
|
|
23
setup.py
23
setup.py
|
@ -12,6 +12,8 @@ try:
|
|||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
MODULE = 'product_price_by_list_price'
|
||||
PREFIX = 'trytonzz'
|
||||
MODULE2PREFIX = {}
|
||||
|
||||
|
||||
|
@ -20,6 +22,7 @@ def read(fname):
|
|||
os.path.join(os.path.dirname(__file__), fname),
|
||||
'r', encoding='utf-8').read()
|
||||
|
||||
|
||||
def get_require_version(name):
|
||||
if minor_version % 2:
|
||||
require = '%s >= %s.%s.dev0, < %s.%s'
|
||||
|
@ -39,8 +42,6 @@ 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 = 'trytonzz_product_price_by_list_price'
|
||||
download_url = 'https://bitbucket.org/zikzakmedia/trytond-product_price_by_list_price'
|
||||
|
||||
requires = []
|
||||
for dep in info.get('depends', []):
|
||||
|
@ -55,22 +56,22 @@ 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 Product Price By List Price Module',
|
||||
long_description=read('README'),
|
||||
author='Zikzakmedia SL',
|
||||
author_email='zikzak@zikzakmedia.com',
|
||||
url='https://bitbucket.org/zikzakmedia/',
|
||||
download_url=download_url,
|
||||
download_url='https://bitbucket.org/zikzakmedia/trytond-%s' % MODULE,
|
||||
keywords='',
|
||||
package_dir={'trytond.modules.product_price_by_list_price': '.'},
|
||||
package_dir={'trytond.modules.%s' % MODULE: '.'},
|
||||
packages=[
|
||||
'trytond.modules.product_price_by_list_price',
|
||||
'trytond.modules.product_price_by_list_price.tests',
|
||||
'trytond.modules.%s' % MODULE,
|
||||
'trytond.modules.%s.tests' % MODULE,
|
||||
],
|
||||
package_data={
|
||||
'trytond.modules.product_price_by_list_price': (info.get('xml', [])
|
||||
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
||||
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', '*.odt',
|
||||
'icons/*.svg', 'tests/*.rst']),
|
||||
},
|
||||
|
@ -97,9 +98,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',
|
||||
|
@ -110,8 +111,8 @@ setup(name=name,
|
|||
zip_safe=False,
|
||||
entry_points="""
|
||||
[trytond.modules]
|
||||
product_price_by_list_price = trytond.modules.product_price_by_list_price
|
||||
""",
|
||||
%s = trytond.modules.%s
|
||||
""" % (MODULE, MODULE),
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
tests_require=tests_require,
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# This file is part product_price_by_list_price module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
|
||||
from .test_product_price_by_list_price import suite
|
||||
try:
|
||||
from trytond.modules.product_price_by_list_price.tests.test_product_price_by_list_price import suite
|
||||
except ImportError:
|
||||
from .test_product_price_by_list_price import suite
|
||||
|
||||
__all__ = ['suite']
|
||||
|
|
|
@ -15,4 +15,4 @@ def suite():
|
|||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
ProductPriceByListPriceTestCase))
|
||||
return suite
|
||||
return suite
|
||||
|
|
7
tox.ini
7
tox.ini
|
@ -1,12 +1,13 @@
|
|||
[tox]
|
||||
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
||||
envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},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://}
|
||||
|
@ -14,4 +15,4 @@ setenv =
|
|||
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 --find-links https://trydevpi.tryton.org/ --process-dependency-links {opts} {packages}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=4.1.0
|
||||
version=4.7.0
|
||||
depends:
|
||||
ir
|
||||
res
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part product_price_by_list_price module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<form string="Prices by Price List">
|
||||
<form>
|
||||
<label name="price_list"/>
|
||||
<field name="price_list"/>
|
||||
</form>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part product_price_list_price module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<tree string="Product Price By Price List">
|
||||
<tree>
|
||||
<field name="template"/>
|
||||
<field name="code"/>
|
||||
<field name="price_x1"/>
|
||||
|
|
Loading…
Reference in New Issue