Skip to content

Commit

Permalink
IMP account_vat_period_end_statement views (odoo-italia#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
eLBati authored and michelerusti committed Nov 25, 2022
1 parent 3510e47 commit 7f57ffd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
23 changes: 16 additions & 7 deletions account_vat_period_end_statement/views/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Vat statement">
<header>
<button name="create_move" states="draft" type="object" string="Create Move" class="oe_highlight"/>
<button name="statement_draft" type="object" states="confirmed,paid" string="Set to draft"/>
<button type="object" name="compute_amounts" string="Recompute amounts" states="draft"/>
<field name="state" widget="statusbar"/>
</header>
<group>
<field name="journal_id" widget="selection"/>
<field name="date"/>
Expand All @@ -29,9 +35,16 @@
</group>
<notebook colspan="4">
<page string="Periods">
<button type='action' name="%(action_add_period)d" string="Add period" colspan="2" attrs="{'invisible': [('state', 'in', ('confirmed', 'paid'))]}"/>
<button type='action' name="%(action_remove_period)d" string="Remove period" colspan="2" attrs="{'invisible': [('state', 'in', ('confirmed', 'paid'))]}"/>
<field name="date_range_ids" colspan="4" nolabel="1" readonly="1"/>
<div>
<button type='action' name="%(action_add_period)d" string="Add period" colspan="2"
attrs="{'invisible': [('state', 'in', ('confirmed', 'paid'))]}" icon="fa-plus"/>
<span>&amp;nbsp;</span>
<button type='action' name="%(action_remove_period)d" string="Remove period" colspan="2"
attrs="{'invisible': [('state', 'in', ('confirmed', 'paid'))]}" icon="fa-minus"/>
</div>
<group>
<field name="date_range_ids" colspan="4" nolabel="1" readonly="1"/>
</group>
</page>
<page string="Accounts">
<group colspan="4" col="3">
Expand Down Expand Up @@ -95,13 +108,9 @@
</form>
</field>
</group>
<button type="object" name="compute_amounts" string="Recompute amounts" states="draft"/>
<group>
<field name="state"/>
<field name="reconciled"/>
</group>
<button name="create_move" states="draft" type="object" string="Create Move" colspan="2"/>
<button name="statement_draft" type="object" states="confirmed,paid" string="Set to draft" colspan="2"/>
</page>
<page string="Tax Authority">
<group>
Expand Down
11 changes: 5 additions & 6 deletions account_vat_period_end_statement/wizard/add_period.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
<field name="model">add.period.to.vat.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Add period" version="7.0">
<form string="Add period">
<group>
<label for="period_id"/>
<div>
<field name="period_id" class="oe_inline"/>
</div>
<group>
<field name="period_id"/>
</group>
</group>
<footer>
<button special="cancel" string="Cancel"/>
<button name="add_period" string="Add" type="object"/>
<button name="add_period" string="Add" type="object" class="oe_highlight"/>
</footer>
</form>
</field>
Expand Down
12 changes: 8 additions & 4 deletions account_vat_period_end_statement/wizard/remove_period.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Remove period">
<field name="period_id"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel"/>
<button name="remove_period" string="Remove" type="object"/>
<group>
<group>
<field name="period_id"/>
</group>
</group>
<footer>
<button special="cancel" string="Cancel"/>
<button name="remove_period" string="Remove" type="object" class="oe_highlight"/>
</footer>
</form>
</field>
</record>
Expand Down

0 comments on commit 7f57ffd

Please sign in to comment.