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 # The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms. # copyright notices and license terms.
from trytond.pool import Pool from trytond.pool import Pool
from . import ir
from . import stock from . import stock
def register(): def register():
Pool.register( Pool.register(
ir.Cron,
stock.Lot, stock.Lot,
stock.Move, stock.Move,
stock.Period, 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>
<record model="ir.cron" id="cron_deactivate_lots_without_stock"> <record model="ir.cron" id="cron_deactivate_lots_without_stock">
<field name="name">Deactivate Lots without Stock</field> <field name="method">stock.lot|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="interval_number" eval="1"/> <field name="interval_number" eval="1"/>
<field name="interval_type">days</field> <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> </record>
</data> </data>
</tryton> </tryton>

View file

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

View file

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