Add, database copy and utils
This commit is contained in:
parent
61da645cf9
commit
c00ae9b9ec
275595
utils/agentes-abril-01.dump
Normal file
275595
utils/agentes-abril-01.dump
Normal file
File diff suppressed because one or more lines are too long
18
utils/inventarios.py
Normal file
18
utils/inventarios.py
Normal file
@ -0,0 +1,18 @@
|
||||
from proteus import Model, config
|
||||
from random import randint
|
||||
|
||||
database = 'tryton'
|
||||
config_file = '/app/.dev/trytond.cfg'
|
||||
|
||||
config.set_trytond(database, config_file=config_file)
|
||||
|
||||
Stock = Model.get('stock.inventory')
|
||||
stock, = Stock.find([('state', '=', 'draft')])
|
||||
|
||||
|
||||
for line in stock.lines:
|
||||
line.quantity = randint(0, 50)
|
||||
line.save()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user