Skip to content

Commit

Permalink
account_vat_period_end_statement: Migration to 14.0 - FIX tests, view…
Browse files Browse the repository at this point in the history
…s and readme
  • Loading branch information
eLBati committed May 1, 2021
1 parent ee695fc commit 3812349
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions account_vat_period_end_statement/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**Italiano**

Per generare i periodi della dichiarazione IVA,
aprire Impostazioni > Funzioni tecniche > Intervalli data > Generazione intervalli data (visibile solo in modalità debug):
aprire Fatturazione > Configurazione > Contabilità > Intervalli date > Generazione intervalli data (visibile solo in modalità debug):

* prefisso nome intervallo: prefisso identificativo per i periodi da generare (tipicamente l'anno)
* durata: 1 mese
Expand All @@ -21,7 +21,7 @@
**English**

In order to generate VAT statement's periods,
open Settings > Technical > Date ranges > Generate Date Ranges (visible only in debug mode):
open Accounting > Configuration > Accounting > Date ranges > Generate Date Ranges (visible only in debug mode):

* range name prefix: prefix identifying the periods to be generated (usually the year)
* duration: 1 month
Expand Down
5 changes: 3 additions & 2 deletions account_vat_period_end_statement/tests/test_vat_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ def test_vat_statement(self):
}
)
self.current_period.vat_statement_id = self.vat_statement
self.account_tax_22._compute_balance()
self.account_tax_22.refresh()
self.vat_statement.compute_amounts()
self.vat_statement._compute_authority_vat_amount()
self.vat_statement.previous_credit_vat_account_id = self.received_vat_account

self.assertEqual(self.vat_statement.previous_credit_vat_amount, 11)
Expand All @@ -268,7 +269,7 @@ def test_vat_statement(self):
self.assertEqual(len(self.vat_statement.credit_vat_account_line_ids), 1)
self.vat_statement.advance_account_id = self.paid_vat_account
self.vat_statement.advance_amount = 100
self.vat_statement.refresh()
self.vat_statement._compute_authority_vat_amount()
self.assertEqual(self.vat_statement.authority_vat_amount, -100)
self.vat_statement.create_move()
self.assertEqual(self.vat_statement.state, "confirmed")
Expand Down
4 changes: 2 additions & 2 deletions account_vat_period_end_statement/views/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
/>
<field
name="authority_partner_id"
domain="[('supplier_rank','>', 0)]"
context="{'default_supplier': True}"
widget="res_partner_many2one"
context="{'res_partner_search_mode': 'supplier', 'default_is_company': True}"
attrs="{'invisible': [('annual', '=', True)]}"
/>
<field
Expand Down

0 comments on commit 3812349

Please sign in to comment.