|
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.
|
|
|
|
O Código deve sempre definir uma variável chamada `resultado` com o resultado do seu teste, que pode ser uma lista ou
um dicionário. Se `resultado` for uma lista vazia, isso significa que o teste foi bem sucedido. Caso contrário, será
tentar traduzir e imprimir o que está dentro `resultado` .
Se o resultado do seu teste é um dicionário, você pode definir uma variável chamada `column_order` para escolher em
que ordem você deseja imprimir o conteúdo do `resultado`.
Se você precisar deles, você também pode usar as seguintes variáveis em seu código:
[nbsp] [nbsp] [nbsp] [nbsp] * cr: cursor para o banco de dados
[nbsp] [nbsp] [nbsp] [nbsp] * uid: ID do usuário atual
Em todas as maneiras, o código deve ser declarações Python legal com recuo correto (se necessário).
exemplo:
[nbsp] [nbsp] [nbsp] 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
Fábio Martinelli - http://zupy.com.br
|
|
|
|
Located in
view:accounting.assert.test:0
|
|
2.
|
|
|
Test 2: Opening a fiscal year
|
|
|
module: account_test
|
|
|
|
Teste 2: Abrindo um ano fiscal
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
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
|
|
|
|
Verifique se a fatura reconciliada de Vendas / Compras reconciliou entradas para Contas a Pagar e Receber
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
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
|
|
|
|
Verifique se as linhas de movimento são equilibradas e têm a mesma data e período
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
Located in
model:accounting.assert.test,desc:account_test.account_test_03
|
|
5.
|
|
|
Test Name
|
|
|
module: account_test
|
|
|
|
Nome do Teste
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
Located in
field:accounting.assert.test,name:0
|
|
6.
|
|
|
Accouting tests on
|
|
|
module: account_test
|
|
|
|
Testes Contábeis Ativos
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
Located in
report:account.test.assert.print:0
|
|
7.
|
|
|
Test 1: General balance
|
|
|
module: account_test
|
|
|
|
Teste 1: Balanços Gerais
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
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
|
|
|
|
Verifique que as faturas pagas/reconciliadas não estão com a situação 'Aberto'
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
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
|
|
|
|
Verifique que os movimentos de conta reconciliados, que definem as contas a pagar e a receber, são pertencentes a faturas reconciliadas
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
Located in
model:accounting.assert.test,desc:account_test.account_test_05_2
|
|
10.
|
|
|
Tests
|
|
|
module: account_test
|
|
|
|
Testes
|
|
Translated by
Fábio Martinelli - http://zupy.com.br
|
|
|
|
Located in
view:accounting.assert.test:0
|