Upgrade to 5.1

This commit is contained in:
Raimon Esteve 2019-04-26 13:48:08 +02:00
parent ecb1cc8a9b
commit ca310806bd
5 changed files with 19 additions and 11 deletions

View File

@ -1,12 +1,13 @@
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.pool import Pool
from . import ir
from . import stock
def register():
Pool.register(
ir.Cron,
stock.Lot,
stock.Move,
stock.Period,

14
ir.py Normal file
View File

@ -0,0 +1,14 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import PoolMeta
class Cron(metaclass=PoolMeta):
__name__ = 'ir.cron'
@classmethod
def __setup__(cls):
super().__setup__()
cls.method.selection.append(
('stock.lot|deactivate_lots_without_stock',
"Deactivate Lots without Stock"))

View File

@ -30,16 +30,9 @@
</record>
<record model="ir.cron" id="cron_deactivate_lots_without_stock">
<field name="name">Deactivate Lots without Stock</field>
<field name="request_user" ref="res.user_admin"/>
<field name="user" ref="user_deactivate_lots_without_stock"/>
<field name="active" eval="False"/>
<field name="method">stock.lot|deactivate_lots_without_stock</field>
<field name="interval_number" eval="1"/>
<field name="interval_type">days</field>
<field name="number_calls" eval="-1"/>
<field name="repeat_missed" eval="False"/>
<field name="model">stock.lot</field>
<field name="function">deactivate_lots_without_stock</field>
</record>
</data>
</tryton>

View File

@ -38,12 +38,12 @@ class StockLotDeactivatableTestCase(ModuleTestCase):
'name': 'Test Move.internal_quantity',
'type': 'goods',
'list_price': Decimal(1),
'cost_price': Decimal(0),
'cost_price_method': 'fixed',
'default_uom': unit.id,
}])
product, = Product.create([{
'template': template.id,
'cost_price': Decimal(0),
}])
supplier, = Location.search([('code', '=', 'SUP')])
storage, = Location.search([('code', '=', 'STO')])

View File

@ -1,5 +1,5 @@
[tryton]
version=4.9.0
version=5.1.0
depends:
stock_lot
xml: