bzr revid: fp@openerp.com-20120716221706-esjx9mluww4zfio5
This commit is contained in:
Fabien Pinckaers 2012-07-17 00:17:06 +02:00
parent 8cd7293033
commit f2a73d9286
6 changed files with 134 additions and 107 deletions

View File

@ -474,7 +474,7 @@ class account_account(osv.osv):
'shortcut': fields.char('Shortcut', size=12),
'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel',
'account_id', 'tax_id', 'Default Taxes'),
'note': fields.text('Note'),
'note': fields.text('Internal Notes'),
'company_currency_id': fields.function(_get_company_currency, type='many2one', relation='res.currency', string='Company Currency'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'active': fields.boolean('Active', select=2, help="If the active field is set to False, it will allow you to hide the account without removing it."),

View File

@ -97,8 +97,8 @@ class account_bank_statement(osv.osv):
_description = "Bank Statement"
_inherit = ['mail.thread']
_columns = {
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement
'date': fields.date('Creation Date', required=True, states={'confirm': [('readonly', True)]}, select=True),
'name': fields.char('Reference', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}, select=True),
'journal_id': fields.many2one('account.journal', 'Journal', required=True,
readonly=True, states={'draft':[('readonly',False)]}),
'period_id': fields.many2one('account.period', 'Period', required=True,

View File

@ -169,41 +169,37 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account" version="7.0">
<label for="name" class="oe_edit_only" string="Account Name and Code:"/>
<label for="code" class="oe_edit_only" string="Account Code and Name"/>
<h1>
<field name="name"/> -
<field name="code"/>
<field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
<field name="name" class="oe_inline" placeholder="Account name"/>
</h1>
<label for="company_id"/>
<h2>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</h2>
<group>
<group>
<field name="parent_id"/>
<field name="type"/>
<field name="user_type"/>
<field name="active"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<group>
<field name="debit" invisible="context.get('config_invisible', True)" attrs="{'readonly':[('type','=','view')]}"/>
<field name="credit" invisible="context.get('config_invisible', True)" attrs="{'readonly':[('type','=','view')]}"/>
<field name="balance" invisible="context.get('config_invisible', True)"/>
<field name="debit" attrs="{'readonly':[('type','=','view')]}"/>
<field name="credit" attrs="{'readonly':[('type','=','view')]}"/>
<field name="balance"/>
</group>
<group>
<field name="tax_ids" domain="[('parent_id','=',False)]" widget="many2many_tags"/>
<field name="reconcile"/>
<field name="child_consol_ids"
attrs="{'readonly':[('type','!=','consolidation')]}"
attrs="{'invisible':[('type','!=','consolidation')]}"
widget="many2many_tags"/>
</group>
<group string="Currency">
<group>
<field name="currency_id"/>
<field name="currency_mode" attrs="{'readonly': [('currency_id','=',False)]}"/>
</group>
<group string="Reconcile">
<field name="reconcile"/>
</group>
</group>
<label for="note"/>
<field name="note"/>
</form>
</field>
@ -624,15 +620,21 @@
<sheet>
<group>
<group>
<field name="name"/>
<field name="date" on_change="onchange_date(date, company_id)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="period_id"/>
<label for="date" string="Date / Period"/>
<div>
<field name="date" on_change="onchange_date(date, company_id)" class="oe_inline"/>
<field name="period_id" class="oe_inline"/>
</div>
<field name="name"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
</group><group>
<field name="balance_start"/>
<label for="balance_start"/>
<div>
<field name="balance_start" class="oe_inline"/>
<field name="currency" class="oe_inline"/>
</div>
<field name="balance_end_real"/>
<field name="currency" invisible="1"/>
</group>
</group>
@ -918,47 +920,68 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Tax" version="7.0">
<group col="4">
<field name="name"/>
<field name="description"/>
<field name="type_tax_use"/>
<field name="price_include"/>
<field name="active"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<group>
<group>
<field name="name"/>
<field name="description"/>
<group>
</group>
<field name="type_tax_use"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="active"/>
</group>
</group>
<notebook>
<page string="Tax Definition">
<group col="4">
<field name="type"/>
<field name="amount" attrs="{'readonly':[('type','in',('none', 'code', 'balance'))]}"/>
<separator colspan="4" string="Accounting Information"/>
<group>
<group string="Tax Computation">
<label for="type"/>
<div>
<field name="type"/>
<field name="amount" class="oe_inline"
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
<label string="%%" attrs="{'invisible':[('type','&lt;&gt;','percent')]}"/>
</div>
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
<field name="price_include"/>
</group>
<group string="Misc">
<field name="sequence"/>
<field name="include_base_amount"/>
<field name="child_depend"/>
</group>
<group string="Invoices">
<field name="account_collected_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="account_analytic_collected_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id), ('parent_id', '&lt;&gt;', False)]" groups="analytic.group_analytic_accounting"/>
<field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id), ('parent_id', '&lt;&gt;', False)]" groups="analytic.group_analytic_accounting"/>
<separator colspan="4" string="Tax Declaration: Invoices"/>
<field name="base_code_id"/>
<field name="base_sign"/>
<field name="tax_code_id"/>
<field name="tax_sign"/>
<separator colspan="4" string="Tax Declaration: Credit Notes"/>
</group>
<group string="Refunds">
<field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id), ('parent_id', '&lt;&gt;', False)]" groups="analytic.group_analytic_accounting"/>
<field name="ref_base_code_id"/>
<field name="ref_base_sign"/>
<field name="ref_tax_code_id"/>
<field name="ref_tax_sign"/>
<separator colspan="4" string="Children Definition"/>
<field name="child_depend"/>
<field name="sequence"/>
<field name="include_base_amount"/>
<field colspan="4" name="child_ids">
</group>
<group string="Children/Sub Taxes" colspan="2">
<field name="child_depend" class="oe_inline"/>
<field name="child_ids" nolabel="1" colspan="2">
<tree string="Account Tax">
<field name="sequence"/>
<field name="name"/>
<field name="price_include"/>
<field name="description"/>
</tree>
</field>
</field>
</group>
</group>
</page>
<page string="Special Computation">
<group col="4">
@ -967,10 +990,6 @@
<field name="domain"/>
<separator colspan="4" string="Applicable Code (if type=code)"/>
<field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
<separator colspan="2" string="Compute Code"/>
<separator colspan="2" string="Reverse Compute Code"/>
<field colspan="2" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
<field colspan="2" name="python_compute_inv" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
</group>
</page>
</notebook>

View File

@ -15,7 +15,7 @@
<field name="period_id" invisible="context.get('visible', True)"/>
<field name="type" invisible="context.get('visible', True)"/>
<field name="amount" sum="Total Amount"/>
<field name="audit"/>
<field name="audit" invisible="1"/>
<field name="state"/>
</tree>
</field>

View File

@ -149,26 +149,31 @@
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" invisible="context.get('line_type', False)"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Bill Payment">
<group col="6">
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection"
on_change="onchange_journal(journal_id, line_dr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/>
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="account_id"
widget="selection"
invisible="True"/>
<field name="pre_line" invisible="1"/>
<field name="type" invisible="True"/>
<field name="currency_id" invisible="1" colspan="4"/>
<sheet>
<field name="account_id" invisible="True"/>
<field name="pre_line" invisible="1"/>
<field name="type" invisible="True"/>
<group>
<group>
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id, 'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" string="Supplier"/>
<label for="amount" string="Amount"/>
<div>
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)" class="oe_inline"/>
<field name="currency_id" class="oe_inline"/>
</div>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection"
on_change="onchange_journal(journal_id, line_dr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/>
</group>
<group>
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<page string="Payment Information">
@ -311,10 +316,15 @@
<group>
<group>
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="amount"
invisible="context.get('line_type', False)"
string="Paid Amount"
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<label for="amount"
string="Paid Amount"/>
<div>
<field name="amount" class="oe_inline"
invisible="context.get('line_type', False)"
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="currency_id" class="oe_inline"/>
</div>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
@ -323,7 +333,6 @@
string="Payment Method"/>
</group>
<group>
<field name="currency_id" invisible="1"/>
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>

View File

@ -88,18 +88,18 @@
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Sales Receipt" >
<h1><label for="number" string="Sales Receipt "/><field name="number" class="oe_inline"/></h1>
<h1><label for="number" string="Sale Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
<group>
<group>
<field name="partner_id" domain="[('customer','=',True)]" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": true}'/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<group>
<field name="currency_id" invisible="1"/>
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
<field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="name"/>
<field name="paid" invisible="1"/>
<field name="currency_id" invisible="1"/>
</group>
<field name="type" invisible="True"/>
</group>
@ -118,16 +118,17 @@
<group class="oe_subtotal_footer oe_right">
<field name="tax_id"
on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
widget="selection"
widget="selection" nolabel="1"
placeholder="select tax..."
domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
<div>
<label for="tax_amount"/>
<field name="tax_amount" nolabel="1"/>
<div class="oe_subtotal_footer_separator">
<label for="amount"/>
<button type="object" class="oe_link oe_edit_only"
name="compute_tax" string="(update)"
attrs="{'invisible': [('state','!=','draft')]}"/>
</div>
<field name="tax_amount" nolabel="1"/>
<field name="amount" class="oe_subtotal_footer_separator" />
<field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
</group>
<group>
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
@ -228,37 +229,30 @@
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet string="Supplier Voucher">
<div class="oe_title">
<label for="number" class="oe_edit_only"/>
<h1><field name="number" readonly="0" /></h1>
</div>
<h1><label for="number" string="Purchase Receipt"/> <field name="number" class="oe_inline" readonly="1"/></h1>
<field name="pay_now" invisible="1"/>
<field name="account_id" domain="[('type','=','other')]" invisible="True"/>
<field name="type" invisible="True"/>
<group>
<group>
<field name="partner_id" domain="[('supplier','=',True)]" required="1" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" />
<field name="date" string="Bill Date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="date_due"/>
<field name="partner_id" domain="[('supplier','=',True)]" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" />
<field name="name" colspan="2"/>
<field name="reference"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<group>
<field name="date" string="Bill Date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="date_due"/>
<field name="paid" invisible="1"/>
<field name="currency_id"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id"
domain="[('type','in',['purchase','purchase_refund'])]"
widget="selection"
on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
<field name="reference"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</group>
<group col="6">
<field name="account_id" domain="[('type','=','other')]" invisible="True"/>
<field name="type" invisible="True"/>
</group>
<notebook colspan="4">
<notebook>
<page string="Bill Information">
<field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" context="{'journal_id':journal_id,'partner_id':partner_id}">
<tree string="Expense Lines" editable="bottom">
@ -269,10 +263,8 @@
</tree>
</field>
<group>
<group>
<field name="narration" placeholder="Internal Notes" nolabel="1" />
</group>
<group class="oe_subtotal_footer">
<field name="narration" placeholder="Internal Notes" nolabel="1"/>
<group class="oe_subtotal_footer oe_right">
<!--
<div>
<label for="tax_id" />
@ -284,13 +276,20 @@
-->
<field name="tax_id"
on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
widget="selection"
widget="selection" nolabel="1"
placeholder="select tax..."
domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"
/>
<field name="tax_amount" />
<field name="amount" string="Total" class="oe_subtotal_footer_separator"/>
</group>
<field name="tax_amount" nolabel="1"/>
<div class="oe_subtotal_footer_separator">
<label for="amount"/>
<button type="object" class="oe_link oe_edit_only"
name="compute_tax" string="(update)"
attrs="{'invisible': [('state','!=','draft')]}"/>
</div>
<field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
</group>
</group>
</page>
<page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">