mirror of
https://gitlab.com/datalifeit/trytond-stock_product_category_location
synced 2023-12-14 04:33:11 +01:00
parent
a9c9bd921a
commit
5b872e37bd
7 changed files with 38 additions and 4 deletions
10
.drone.yml
Normal file
10
.drone.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
build:
|
||||
image: python:all
|
||||
environment:
|
||||
- POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
|
||||
- MYSQL_URI=mysql://root@127.0.0.1:3306/
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
|
||||
services:
|
||||
- postgres
|
|
@ -3,6 +3,8 @@ This Module runs with the Tryton application platform.
|
|||
|
||||
This module is developed and tested over a Tryton server and core modules.
|
||||
|
||||
[![Build Status](https://drone.io/bitbucket.org/datalife_sco/trytond-stock_product_category_location/status.png)](https://drone.io/bitbucket.org/datalife_sco/trytond-stock_product_category_location/latest)
|
||||
|
||||
Installing
|
||||
----------
|
||||
|
|
@ -104,9 +104,12 @@ class Location:
|
|||
states={
|
||||
'invisible': Not(Equal(Eval('type'), 'storage'))},
|
||||
context={'current_location': Eval('id')})
|
||||
wh_categories = fields.One2Many('stock.product.category.location', 'warehouse',
|
||||
'Categories', states={'invisible': Not(Equal(Eval('type'), 'warehouse'))},
|
||||
context={'current_location': Eval('id')})
|
||||
|
||||
@classmethod
|
||||
def view_attributes(cls):
|
||||
return super(Location, cls).view_attributes() + [
|
||||
('//page[@id="categories"]', 'states', {
|
||||
'invisible': Eval('type') != 'storage'})]
|
||||
'invisible': ~Eval('type').in_(['warehouse', 'storage'])})]
|
||||
|
|
|
@ -13,10 +13,10 @@ Create database::
|
|||
|
||||
Install team_timesheet Module::
|
||||
|
||||
>>> Module = Model.get('ir.module.module')
|
||||
>>> Module = Model.get('ir.module')
|
||||
>>> module, = Module.find([('name', '=', 'stock_product_category_location')])
|
||||
>>> module.click('install')
|
||||
>>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
|
||||
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
|
||||
|
||||
Check default for warehouse field while allow new category to a location::
|
||||
|
||||
|
|
17
tox.ini
Normal file
17
tox.ini
Normal file
|
@ -0,0 +1,17 @@
|
|||
[tox]
|
||||
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands = {envpython} setup.py test
|
||||
deps =
|
||||
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
|
||||
pypy-postgresql: psycopg2cffi >= 2.5
|
||||
mysql: MySQL-python
|
||||
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}
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=3.6.1
|
||||
version=3.8.1
|
||||
depends:
|
||||
ir
|
||||
res
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<page id="categories" string="Product categories">
|
||||
<field name="categories" colspan="4"
|
||||
view_ids="stock_product_category_location.product_category_location_location_detail_view_tree"/>
|
||||
<field name="wh_categories" colspan="4"
|
||||
view_ids="stock_product_category_location.product_category_location_location_detail_view_tree"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in a new issue