diff options
| author | qdp-odoo <qdp@openerp.com> | 2014-05-30 18:34:13 +0200 |
|---|---|---|
| committer | qdp-odoo <qdp@openerp.com> | 2014-05-30 18:34:13 +0200 |
| commit | 7580b6510b571246d5a492bf9db7c41176fd4092 (patch) | |
| tree | 14fc466b4df3bc928f6820d15cc3e3295d07f423 /addons | |
| parent | 46712acaecb58954f5dac375445e4556d45c5f0b (diff) | |
[IMP] account: bank statement reconciliation widget
Diffstat (limited to 'addons')
7 files changed, 1073 insertions, 0 deletions
diff --git a/addons/account/demo/account_bank_statement.xml b/addons/account/demo/account_bank_statement.xml new file mode 100644 index 00000000000..52667828cc5 --- /dev/null +++ b/addons/account/demo/account_bank_statement.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + <!-- A bank statement --> + <record id="demo_bank_statement_1" model="account.bank.statement"> + <field name="journal_id" ref="account.bank_journal"/> + <field name="period_id" ref="account.period_5"/> + <field name="date" eval="time.strftime('%Y')+'-01-01'"/> + <field name="user_id" ref="base.user_demo"/> + <field name="reference_type">none</field> + <field name="name">BNK/2014/001</field> + <field name="balance_end" eval="2040.0"/> + <field name="company_id" ref="base.main_company"/> + <field name="state">draft</field> + <field name="balance_start" eval="0.0"/> + <field name="balance_end_real" eval="3707.58"/> + </record> + <record id="demo_bank_statement_line_1" model="account.bank.statement.line"> + <field name="ref">001</field> + <field name="statement_id" ref="demo_bank_statement_1"/> + <field name="sequence" eval="1"/> + <field name="company_id" ref="base.main_company"/> + <field name="name">First 2000 € of SAJ/2014/001</field> + <field name="journal_id" ref="account.bank_journal"/> + <field name="amount" eval="2000.0"/> + <field name="date" eval="time.strftime('%Y')+'-01-01'"/> + <field name="partner_id" ref="base.res_partner_9"/> + </record> + <record id="demo_bank_statement_line_2" model="account.bank.statement.line"> + <field name="ref">002</field> + <field name="statement_id" ref="demo_bank_statement_1"/> + <field name="sequence" eval="2"/> + <field name="company_id" ref="base.main_company"/> + <field name="name">SAJ/2014/002</field> + <field name="journal_id" ref="account.bank_journal"/> + <field name="amount" eval="650.0"/> + <field name="date" eval="time.strftime('%Y')+'-01-01'"/> + <field name="partner_id" ref="base.res_partner_9"/> + </record> + <record id="demo_bank_statement_line_3" model="account.bank.statement.line"> + <field name="ref">003</field> + <field name="statement_id" ref="demo_bank_statement_1"/> + <field name="sequence" eval="3"/> + <field name="company_id" ref="base.main_company"/> + <field name="name">Bank fees</field> + <field name="journal_id" ref="account.bank_journal"/> + <field name="amount" eval="32.58"/> + <field name="date" eval="time.strftime('%Y')+'-01-01'"/> + </record> + <record id="demo_bank_statement_line_4" model="account.bank.statement.line"> + <field name="ref">004</field> + <field name="statement_id" ref="demo_bank_statement_1"/> + <field name="sequence" eval="4"/> + <field name="company_id" ref="base.main_company"/> + <field name="name">SAJ/2014/003 and SAJ/2014/004</field> + <field name="journal_id" ref="account.bank_journal"/> + <field name="amount" eval="1025.0"/> + <field name="date" eval="time.strftime('%Y')+'-01-01'"/> + <field name="partner_id" ref="base.res_partner_2"/> + </record> + + <!-- Statement operation templates --> + <record id="statement_operation_template_1" model="account.statement.operation.template"> + <field name="name">Discount For Early Payment</field> + <field name="account_id" ref="a_expense"></field> + <field name="label">Discount</field> + <field name="amount_type">percentage_of_total</field> + <field name="amount">-7</field> + </record> + <record id="statement_operation_template_2" model="account.statement.operation.template"> + <field name="name">Bank Fees</field> + <field name="account_id" ref="a_expense"></field> + <field name="label">Bank Fees</field> + <field name="amount_type">fixed</field> + <field name="amount"></field> + </record> + <record id="statement_operation_template_3" model="account.statement.operation.template"> + <field name="name">Profit / Loss</field> + <field name="account_id" ref="a_sale"></field> + <field name="label">Profit / Loss</field> + <field name="amount_type">fixed</field> + <field name="amount"></field> + </record> + </data> +</openerp> diff --git a/addons/account/static/src/css/account_bank_statement_reconciliation.css b/addons/account/static/src/css/account_bank_statement_reconciliation.css new file mode 100644 index 00000000000..626d1f32dab --- /dev/null +++ b/addons/account/static/src/css/account_bank_statement_reconciliation.css @@ -0,0 +1,264 @@ +.openerp .oe_bank_statement_reconciliation { + font-size: 12px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + cursor: default; + /* icons */ } + .openerp .oe_bank_statement_reconciliation h1 { + width: 48%; + padding: 0 0 0 15px; + margin: 0 0 35px 0; + float: left; + font-size: 2.3em; } + .openerp .oe_bank_statement_reconciliation h2 { + font-size: 1.8em; } + .openerp .oe_bank_statement_reconciliation .progress { + width: 49%; + margin: 6px 15px 0 0; + float: right; + position: relative; + display: inline-block; } + .openerp .oe_bank_statement_reconciliation .progress .progress-text { + text-align: center; + position: absolute; + width: 100%; + left: 0; + top: 2px; + z-index: 10; + text-shadow: -1px -1px 0 #f5f5f5, 1px -1px 0 #f5f5f5, -1px 1px 0 #f5f5f5, 1px 1px 0 #f5f5f5; } + .openerp .oe_bank_statement_reconciliation .oe_form_sheet { + position: relative; + padding-bottom: 30px; } + .openerp .oe_bank_statement_reconciliation .protip { + margin: 0; + position: absolute; + bottom: 7px; + right: 15px; + text-align: right; + color: #bbb; } + .openerp .oe_bank_statement_reconciliation .done_message { + width: 100%; + padding: 0 20%; + margin-top: 50px; + margin-bottom: 50px; } + .openerp .oe_bank_statement_reconciliation .done_message h2 { + margin-bottom: 30px; } + .openerp .oe_bank_statement_reconciliation .done_message h2 .congrats_icon { + float: right; + font-size: 2em; + position: relative; + top: -0.25em; } + .openerp .oe_bank_statement_reconciliation .done_message .achievements { + margin-top: 30px; + text-align: center; + position: relative; } + .openerp .oe_bank_statement_reconciliation .done_message .achievements .achievement { + font-size: 4em; + margin: 0 0.3em; + position: relative; + vertical-align: middle; + text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2); } + .openerp .oe_bank_statement_reconciliation .done_message .achievements .achievement i { + font-size: 0.5em; + color: white; + position: absolute; + top: 50%; + margin-top: -0.55em; + left: 0; + width: 100%; + text-align: center; } + .openerp .oe_bank_statement_reconciliation .done_message .action_buttons { + text-align: center; } + .openerp .oe_bank_statement_reconciliation .glyphicon { + font-size: 12px !important; } + .openerp .oe_bank_statement_reconciliation .glyphicon.line_info_button { + color: #ccc !important; } + .openerp .oe_bank_statement_reconciliation .accounting_view .glyphicon-add-remove:before { + content: "\2212"; } + .openerp .oe_bank_statement_reconciliation .match .glyphicon-add-remove:before { + content: "\2b"; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line { + margin-bottom: 30px; + /* gap between accounting_view and action view */ + /* popover */ + /* arrays of move lines */ + /* Partie infos */ + /* Match view */ + /* Action create */ } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line table { + width: 100%; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .toggle_match, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .toggle_create { + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + -webkit-transform: rotate(0deg); + -moz-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg); } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .visible_toggle, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line[data-mode="match"] .toggle_match, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line[data-mode="create"] .toggle_create { + visibility: visible !important; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .change_partner_container { + width: 200px; + display: none; + position: relative !important; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line[data-mode="inactive"] .initial_line > td { + background-color: #f8f8f8 !important; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_match:not(.no_partner) .initial_line { + cursor: default !important; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_match:not(.no_partner) .initial_line .line_info_button { + cursor: pointer; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_match:not(.no_partner) .toggle_match { + visibility: hidden !important; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_partner .partner_name, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line.no_partner .line_open_balance { + display: none !important; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line > table > tbody > tr:nth-child(1) > td table { + margin-bottom: 10px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line table.details td:first-child { + padding-right: 10px; + font-weight: bold; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table { + width: 100%; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr { + cursor: pointer; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.created_line, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.created_line { + cursor: default !important; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.created_line .line_remove_button, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.created_line .line_remove_button { + cursor: pointer; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td { + padding: 1px 8px; + vertical-align: middle; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(7), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(7) { + width: 15px; + padding: 0; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(1) { + text-align: left; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(2), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(2) { + width: 80px; + padding-left: 3px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(3), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(3) { + width: 100px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(5), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(5) { + text-align: right; + width: 15%; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(6), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(6) { + width: 15%; + text-align: right; + padding-right: 3px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(7), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table td:nth-child(7) { + text-align: right; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.line_open_balance, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.line_open_balance { + color: #bbb; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr .glyphicon:not(.line_info_button), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr .glyphicon:not(.line_info_button) { + visibility: hidden; + color: #555; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr:hover .glyphicon, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.active .glyphicon, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr:hover .glyphicon, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr.active .glyphicon { + visibility: visible; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr .do_partial_reconcile_button, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr .do_partial_reconcile_button { + color: #f0ad4e; + padding-right: 5px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr .undo_partial_reconcile_button, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match table tr .undo_partial_reconcile_button { + color: #555; + padding-right: 5px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view .initial_line > td { + border-top: 1px solid #bbbbbb; + padding-top: 4px; + padding-bottom: 5px; + background-color: #f0f0f0; + -webkit-transition-property: background-color; + -moz-transition-property: background-color; + -ms-transition-property: background-color; + transition-property: background-color; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view .initial_line > td:nth-child(1), .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view .initial_line > td:nth-child(7) { + border-top: none; + background: white !important; + padding-top: 6px; + padding-bottom: 3px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption { + text-align: left; + font-size: 1.1em; + font-weight: bold; + height: 26px; + margin: 0 15px 4px 15px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption .button_ok { + float: right; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption .button_ok:disabled { + opacity: 0.5; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption > span, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view caption > input { + position: relative; + top: 7px; + /* meh */ + font-weight: bold; + cursor: pointer; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td:nth-child(6) { + border-left: 1px solid black; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.initial_line > td:nth-child(5) { + border-top: 1px solid black; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view tr.initial_line > td:nth-child(6) { + border-top: 1px solid black; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls { + padding: 0 0 5px 18px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .filter { + width: 240px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_left, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_right { + display: inline-block; + cursor: pointer; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_left { + margin-right: 10px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_left.disabled, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls .pager_control_right.disabled { + color: #ddd; + cursor: default; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .show_more { + display: inline-block; + margin-left: 18px; + margin-top: 5px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create { + margin: 0 15px; + border: 1px solid #d5d5d5; + border-radius: 5px; + padding: 10px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .quick_add { + margin-bottom: 10px; + clear: both; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .quick_add:empty { + display: none; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .quick_add:empty { + display: none; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table { + width: 49%; + height: 26px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table:nth-child(2n+1) { + float: left; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table:nth-child(2n) { + float: right; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table th { + font-weight: bold; + line-height: 26px; + padding-right: 8px; + min-width: 100px; + border-right: 1px solid #ddd; + white-space: nowrap; + width: 1%; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table td { + width: 99%; + padding-left: 8px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table input, .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table select { + width: 100%; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table.add_line_container:nth-child(2n+1) { + width: 98%; + float: none; + margin: auto; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table.add_line_container td { + text-align: center; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .create .oe_form > table.add_line_container .add_line { + line-height: 26px; } diff --git a/addons/account/static/src/css/account_bank_statement_reconciliation.scss b/addons/account/static/src/css/account_bank_statement_reconciliation.scss new file mode 100644 index 00000000000..3b98689bcbc --- /dev/null +++ b/addons/account/static/src/css/account_bank_statement_reconciliation.scss @@ -0,0 +1,447 @@ +$actionColWidth: 15px; +$mainTableBordersPadding: 3px; +$lightBorder: 1px solid #bbb; +$accountingBorder: 1px solid #000; +$initialLineBackground: #f0f0f0; + + +.openerp .oe_bank_statement_reconciliation { + font-size: 12px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + cursor: default; + + h1 { + width: 48%; + padding: 0 0 0 $actionColWidth; + margin: 0 0 35px 0; + float: left; + font-size: 2.3em; + } + + h2 { + font-size: 1.8em; + } + + .progress { + width: 49%; + margin: 6px $actionColWidth 0 0; + float: right; + position: relative; + display: inline-block; + + .progress-text { + text-align: center; + position: absolute; + width: 100%; + left: 0; + top: 2px; + z-index: 10; + text-shadow: + -1px -1px 0 #f5f5f5, + 1px -1px 0 #f5f5f5, + -1px 1px 0 #f5f5f5, + 1px 1px 0 #f5f5f5; + } + } + + .oe_form_sheet { + position: relative; + padding-bottom: 30px; + } + + .protip { + margin: 0; + position: absolute; + bottom: 7px; + right: 15px; + text-align: right; + color: #bbb; + } + + .done_message { + width: 100%; + padding: 0 20%; + margin-top: 50px; + margin-bottom: 50px; + + h2 { + margin-bottom: 30px; + + .congrats_icon { + float: right; + font-size: 2em; + position: relative; + top: -0.25em; + } + } + + .achievements { + margin-top: 30px; + text-align: center; + position: relative; + + .achievement { + font-size: 4em; + margin: 0 0.3em; + position: relative; + vertical-align: middle; + text-shadow: 2px 2px 0px rgba(0,0,0,0.2); + + i { + font-size: 0.5em; + color: white; + position: absolute; + top: 50%; + margin-top: -0.55em; + left: 0; + width: 100%; + text-align: center; + //text-shadow: 1px 1px 0 black; + } + } + } + + .action_buttons { + text-align: center; + } + } + + /* icons */ + .glyphicon { + font-size: 12px !important; + + &.line_info_button { + color: #ccc !important; + } + } + .accounting_view .glyphicon-add-remove:before { + content: "\2212"; + } + .match .glyphicon-add-remove:before { + content: "\2b"; + } + + // bankStatementReconciliationLine widget + .oe_bank_statement_reconciliation_line { + margin-bottom: 30px; + + table { + width: 100%; + } + + // modes : default + .toggle_match, .toggle_create { + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + -webkit-transform: rotate(0deg); + -moz-transform: rotate(0deg); + -ms-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg); + } + + .visible_toggle { + visibility: visible !important; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); + } + + .change_partner_container { + width: 200px; + display: none; + position: relative !important; + } + + // modes : specific + &[data-mode="match"] { + .toggle_match { + @extend .visible_toggle; + } + } + + &[data-mode="create"] { + .toggle_create { + @extend .visible_toggle; + } + } + + &[data-mode="inactive"] { + .initial_line > td { + background-color: ($initialLineBackground + #080808) !important; + } + } + + &.no_match:not(.no_partner) { + .initial_line { + cursor: default !important; + + .line_info_button { + cursor: pointer; + } + } + .toggle_match { + visibility: hidden !important; + } + } + + &.no_partner { + .partner_name, .line_open_balance { + display: none !important; + } + } + + /* gap between accounting_view and action view */ + > table > tbody > tr:nth-child(1) > td table { + margin-bottom: 10px; + } + + /* popover */ + table.details { + td:first-child { + padding-right: 10px; + font-weight: bold; + } + } + + /* arrays of move lines */ + .accounting_view, .match table { + width: 100%; + + tr { + cursor: pointer; + + &.created_line { + cursor: default !important; + + .line_remove_button { + cursor: pointer; + } + } + } + + td { + padding: 1px 8px; + vertical-align: middle; + } + + td:nth-child(1), td:nth-child(7) { + width: $actionColWidth; + padding: 0; + } + + td:nth-child(1) { + text-align: left; + } + + td:nth-child(2) { + width: 80px; + padding-left: $mainTableBordersPadding; + } + + td:nth-child(3) { + width: 100px; + } + + td:nth-child(4) { + + } + + td:nth-child(5) { + text-align: right; + width: 15%; + } + + td:nth-child(6) { + width: 15%; + text-align: right; + padding-right: $mainTableBordersPadding; + } + + td:nth-child(7) { + text-align: right; + } + + tr.line_open_balance { + color: #bbb; + } + + tr .glyphicon:not(.line_info_button) { + visibility: hidden; + color: #555; + } + + tr:hover .glyphicon, tr.active .glyphicon { + visibility: visible; + } + + tr .do_partial_reconcile_button { + color: #f0ad4e; + padding-right: 5px; + } + + tr .undo_partial_reconcile_button { + color: #555; + padding-right: 5px; + } + } + + /* Partie infos */ + .accounting_view { + + .initial_line > td { + border-top: $lightBorder; + padding-top: 4px; + padding-bottom: 5px; + background-color: $initialLineBackground; + -webkit-transition-property: background-color; + -moz-transition-property: background-color; + -ms-transition-property: background-color; + transition-property: background-color; + + &:nth-child(1), &:nth-child(7) { + border-top: none; + background: white !important; + // Hack pour l'alignement au px près + padding-top: 6px; + padding-bottom: 3px; + } + } + + caption { + text-align: left; + font-size: 1.1em; + font-weight: bold; + height: 26px; + margin: 0 $actionColWidth 4px $actionColWidth; + + .button_ok { + float: right; + + &:disabled { + opacity: 0.5; + } + } + + > span, > input { + position: relative; top: 7px; /* meh */ + font-weight: bold; + cursor: pointer; + } + } + + // accounting "T" + td:nth-child(6) { border-left: $accountingBorder; } + tr.initial_line > td { + &:nth-child(5) { border-top: $accountingBorder; } + &:nth-child(6) { border-top: $accountingBorder; } + } + } + + + /* Match view */ + .match { + + .match_controls { + padding: 0 0 5px ($actionColWidth+$mainTableBordersPadding); + + .filter { + width: 240px; + } + + .pager_control_left, .pager_control_right { + display: inline-block; + cursor: pointer; + } + + .pager_control_left { + margin-right: 10px; + } + + .pager_control_left.disabled, .pager_control_right.disabled { + color: #ddd; + cursor: default; + } + } + + .show_more { + display: inline-block; + margin-left: ($actionColWidth+$mainTableBordersPadding); + margin-top: 5px; + } + } + + + /* Action create */ + .create { + margin: 0 $actionColWidth; + border: 1px solid #d5d5d5; + border-radius: 5px; + padding: 10px; + + .quick_add { + margin-bottom: 10px; + clear: both; + + &:empty { + display: none; + } + } + .quick_add:empty { + display: none; + } + + .oe_form > table { + width: 49%; + height: 26px; + + &:nth-child(2n+1) { float: left; } + &:nth-child(2n) { float: right; } + + th { + font-weight: bold; + line-height: 26px; + padding-right: 8px; + min-width: 100px; + border-right: 1px solid #ddd; + white-space: nowrap; + width: 1%; + } + + td { + width: 99%; + padding-left: 8px; + } + + input, select { + width: 100%; + } + + &.add_line_container { + &:nth-child(2n+1) { + width: 98%; + float: none; + margin: auto; + } + + td { + text-align: center; + } + + .add_line { + line-height: 26px; + } + } + } + } + } +} diff --git a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml new file mode 100644 index 00000000000..f311207ad8c --- /dev/null +++ b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml @@ -0,0 +1,194 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<templates xml:space="preserve"> + + <t t-name="bank_statement_nothing_to_reconcile"> + <div class="oe_form_sheetbg"><div class="oe_form_sheet oe_form_sheet_width"> + <div class="oe_view_nocontent"><p> + <b>Good Job!</b> Bank statements are fully reconciled.</p> + <p>This page displays all the bank transactions that are to be reconciled and provides with a neat interface to do so.</p> + </div> + </div></div> + </t> + + <t t-name="bank_statement_reconciliation"> + <div class="oe_form_sheetbg"><div class="oe_form_sheet oe_form_sheet_width"> + <h1><t t-esc="title"/></h1> + <div class="progress progress-striped"> + <div class="progress-text"><span class="valuenow">0</span> / <span class="valuemax"><t t-esc="total_lines"/></span></div> + <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" t-att-aria-valuemax="total_lines" style="width: 0%;"> + </div> + </div> + <div class="oe_clear"></div> + <div class="reconciliation_lines_container"></div> + <p class='protip'>Tip : Hit ctrl-enter to validate the whole sheet.</p> + </div></div> + </t> + + <t t-name="bank_statement_reconciliation_done_message"> + <div class='done_message'> + <h2><t t-raw="title" /></h2> + <p>It took you <strong><t t-esc="time_taken" /></strong> to reconcile <strong><t t-esc="transactions_done" /> transactions.<br/></strong> That's on average <t t-esc="sec_per_item" /> seconds per transaction.</p> + <t t-if="done_with_ctrl_enter !== 0"> + <p>You validated <t t-esc="done_with_ctrl_enter" /> reconciliations with the ctrl-enter shortcut.</p> + </t> + <p class='achievements'> + <t t-foreach="achievements" t-as="achievement"> + <i class='fa fa-certificate achievement' t-att-data-title='achievement.title' t-att-data-content='achievement.desc'><i t-att-class="'fa '+achievement.icon"></i></i> + </t> + </p> + <p class="action_buttons"> + <t t-if="has_statement_id"> + <button class="button_back_to_statement">Back to statement</button> + <button class="button_close_statement">Close the statement</button> + </t> + </p> + </div> + </t> + + <t t-name="bank_statement_reconciliation_line"> + <table t-att-data-mode="mode"> + <tr> + <td> + <table class="accounting_view"> + <caption> + <button class="button_ok"></button> + <span class="partner_name"><t t-esc="line.partner_name"/></span> + <div class="change_partner_container oe_form"></div> + </caption> + <tbody class="tbody_initial_line"> + <tr class="initial_line"> + <td><span class="toggle_match glyphicon glyphicon-cog"></span></td> + <td><t t-esc="line.account_code"/></td> + <td><t t-esc="line.date"/></td> + <td><t t-esc="line.name"/> + <t t-if="line.amount_currency_str"> (<t t-esc="line.amount_currency_str"/>)</t></td> + <td><t t-if="line.amount > 0"> + <t t-esc="line.amount_str"/></t></td> + <td><t t-if="line.amount < 0"> + <t t-esc="line.amount_str"/></t></td> + <td><span class="line_info_button glyphicon glyphicon-info-sign" t-att-data-content="line.q_popover"></span></td> + </tr> + </tbody> + <tbody class="tbody_matched_lines"></tbody> + <tbody class="tbody_created_lines"></tbody> + <tbody class="tbody_open_balance"></tbody> + </table> + </td> + </tr> + <tr> + <td> + <div class="action_pane match"> + <div class="match_controls"> + <input type="text" class="filter" placeholder="Filter" value="" /> + <span class="pager_control_right pull-right glyphicon glyphicon-chevron-right"></span> + <span class="pager_control_left pull-right glyphicon glyphicon-chevron-left"></span> + </div> + <table></table> + </div> + + <div class="action_pane create"> + <!-- NB : I use a .quick_add:empty selector. whitespace characters being a node, there shall be none --> + <div class="quick_add btn-group btn-group-sm"><t t-foreach="presets" t-as="preset"><button type='button' class='btn btn-default preset' t-att-data-presetid="preset.id"><t t-esc="preset.name"/></button></t></div> + <div class="oe_form create_form"> + <!-- here come some form_create_field --> + <table class="create_field add_line_container"><tr><td><a href="javascript:void(0)" class="add_line">New</a></td></tr></table> + </div> + </div> + </td> + </tr> + </table> + </t> + + <t t-name="filter_no_match"> + <tr><td style='text-align: center;'>No result matching '<t t-esc="filter_str" />'</td></tr> + </t> + + <t t-name="form_create_field"> + <table t-att-class='"create_field create_"+id'><tr> + <th><t t-esc="label"/></th> + <td class="create_account_container" t-att-class='"create_"+id+"_container"'></td> + </tr></table> + </t> + + <t t-name="bank_statement_reconciliation_line_details"> + <table class='details'> + <tr><td>Date</td><td><t t-esc="line.date"/></td></tr> + <tr><td>Partner</td><td><t t-esc="line.partner_name"/></td></tr> + <tr t-if="line.ref"><td>Transaction</td><td><t t-esc="line.ref"/></td></tr> + <tr><td>Description</td><td><t t-esc="line.name"/></td></tr> + <tr><td>Amount</td><td><t t-esc="line.amount_str"/><t t-if="line.amount_currency_str"> (<t t-esc="line.amount_currency_str"/>)</t></td></tr> + <tr><td>Account</td><td><t t-esc="line.account_code"/> <t t-esc="line.account_name"/></td></tr> + </table> + </t> + + + <t t-name="bank_statement_reconciliation_move_line"> + <tr class="mv_line" t-att-data-lineid="line.id" t-att-data-selected="selected"> + <td><span class="glyphicon glyphicon-add-remove"></span></td> + <td><t t-esc="line.account_code"/></td> + <td><t t-esc="line.q_due_date"/></td> + <td><t t-esc="line.q_label"/></td> + + <td><t t-if="line.debit !== 0"> + <t t-if="line.propose_partial_reconcile" t-call="icon_do_partial_reconciliation"></t> + <t t-if="line.partial_reconcile" t-call="icon_undo_partial_reconciliation"></t> + <t t-esc="line.debit_str"/> + </t></td> + <td><t t-if="line.credit !== 0"> + <t t-if="line.propose_partial_reconcile"><t t-call="icon_do_partial_reconciliation" /></t> + <t t-if="line.partial_reconcile"><t t-call="icon_undo_partial_reconciliation" /></t> + <t t-esc="line.credit_str"/> + </t></td> + <td><span class="line_info_button glyphicon glyphicon-info-sign" t-att-data-content="line.q_popover"></span></td> + </tr> + </t> + + <t t-name="icon_do_partial_reconciliation"> + <i class="do_partial_reconcile_button fa fa-exclamation-triangle" data-content="This move's amount is higher than the transaction's amount. Click to do a partial reconciliation"></i> + </t> + + <t t-name="icon_undo_partial_reconciliation"> + <i class="undo_partial_reconcile_button fa fa-exclamation-triangle" data-content="Undo the partial reconciliation."></i> + </t> + + <t t-name="bank_statement_reconciliation_move_line_details"> + <table class='details'> + <tr><td>ID</td><td><t t-esc="line.id"/></td></tr> + <tr><td>Account</td><td><t t-esc="line.account_code"/> <t t-esc="line.account_name"/></td></tr> + <tr><td>Journal</td><td><t t-esc="line.journal_name"/></td></tr> + <tr><td>Period</td><td><t t-esc="line.period_name"/></td></tr> + <tr><td>Date</td><td><t t-esc="line.date"/></td></tr> + <tr><td>Due Date</td><td><t t-esc="line.q_due_date"/></td></tr> + <tr><td>Amount</td> + <td><t t-if="line.debit !== 0" t-esc="line.debit_str"/><t t-if="line.credit !== 0" t-esc="line.credit_str"/> + <t t-if="line.amount_currency_str"> (<t t-esc="line.amount_currency_str"/>)</t> + </td></tr> + </table> + </t> + + + <t t-name="bank_statement_reconciliation_created_line"> + <tr class="created_line" t-att-data-lineid="line.id"> + <td><t t-if="! line.no_remove_action"><span class="line_remove_button glyphicon glyphicon-remove"></span></t></td> + <td><t t-esc="line.account_num"/></td> + <td></td> + <td><t t-esc="line.label"/></td> + <td><t t-if="line.amount < 0"><t t-esc="line.amount_str"/></t></td> + <td><t t-if="line.amount > 0"><t t-esc="line.amount_str"/></t></td> + <td></td> + </tr> + </t> + + <t t-name="bank_statement_reconciliation_line_open_balance"> + <tr class="line_open_balance"> + <td><span class="toggle_create glyphicon glyphicon-play"></span></td> + <td><t t-esc="account_code"/></td> + <td></td> + <td>Open balance</td> + <td><t t-esc="debit"/></td> + <td><t t-esc="credit"/></td> + <td></td> + </tr> + </t> +</templates> diff --git a/addons/account_analytic_plans/static/src/js/account_bank_reconciliation.js b/addons/account_analytic_plans/static/src/js/account_bank_reconciliation.js new file mode 100644 index 00000000000..720c22eddc8 --- /dev/null +++ b/addons/account_analytic_plans/static/src/js/account_bank_reconciliation.js @@ -0,0 +1,35 @@ +openerp.account_analytic_plans = function(instance) { + +var _t = instance.web._t, + _lt = instance.web._lt; +var QWeb = instance.web.qweb; + +instance.web.account.bankStatementReconciliation.include({ + + init: function(parent, context) { + this._super(parent, context); + delete this.create_form_fields.analytic_account_id; + this.create_form_fields["analytic_plan"] = { + id: "analytic_plan", + index: 4, + corresponding_property: "analytics_id", + label: _t("Analytic Distribution"), + required: false, + tabindex: 14, + group: "analytic.group_analytic_accounting", + constructor: instance.web.form.FieldMany2One, + field_properties: { + relation: "account.analytic.plan.instance", + string: _t("Analytic Distribution"), + type: "many2one", + } + }; + }, + + start: function() { + return this._super().then(function() { + }); + }, + +}); +}; diff --git a/addons/account_analytic_plans/views/account_analytic_plans.xml b/addons/account_analytic_plans/views/account_analytic_plans.xml new file mode 100644 index 00000000000..306e8616496 --- /dev/null +++ b/addons/account_analytic_plans/views/account_analytic_plans.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- vim:fdn=3: +--> +<openerp> + <data> + <template id="assets_backend" name="account analytic plans assets" inherit_id="web.assets_backend"> + <xpath expr="." position="inside"> + <script type="text/javascript" src="/account_analytic_plans/static/src/js/account_bank_reconciliation.js"></script> + </xpath> + </template> + </data> +</openerp> diff --git a/addons/l10n_be_coda/l10n_be_coda_demo.xml b/addons/l10n_be_coda/l10n_be_coda_demo.xml new file mode 100644 index 00000000000..63436a60a92 --- /dev/null +++ b/addons/l10n_be_coda/l10n_be_coda_demo.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" ?> +<openerp> + <data> + <record id="demo_bank_account" model="res.partner.bank"> + <field name="state">bank</field> + <field name="acc_number">BE33737018595246</field> + <field name="bank_bic">KREDBEBB</field> + <field name="journal_id" ref="account.bank_journal"/> + <field name="partner_id" ref="base.main_partner"/> + </record> + <!-- + Fiscal year + --> + + <record id="data_fiscalyear_2011" model="account.fiscalyear"> + <field eval="'Fiscal Year X 2011'" name="name"/> + <field eval="'FY2011'" name="code"/> + <field eval="'2011-01-01'" name="date_start"/> + <field eval="'2011-12-31'" name="date_stop"/> + <field name="company_id" ref="base.main_company"/> + </record> + + <!-- + Fiscal Periods + --> + + <record id="period_1_2011" model="account.period"> + <field eval="'01/2011'" name="code"/> + <field eval="'X 01/2011'" name="name"/> + <field name="fiscalyear_id" ref="data_fiscalyear_2011"/> + <field eval="'2011-01-01'" name="date_start"/> + <field eval="'2011-01-31'" name="date_stop"/> + <field name="company_id" ref="base.main_company"/> + </record> + </data> +</openerp> |
