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
5 changed files with 19 additions and 11 deletions
|
@ -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
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 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>
|
||||
|
|
|
@ -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')])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=4.9.0
|
||||
version=5.1.0
|
||||
depends:
|
||||
stock_lot
|
||||
xml:
|
||||
|
|
Loading…
Reference in a new issue