OCA-git-bot
5 years ago
committed by
Francisco Ivan Anton Prieto
3 changed files with 168 additions and 131 deletions
-
67account_tax_balance/views/account_move_view.xml
-
146account_tax_balance/views/account_tax_view.xml
-
86account_tax_balance/wizard/open_tax_balances_view.xml
@ -1,39 +1,40 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
|||
<odoo> |
|||
|
|||
<record id="view_move_tree" model="ir.ui.view"> |
|||
<field name="name">Add move type column</field> |
|||
<field name="model">account.move</field> |
|||
<field name="inherit_id" ref="account.view_move_tree"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="state" position="after"> |
|||
<field name="move_type"/> |
|||
<record id="view_move_tree" model="ir.ui.view"> |
|||
<field name="name">Add move type column</field> |
|||
<field name="model">account.move</field> |
|||
<field name="inherit_id" ref="account.view_move_tree" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="state" position="after"> |
|||
<field name="move_type" /> |
|||
</field> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_move_form" model="ir.ui.view"> |
|||
<field name="name">Add move type field</field> |
|||
<field name="model">account.move</field> |
|||
<field name="inherit_id" ref="account.view_move_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="ref" position="after"> |
|||
<field name="move_type"/> |
|||
</record> |
|||
<record id="view_move_form" model="ir.ui.view"> |
|||
<field name="name">Add move type field</field> |
|||
<field name="model">account.move</field> |
|||
<field name="inherit_id" ref="account.view_move_form" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="ref" position="after"> |
|||
<field name="move_type" /> |
|||
</field> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_account_move_filter" model="ir.ui.view"> |
|||
<field name="name">Add move type group by</field> |
|||
<field name="model">account.move</field> |
|||
<field name="inherit_id" ref="account.view_account_move_filter"/> |
|||
<field name="arch" type="xml"> |
|||
<group expand="0" position="inside"> |
|||
<filter name="move_type" string="Move type" domain="[]" context="{'group_by':'move_type'}"/> |
|||
</group> |
|||
</field> |
|||
</record> |
|||
|
|||
</record> |
|||
<record id="view_account_move_filter" model="ir.ui.view"> |
|||
<field name="name">Add move type group by</field> |
|||
<field name="model">account.move</field> |
|||
<field name="inherit_id" ref="account.view_account_move_filter" /> |
|||
<field name="arch" type="xml"> |
|||
<group expand="0" position="inside"> |
|||
<filter |
|||
name="move_type" |
|||
string="Move type" |
|||
domain="[]" |
|||
context="{'group_by':'move_type'}" |
|||
/> |
|||
</group> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -1,63 +1,93 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2016 Lorenzo Battistini - Agile Business Group |
|||
Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
|||
<odoo> |
|||
|
|||
<record id="view_tax_tree_balance" model="ir.ui.view"> |
|||
<field name="name">account.tax.tree.balance</field> |
|||
<field name="model">account.tax</field> |
|||
<field eval="100" name="priority"/> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Account Tax" create="false" delete="false"> |
|||
<field name="name"/> |
|||
<field name="description" string="Short Name"/> |
|||
<field name="balance_regular" sum="Total"/> |
|||
<button type="object" name="view_tax_regular_lines" |
|||
string="View tax regular lines" icon="fa-search-plus"/> |
|||
<field name="base_balance_regular" sum="Base Total"/> |
|||
<button type="object" name="view_base_regular_lines" |
|||
string="View base regular lines" icon="fa-search-plus"/> |
|||
<field name="balance_refund" sum="Total"/> |
|||
<button type="object" name="view_tax_refund_lines" |
|||
string="View tax refund lines" icon="fa-search-plus"/> |
|||
<field name="base_balance_refund" sum="Base Total"/> |
|||
<button type="object" name="view_base_refund_lines" |
|||
string="View base refund lines" icon="fa-search-plus"/> |
|||
<field name="balance" sum="Total"/> |
|||
<button type="object" name="view_tax_lines" |
|||
string="View tax lines" icon="fa-search-plus"/> |
|||
<field name="base_balance" sum="Base Total"/> |
|||
<button type="object" name="view_base_lines" |
|||
string="View base lines" icon="fa-search-plus"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_tax_search_balance" model="ir.ui.view"> |
|||
<field name="name">account.tax.search.balance</field> |
|||
<field name="model">account.tax</field> |
|||
<field eval="100" name="priority"/> |
|||
<field name="arch" type="xml"> |
|||
<search string="Account Tax"> |
|||
<field name="name"/> |
|||
<field name="description" string="Short Name"/> |
|||
<field name="type_tax_use"/> |
|||
<group expand="0" string="Group By"> |
|||
<filter name="tax_group" string="Tax Group" domain="[]" context="{'group_by':'tax_group_id'}"/> |
|||
<filter name="tax_scope" string="Tax Scope" domain="[]" context="{'group_by':'type_tax_use'}"/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_tax_balances_tree" model="ir.actions.act_window"> |
|||
<field name="name">Taxes Balance</field> |
|||
<field name="res_model">account.tax</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="domain">[('has_moves', '=', True)]</field> |
|||
<field name="view_id" ref="view_tax_tree_balance"/> |
|||
<field name="search_view_id" ref="view_tax_search_balance"/> |
|||
</record> |
|||
|
|||
<record id="view_tax_tree_balance" model="ir.ui.view"> |
|||
<field name="name">account.tax.tree.balance</field> |
|||
<field name="model">account.tax</field> |
|||
<field eval="100" name="priority" /> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Account Tax" create="false" delete="false"> |
|||
<field name="name" /> |
|||
<field name="description" string="Short Name" /> |
|||
<field name="balance_regular" sum="Total" /> |
|||
<button |
|||
type="object" |
|||
name="view_tax_regular_lines" |
|||
string="View tax regular lines" |
|||
icon="fa-search-plus" |
|||
/> |
|||
<field name="base_balance_regular" sum="Base Total" /> |
|||
<button |
|||
type="object" |
|||
name="view_base_regular_lines" |
|||
string="View base regular lines" |
|||
icon="fa-search-plus" |
|||
/> |
|||
<field name="balance_refund" sum="Total" /> |
|||
<button |
|||
type="object" |
|||
name="view_tax_refund_lines" |
|||
string="View tax refund lines" |
|||
icon="fa-search-plus" |
|||
/> |
|||
<field name="base_balance_refund" sum="Base Total" /> |
|||
<button |
|||
type="object" |
|||
name="view_base_refund_lines" |
|||
string="View base refund lines" |
|||
icon="fa-search-plus" |
|||
/> |
|||
<field name="balance" sum="Total" /> |
|||
<button |
|||
type="object" |
|||
name="view_tax_lines" |
|||
string="View tax lines" |
|||
icon="fa-search-plus" |
|||
/> |
|||
<field name="base_balance" sum="Base Total" /> |
|||
<button |
|||
type="object" |
|||
name="view_base_lines" |
|||
string="View base lines" |
|||
icon="fa-search-plus" |
|||
/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="view_tax_search_balance" model="ir.ui.view"> |
|||
<field name="name">account.tax.search.balance</field> |
|||
<field name="model">account.tax</field> |
|||
<field eval="100" name="priority" /> |
|||
<field name="arch" type="xml"> |
|||
<search string="Account Tax"> |
|||
<field name="name" /> |
|||
<field name="description" string="Short Name" /> |
|||
<field name="type_tax_use" /> |
|||
<group expand="0" string="Group By"> |
|||
<filter |
|||
name="tax_group" |
|||
string="Tax Group" |
|||
domain="[]" |
|||
context="{'group_by':'tax_group_id'}" |
|||
/> |
|||
<filter |
|||
name="tax_scope" |
|||
string="Tax Scope" |
|||
domain="[]" |
|||
context="{'group_by':'type_tax_use'}" |
|||
/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<record id="action_tax_balances_tree" model="ir.actions.act_window"> |
|||
<field name="name">Taxes Balance</field> |
|||
<field name="res_model">account.tax</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="domain">[('has_moves', '=', True)]</field> |
|||
<field name="view_id" ref="view_tax_tree_balance" /> |
|||
<field name="search_view_id" ref="view_tax_search_balance" /> |
|||
</record> |
|||
</odoo> |
@ -1,46 +1,52 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!-- Copyright 2016 Lorenzo Battistini - Agile Business Group |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
|||
<odoo> |
|||
|
|||
<record id="wizard_open_tax_balances" model="ir.ui.view"> |
|||
<field name="model">wizard.open.tax.balances</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Taxes Balance"> |
|||
<group> |
|||
<field name="company_ids" widget="many2many_tags" groups="base.group_multi_company"/> |
|||
<field name="date_range_id"/> |
|||
<field name="from_date"></field> |
|||
<field name="to_date"></field> |
|||
<field name="target_move"></field> |
|||
</group> |
|||
<footer> |
|||
<button string="Open Taxes" name="open_taxes" type="object" class="oe_highlight"/> |
|||
<record id="wizard_open_tax_balances" model="ir.ui.view"> |
|||
<field name="model">wizard.open.tax.balances</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Taxes Balance"> |
|||
<group> |
|||
<field |
|||
name="company_ids" |
|||
widget="many2many_tags" |
|||
groups="base.group_multi_company" |
|||
/> |
|||
<field name="date_range_id" /> |
|||
<field name="from_date" /> |
|||
<field name="to_date" /> |
|||
<field name="target_move" /> |
|||
</group> |
|||
<footer> |
|||
<button |
|||
string="Open Taxes" |
|||
name="open_taxes" |
|||
type="object" |
|||
class="oe_highlight" |
|||
/> |
|||
or |
|||
<button string="Cancel" class="oe_link" special="cancel"/> |
|||
<button string="Cancel" class="oe_link" special="cancel" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_open_tax_balances" model="ir.actions.act_window"> |
|||
<field name="name">Taxes Balance</field> |
|||
<field name="res_model">wizard.open.tax.balances</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="wizard_open_tax_balances"/> |
|||
<field name="target">new</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="menu_tax_balances" |
|||
name="Taxes Balance" |
|||
parent="account.menu_finance_reports" |
|||
groups="account.group_account_user,account.group_account_manager"/> |
|||
|
|||
<menuitem |
|||
action="action_open_tax_balances" |
|||
id="menu_action_open_tax_balances" |
|||
parent="menu_tax_balances" |
|||
groups="account.group_account_user,account.group_account_manager"/> |
|||
|
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="action_open_tax_balances" model="ir.actions.act_window"> |
|||
<field name="name">Taxes Balance</field> |
|||
<field name="res_model">wizard.open.tax.balances</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="wizard_open_tax_balances" /> |
|||
<field name="target">new</field> |
|||
</record> |
|||
<menuitem |
|||
id="menu_tax_balances" |
|||
name="Taxes Balance" |
|||
parent="account.menu_finance_reports" |
|||
groups="account.group_account_user,account.group_account_manager" |
|||
/> |
|||
<menuitem |
|||
action="action_open_tax_balances" |
|||
id="menu_action_open_tax_balances" |
|||
parent="menu_tax_balances" |
|||
groups="account.group_account_user,account.group_account_manager" |
|||
/> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue