|
1.
|
|
|
Code should always set a variable named `result` with the result of your test, that can be a list or
a dictionary. If `result` is an empty list, it means that the test was succesful. Otherwise it will
try to translate and print what is inside `result`.
If the result of your test is a dictionary, you can set a variable named `column_order` to choose in
what order you want to print `result`'s content.
Should you need them, you can also use the following variables into your code:
* cr: cursor to the database
* uid: ID of the current user
In any ways, the code must be legal python statements with correct indentation (if needed).
Example:
sql = '''SELECT id, name, ref, date
FROM account_move_line
WHERE account_id IN (SELECT id FROM account_account WHERE type = 'view')
'''
cr.execute(sql)
result = cr.dictfetchall()
|
|
|
module: account_test
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
El código siempre debe establecer una variable llamada 'result' con el resultado de la prueba, que puede ser una lista o un diccionario. Si 'result' es una lista vacía, significa que la prueba ha sido satisfactoria. En caso contrario, se tratará de traducir e imprimir lo que hay dentro de 'result'.
Si el resultado de la prueba es un diccionario, se puede establecer una variable llamada 'column_order' para elegir en qué orden se quieren imprimir el contenido de 'result'.
En caso de necesitarlas, se pueden usar las siguientes variables en el código:
* cr: cursor a la base de datos
* uid: id. del usuario actual
En cualquier caso, el código debe ser sentencias Python legales con correcta indentación (si fuera necesario).
Ejemplo:
sql = '''SELECT id, name, ref, date
FROM account_move_line
WHERE account_id IN (SELECT id FROM account_account WHERE type = 'view')
'''
cr.execute(sql)
result = cr.dictfetchall()
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
view:accounting.assert.test:0
|
|
2.
|
|
|
Test 2: Opening a fiscal year
|
|
|
module: account_test
|
|
|
|
Prueba 2: Abrir un ejercicio fiscal
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
model:accounting.assert.test,name:account_test.account_test_02
|
|
3.
|
|
|
Check that reconciled invoice for Sales/Purchases has reconciled entries for Payable and Receivable Accounts
|
|
|
module: account_test
|
|
|
|
Comprobar que la factura conciliada para ventas/compras tiene apuntes conciliados para las cuentas a cobrar y a pagar
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
model:accounting.assert.test,desc:account_test.account_test_05
|
|
4.
|
|
|
Check if movement lines are balanced and have the same date and period
|
|
|
module: account_test
|
|
|
|
Comprobar si las líneas del movimiento están compensadas y tienen la misma fecha y periodo
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
model:accounting.assert.test,desc:account_test.account_test_03
|
|
5.
|
|
|
Test Name
|
|
|
module: account_test
|
|
|
|
Nombre de la prueba
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
field:accounting.assert.test,name:0
|
|
6.
|
|
|
Accouting tests on
|
|
|
module: account_test
|
|
|
|
Pruebas de contabilidad en
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
report:account.test.assert.print:0
|
|
7.
|
|
|
Test 1: General balance
|
|
|
module: account_test
|
|
|
|
Prueba 1: Balance general
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
model:accounting.assert.test,name:account_test.account_test_01
|
|
8.
|
|
|
Check that paid/reconciled invoices are not in 'Open' state
|
|
|
module: account_test
|
|
|
|
Comprobar que las facturas pagadas/conciliadas no están en estado 'Abierto'
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
model:accounting.assert.test,desc:account_test.account_test_06
|
|
9.
|
|
|
Check that reconciled account moves, that define Payable and Receivable accounts, are belonging to reconciled invoices
|
|
|
module: account_test
|
|
|
|
Comprobar que los apuntes contables conciliados que definen cuentas a cobrar y a pagar pertenecen a facturas conciliadas
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
model:accounting.assert.test,desc:account_test.account_test_05_2
|
|
10.
|
|
|
Tests
|
|
|
module: account_test
|
|
|
|
Pruebas
|
|
Translated by
Christophe Simonis (OpenERP)
|
|
|
|
Located in
view:accounting.assert.test:0
|