first commit

This commit is contained in:
root
2026-03-14 09:42:12 +00:00
commit 0adbd20c2c
10991 changed files with 1646955 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,34 @@
==========================
Stock Inventories Scenario
==========================
Imports::
>>> from proteus import Model, Wizard
>>> from trytond.modules.company.tests.tools import create_company
>>> from trytond.tests.tools import activate_modules, assertEqual
Activate modules::
>>> config = activate_modules('stock_inventory_location', create_company)
Get stock locations::
>>> Location = Model.get('stock.location')
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
>>> storage_loc, = Location.find([('code', '=', 'STO')])
>>> storage_loc2, = storage_loc.duplicate()
Create inventories::
>>> create = Wizard('stock.inventory.create')
>>> create.form.empty_quantity = 'keep'
>>> create.form.locations.extend(Location.find([('code', '=', 'STO')]))
>>> create.execute('create_')
>>> inventories, = create.actions
>>> len(inventories)
2
>>> assertEqual({i.location for i in inventories}, {storage_loc, storage_loc2})
>>> inventories[0].empty_quantity
'keep'

View File

@@ -0,0 +1,13 @@
# 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.modules.company.tests import CompanyTestMixin
from trytond.tests.test_tryton import ModuleTestCase
class StockInventoryLocationTestCase(CompanyTestMixin, ModuleTestCase):
'Test StockInventoryLocation module'
module = 'stock_inventory_location'
del ModuleTestCase

View File

@@ -0,0 +1,8 @@
# 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.tests.test_tryton import load_doc_tests
def load_tests(*args, **kwargs):
return load_doc_tests(__name__, __file__, *args, **kwargs)