mirror of
https://github.com/NaN-tic/trytond-stock_lot_deactivatable.git
synced 2023-12-14 03:22:55 +01:00
Upgrade to 5.1
This commit is contained in:
parent
ecb1cc8a9b
commit
ca310806bd
|
@ -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
14
ir.py
Normal 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"))
|
|
@ -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>
|
||||||
|
|
|
@ -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')])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=4.9.0
|
version=5.1.0
|
||||||
depends:
|
depends:
|
||||||
stock_lot
|
stock_lot
|
||||||
xml:
|
xml:
|
||||||
|
|
Loading…
Reference in a new issue