[IMP] Misc improvements on accouting views

This commit is contained in:
Fabien Pinckaers
2015-08-22 11:44:17 +02:00
parent 41e730cbfa
commit 5fe086a520
6 changed files with 51 additions and 55 deletions
@@ -318,6 +318,7 @@ class account_journal(models.Model):
if action_rec:
action = action_rec.read([])[0]
action['context'] = ctx
action['domain'] = [('journal_id','=',self.id),('payment_type','=',payment_type)]
return action
@api.multi
@@ -65,7 +65,7 @@
<td>
<div class="action_pane match">
<div class="match_controls">
<input type="text" class="filter" placeholder="Filter" value="" />
<input type="text" class="filter" placeholder="Filter..." value="" />
<span class="pager_control_right pull-right fa fa-chevron-right"></span>
<span class="pager_control_left pull-right fa fa-chevron-left"></span>
</div>
+12 -10
View File
@@ -213,7 +213,7 @@
<header>
<button name="invoice_open" states="draft,proforma2" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="%(action_account_invoice_payment)d" type="action" states="open" string="Register Payment" groups="account.group_account_invoice" class="oe_highlight"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid' groups="account.group_account_invoice" attrs="{'invisible': [('type', '=', 'in_refund')]}"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' groups="account.group_account_invoice" attrs="{'invisible': ['|',('type', '=', 'in_refund'),('state','not in',('open','paid'))]}"/>
<button name="invoice_cancel" states="draft,proforma2" string="Cancel Bill" groups="account.group_account_invoice"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
@@ -228,7 +228,7 @@
<label string="Draft Refund" attrs="{'invisible': ['|',('state','&lt;&gt;','draft'), ('type','&lt;&gt;','in_refund')]}"/>
<label string="Bill " attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','&lt;&gt;','in_invoice')]}"/>
<label string="Refund " attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','&lt;&gt;','in_refund')]}"/>
<h1>
<h1 class="mt0">
<field name="number" class="oe_inline" attrs="{'invisible': [('state', '=', 'draft')]}"/>
</h1>
</div>
@@ -365,7 +365,7 @@
<label string="Pro Forma Invoice" attrs="{'invisible': [('state','not in',('proforma','proforma2'))]}"/>
<label string="Invoice " attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','&lt;&gt;','out_invoice')]}"/>
<label string="Refund " attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','&lt;&gt;','out_refund')]}"/>
<h1>
<h1 class="mt0">
<field name="number" readonly="1" class="oe_inline"/>
</h1>
<field name="type" invisible="1"/>
@@ -504,11 +504,13 @@
<field name="arch" type="xml">
<search string="Search Invoice">
<field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('reference', 'ilike', self), ('partner_id', 'child_of', self)]"/>
<filter name="draft" string="Draft" domain="[('state','in',('draft', 'proforma', 'proforma2'))]" help="Draft Invoices"/>
<filter name="proforma" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
<filter name="invoices" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>
<filter name="unpaid" string="Unpaid" domain="[('state','=','open')]" help="Unpaid Invoices"/>
<filter name="late" string="Overdue" domain="[('date_due', '&lt;', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue Invoices"/>
<filter name="draft" string="Draft" domain="[('state','in',('draft', 'proforma'))]"/>
<filter name="proforma" string="Proforma" domain="[('state','=','proforma2')]" groups="account.group_proforma_invoices"/>
<filter name="invoices" string="Invoices" domain="[('state','in',['open','paid']),('type','in',('out_invoice','in_invoice'))]"/>
<filter name="refunds" string="Refunds" domain="[('state','in',['open','paid']),('type','in',('out_refund','in_refund'))]"/>
<separator/>
<filter name="unpaid" string="Not Paid" domain="[('state','=','open')]"/>
<filter name="late" string="Overdue" domain="[('date_due', '&lt;', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue invoices, maturity date passed"/>
<separator/>
<field name="partner_id" operator="child_of"/>
<field name="user_id" string="Salesperson"/>
@@ -520,8 +522,8 @@
<filter string="Salesperson" context="{'group_by':'user_id'}"/>
<filter name="status" string="Status" context="{'group_by':'state'}"/>
<separator/>
<filter string="Period" context="{'group_by':'date'}"/>
<filter string="Due Month" context="{'group_by':'date_due'}"/>
<filter string="Invoice Date" context="{'group_by':'date'}"/>
<filter string="Due Date" context="{'group_by':'date_due'}"/>
</group>
</search>
</field>
@@ -137,7 +137,7 @@
<div>
<a type="object" name="action_create_new" context="{'refund':True}">
<span t-if="journal_type == 'sale'">Refund</span>
<span t-if="journal_type == 'purchase'">Refund Bill</span>
<span t-if="journal_type == 'purchase'">Bill Refund</span>
</a>
</div>
</div>
@@ -205,19 +205,14 @@
- If there are statements to reconcile, a link to reconcile them -->
<div class="col-xs-6 o_kanban_primary_left">
<t t-if="journal_type == 'bank'">
<t t-if="! dashboard.bank_statements_source">
<div name="bank_journal_default_cta">
<button type="object" name="create_bank_statement" class="btn btn-primary btn-sm">Create Statement</button>
</div>
</t>
<t t-if="dashboard.bank_statements_source">
<div name="bank_journal_cta">
<button t-if="dashboard.bank_statements_source == 'manual'" type="object" name="create_bank_statement" class="btn btn-primary btn-sm">Create Statement</button>
</div>
</t>
<div name="bank_journal_default_cta" t-if="! dashboard.bank_statements_source">
<button type="object" name="create_bank_statement" class="btn btn-primary btn-sm">New Statement</button>
</div>
<div name="bank_journal_cta" t-if="dashboard.bank_statements_source">
<button t-if="dashboard.bank_statements_source == 'manual'" type="object" name="create_bank_statement" class="btn btn-primary btn-sm">New Statement</button>
</div>
</t>
<button t-if="journal_type == 'cash'" type="object" name="create_cash_statement" class="btn btn-primary btn-sm">Register Transactions</button>
<br/>
<button t-if="journal_type == 'cash'" type="object" name="create_cash_statement" class="btn btn-primary btn-sm">New Transactions</button>
<t t-if="!dashboard.no_statement and dashboard.number_to_reconcile > 0">
<a type="object" name="action_open_reconcile" class="oe_inline"> Reconcile <t t-esc="dashboard.number_to_reconcile"/> Items</a>
</t>
@@ -227,7 +222,7 @@
<div class="col-xs-6 o_kanban_primary_right">
<div class="row">
<div class="col-xs-6">
<span title="Balance in Odoo">Balance in Odoo:</span>
<span title="Balance in Odoo">Balance in Odoo</span>
</div>
<div class="col-xs-6 text-right">
<span><t t-esc="dashboard.account_balance"/></span>
@@ -235,7 +230,7 @@
</div>
<div class="row" name="latest_statement">
<div class="col-xs-6">
<span title="Latest Statement">Latest Statement:</span>
<span title="Latest Statement">Latest Statement</span>
</div>
<div class="col-xs-6 text-right">
<span><t t-esc="dashboard.last_balance"/></span>
@@ -298,9 +293,9 @@
<field name="domain">[]</field>
<field name="help" type="html">
<p>
This Dashboard helps you manage your accounting.
If you have not yet installed a chart of account, please install one first.
<a type="action" name="%(open_account_charts_modules)d">Go to the list</a>
This is the accounting dashboard. If you have not yet
installed a chart of account, please install one first.
<a type="action" name="%(open_account_charts_modules)d">Browse available countries.</a>
</p>
</field>
</record>
+22 -23
View File
@@ -20,21 +20,21 @@
</div>
<field name="code" placeholder="code"/>
<field name="user_type_id" widget="selection"/>
<field name="tax_ids" widget="many2many_tags"/>
<field name="tag_ids" widget="many2many_tags" domain="[('applicability', '!=', 'taxes')]" context="{'default_applicability': 'accounts'}"/>
<field name="deprecated"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
<field name="internal_type" invisible="1"/>
<field name="tax_ids" widget="many2many_tags"/>
<field name="reconcile"/>
<field name="deprecated"/>
</group>
<group>
<div class="row">
<div class="col-md-8 col-md-offset-2 col-sm-12 no-margin-top">
<p class="text-center" style="font-weight: bold;">How account type affects your reports</p>
<div class="col-md-11 col-md-offset-1 col-sm-12 no-margin-top" style="background-color: #eee">
<p class="text-center" style="font-weight: bold;">How account type affects your reports?</p>
<div class="col-md-6 col-sm-6">
<div class="oe_account_help">
<p class="oe_account_font_help" style="text-align: center;color: grey;"> Profit &amp; Loss</p>
<p class="oe_account_font_help text-center">Profit &amp; Loss</p>
<p class="oe_account_font_help oe_account_font_title">Income</p>
<p class="oe_account_font_help oe_account_font_title">Less Cost of Sales</p>
<p class="oe_account_font_help oe_account_font_content">Direct Costs</p>
@@ -61,7 +61,7 @@
</div>
<div class="col-md-6 col-sm-6">
<div class="oe_account_help">
<p class="oe_account_font_help" style="text-align: center;color: grey;">Balance Sheet</p>
<p class="oe_account_font_help text-center">Balance Sheet</p>
<p class="oe_account_font_help oe_account_font_title" style="color: grey;">Current Assets</p>
<p class="oe_account_font_help oe_account_font_content">Receivable Accounts</p>
<p class="oe_account_font_help oe_account_font_content">Prepayments</p>
@@ -82,7 +82,7 @@
</div>
</group>
</group>
</sheet>
</sheet>
</form>
</field>
</record>
@@ -223,7 +223,6 @@
<filter domain="[('type', '=', 'purchase')]" string="Purchase"/>
<filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity"/>
<filter domain="[('type', 'not in', ['sale', 'purchase', 'cash', 'bank'])]" string="Miscellaneous"/>
<separator/>
<filter name="dashboard" string="Favorites" domain="[('show_on_dashboard', '=', True)]"/>
</search>
</field>
@@ -237,7 +236,7 @@
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<h1><field name="name" class="oe_inline"/></h1>
</div>
<group>
<group>
@@ -307,7 +306,6 @@
<tree string="Account Journal">
<field name='sequence' widget='handle'/>
<field name="name"/>
<field name="display_on_footer"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
@@ -464,8 +462,8 @@
<field name="balance_start"/>
<field name="balance_end_real"/>
<field name="balance_end" invisible="1"/>
<field name="state" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="state"/>
</tree>
</field>
</record>
@@ -615,8 +613,9 @@
<field name="model">account.bank.statement.line</field>
<field name="arch" type="xml">
<search string="Search Bank Statements Line">
<field name="statement_id" string="Bank Statement"/>
<field name="name" string="Bank Statement Line"/>
<field name="name"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="date"/>
<field name="journal_id" domain="[('type', 'in', ('bank', 'cash'))]" />
</search>
@@ -709,16 +708,15 @@
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" placeholder="e.g. Bank Fees"/></h1>
<h1><field name="name" placeholder="e.g. Bank Fees" class="oe_inline"/></h1>
</div>
<field class="oe_right oe_inline" nolabel="1" name="company_id" groups="base.group_multi_company"/>
<br/><br/><br/>
<group>
<group>
<field name="account_id" domain="[('company_id', '=', company_id)]"/>
<field name="amount_type"/>
<field name="tax_id" domain="[('company_id', '=', company_id)]" widget="selection" />
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', company_id)]"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group>
<field name="label"/>
@@ -731,8 +729,8 @@
</group>
</group>
<div class="oe_edit_only">
<label for="has_second_line" string="Second line"/>
<field name="has_second_line" />
<label for="has_second_line" string="Add a second line"/>
</div>
<group attrs="{'invisible':[('has_second_line','!=',True)]}">
<group>
@@ -914,7 +912,6 @@
<field name="amount" class="oe_inline" />
<label string="%" class="oe_inline" attrs="{'invisible':[('amount_type','=','fixed')]}" />
</div>
<field name="tax_group_id"/>
</group>
<group attrs="{'invisible':[('amount_type','=', 'group')]}">
<field name="account_id"/>
@@ -980,8 +977,9 @@
<group>
<group>
<field name="description" attrs="{'invisible':[('amount_type','=', 'group')]}"/>
<field name="analytic" attrs="{'invisible':[('amount_type','=', 'group')]}" groups="analytic.group_analytic_accounting" />
<field name="tax_group_id"/>
<field name="tag_ids" domain="[('applicability', '!=', 'accounts')]" widget="many2many_tags" context="{'default_applicability': 'taxes'}"/>
<field name="analytic" attrs="{'invisible':[('amount_type','=', 'group')]}" groups="analytic.group_analytic_accounting" />
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field name="active" groups="base.group_no_one"/>
</group>
@@ -1626,15 +1624,16 @@
<group>
<field name="description" attrs="{'invisible':[('amount_type','=', 'group')]}"/>
<field name="analytic" attrs="{'invisible':[('amount_type','=', 'group')]}" groups="analytic.group_analytic_accounting" />
<br/><br/>
<field name="tag_ids" domain="[('applicability', '!=', 'accounts')]" widget="many2many_tags" context="{'default_applicability': 'taxes'}"/>
<field name="active" groups="base.group_no_one"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
<group>
<field name="price_include" attrs="{'invisible':[('amount_type','=', 'group')]}" />
<field name="include_base_amount" attrs="{'invisible':[('amount_type','=', 'group')]}" />
</group>
<group>
<field name="tag_ids" domain="[('applicability', '!=', 'accounts')]" widget="many2many_tags" context="{'default_applicability': 'taxes'}"/>
<field name="active" groups="base.group_no_one"/>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
</group>
</page>
</notebook>
+2 -3
View File
@@ -78,13 +78,12 @@
</div>
</group>
<group string="Fiscal Year">
<label for="id" string="Financial Year End"/>
<label for="id" string="Fiscal Year Last Day"/>
<div>
<label for="fiscalyear_last_day" string="Last Day"/>
<field name="fiscalyear_last_day" class="oe_inline"/>
<field name="fiscalyear_last_month" class="oe_inline"/>
</div>
<label for="id" string="Lock Dates"/>
<label for="id" string="Lock Entries"/>
<div>
<div>
<label for="period_lock_date"/>