[IMP] account: improve config settings form
bzr revid: rco@openerp.com-20120622143918-wj831n3sdpwa670x
This commit is contained in:
parent
8d3206eda6
commit
6e6df55cd5
|
@ -37,7 +37,7 @@ class account_config_settings(osv.osv_memory):
|
|||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'has_default_company': fields.boolean('Has default company', readonly=True),
|
||||
'expects_chart_of_accounts': fields.related('company_id', 'expects_chart_of_accounts', type='boolean',
|
||||
string='This Company Has it\'s Own Chart of Accounts',
|
||||
string='This Company Has its Own Chart of Accounts',
|
||||
help="""Check this box if this company is a legal entity."""),
|
||||
'currency_id': fields.related('company_id', 'currency_id', type='many2one', relation='res.currency', required=True,
|
||||
string='Default Company Currency', help="Main currency of the company."),
|
||||
|
@ -61,28 +61,28 @@ class account_config_settings(osv.osv_memory):
|
|||
'period': fields.selection([('month', 'Monthly'), ('3months','3 Monthly')], 'Periods', required=True),
|
||||
|
||||
'sale_journal_id': fields.many2one('account.journal', 'Sale Journal'),
|
||||
'sale_sequence_prefix': fields.related('sale_journal_id', 'sequence_id', 'prefix', type='char', string='Next Invoice Number'),
|
||||
'sale_sequence_prefix': fields.related('sale_journal_id', 'sequence_id', 'prefix', type='char', string='Invoice Sequence'),
|
||||
'sale_sequence_next': fields.related('sale_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Invoice Number'),
|
||||
'sale_refund_journal_id': fields.many2one('account.journal', 'Sale Refund Journal'),
|
||||
'sale_refund_sequence_prefix': fields.related('sale_refund_journal_id', 'sequence_id', 'prefix', type='char', string=' Next Credit Note Number'),
|
||||
'sale_refund_sequence_prefix': fields.related('sale_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Credit Note Sequence'),
|
||||
'sale_refund_sequence_next': fields.related('sale_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Credit Note Number'),
|
||||
'purchase_journal_id': fields.many2one('account.journal', 'Purchase Journal'),
|
||||
'purchase_sequence_prefix': fields.related('purchase_journal_id', 'sequence_id', 'prefix', type='char', string='Next Supplier Invoice Number'),
|
||||
'purchase_sequence_prefix': fields.related('purchase_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Invoice Sequence'),
|
||||
'purchase_sequence_next': fields.related('purchase_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Invoice Number'),
|
||||
'purchase_refund_journal_id': fields.many2one('account.journal', 'Purchase Refund Journal'),
|
||||
'purchase_refund_sequence_prefix': fields.related('purchase_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Next Supplier Credit Note Number'),
|
||||
'purchase_refund_sequence_prefix': fields.related('purchase_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Credit Note Sequence'),
|
||||
'purchase_refund_sequence_next': fields.related('purchase_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Credit Note Number'),
|
||||
|
||||
'module_account_check_writing': fields.boolean('Check Writing',
|
||||
help="""This allows you to check writing and printing.
|
||||
This installs the module account_check_writing."""),
|
||||
'module_account_accountant': fields.boolean('Accountant Features',
|
||||
help="""If you do not check this box, you will be able to do invoicing & payments, but not accounting (Journal Items, Chart of Accounts, ...)."""),
|
||||
help="""If you do not check this box, you will be able to do invoicing & payments, but not accounting (Journal Items, Chart of Accounts, ...)"""),
|
||||
'module_account_asset': fields.boolean('Assets Management',
|
||||
help="""This allows you to manage the assets owned by a company or a person.
|
||||
It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.
|
||||
This installs the module account_asset. If you do not check this box, you will be able to do invoicing & payments,
|
||||
but not accounting (Journal Items, Chart of Accounts, ...) """),
|
||||
This installs the module account_asset. If you do not check this box, you will be able to do invoicing & payments,
|
||||
but not accounting (Journal Items, Chart of Accounts, ...)"""),
|
||||
'module_account_budget': fields.boolean('Budget Management',
|
||||
help="""This allows accountants to manage analytic and crossovered budgets.
|
||||
Once the master budgets and the budgets are defined,
|
||||
|
@ -110,8 +110,10 @@ class account_config_settings(osv.osv_memory):
|
|||
'group_proforma_invoices': fields.boolean('Allow Pro-forma Invoices',
|
||||
implied_group='account.group_proforma_invoices',
|
||||
help="Allows you to put invoices in pro-forma state."),
|
||||
'default_sale_tax': fields.many2one('account.tax', 'Default Sale Tax', help="Selected tax will be applied by default to Product's Sale Tax, while creating a new product."),
|
||||
'default_purchase_tax': fields.many2one('account.tax', 'Default Purchase Tax', help="Selected tax will be applied by default to Product's Purchase Tax, while creating a new product."),
|
||||
'default_sale_tax': fields.many2one('account.tax', 'Default Sale Tax',
|
||||
help="This sale tax will be assigned by default on new products."),
|
||||
'default_purchase_tax': fields.many2one('account.tax', 'Default Purchase Tax',
|
||||
help="This purchase tax will be assigned by default on new products."),
|
||||
'decimal_precision': fields.integer('Decimal Precision on Journal Entries',
|
||||
help="""As an example, a decimal precision of 2 will allow journal entries like: 9.99 EUR, whereas a decimal precision of 4 will allow journal entries like: 0.0231 EUR."""),
|
||||
}
|
||||
|
|
|
@ -21,45 +21,59 @@
|
|||
<button string="Cancel" special="cancel"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group string="Accounting Details of Company" col="4" groups="base.group_multi_company">
|
||||
<field name="has_default_company" invisible="1" />
|
||||
<field name="has_chart_of_accounts" invisible="1"/>
|
||||
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
|
||||
<field name="has_default_company" invisible="1" />
|
||||
<field name="has_chart_of_accounts" invisible="1"/>
|
||||
<field name="complete_tax_set" invisible="1"/>
|
||||
<field name="has_fiscal_year" invisible="1"/>
|
||||
|
||||
<group groups="base.group_multi_company">
|
||||
<field name="company_id" string="Select Company" widget="selection"
|
||||
on_change="onchange_company_id(company_id)"
|
||||
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
|
||||
<field name="expects_chart_of_accounts"/>
|
||||
</group>
|
||||
|
||||
<group string="Select a Chart of Accounts to Install" col="4" groups="base.group_multi_company" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
|
||||
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
|
||||
<group string="Select a Chart of Accounts to Install"
|
||||
attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
|
||||
<group>
|
||||
<field name="chart_template_id" widget="selection" domain="[('visible','=', True)]"
|
||||
on_change="onchange_chart_template_id(chart_template_id)"/>
|
||||
<field name="code_digits" groups="account.group_account_user"/>
|
||||
<field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
|
||||
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
|
||||
<field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
|
||||
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
|
||||
<field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
|
||||
<field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
|
||||
</group>
|
||||
<button string="Install More Chart Templates" icon="gtk-go-forward"
|
||||
name="%(open_account_charts_modules)d" type="action"/>
|
||||
<field name="code_digits" groups="account.group_account_user"/>
|
||||
<newline/>
|
||||
<field name="complete_tax_set" invisible="1"/>
|
||||
<field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
|
||||
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
|
||||
<field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
|
||||
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
|
||||
<field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
|
||||
<field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
|
||||
</group>
|
||||
|
||||
<field name="has_fiscal_year" invisible="1"/>
|
||||
<group string="No Fiscal Year Defined for this Company" col="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
|
||||
<field name="date_start" on_change="onchange_start_date(date_start)"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="period" colspan="4"/>
|
||||
<group string="No Fiscal Year Defined for This Company"
|
||||
attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
|
||||
<label for="date_start" string="Date Range"/>
|
||||
<div>
|
||||
<field name="date_start" on_change="onchange_start_date(date_start)" class="oe_inline"/> -
|
||||
<field name="date_stop" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="period"/>
|
||||
</group>
|
||||
|
||||
<field name="complete_tax_set" invisible="1"/>
|
||||
<group colspan="" col="2" string="Accounting Configuration">
|
||||
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
|
||||
<group string="Accounting Configuration">
|
||||
<group>
|
||||
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"
|
||||
attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
|
||||
<field name="module_account_accountant"/>
|
||||
<field name="module_account_asset"/>
|
||||
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="module_account_budget"/>
|
||||
<field name="decimal_precision"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"
|
||||
attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
|
||||
<field name="module_account_asset"/>
|
||||
<field name="module_account_budget"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<field name="sale_journal_id" invisible="1"/>
|
||||
|
@ -68,45 +82,52 @@
|
|||
<field name="purchase_refund_journal_id" invisible="1"/>
|
||||
<group>
|
||||
<group string="Customer Invoices">
|
||||
<label string="Next Invoice Number" for="sale_sequence_prefix" help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<div>
|
||||
<field name="sale_sequence_prefix" class="oe_inline"/>
|
||||
<field name="sale_sequence_next" class="oe_inline" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
|
||||
</div>
|
||||
|
||||
<label string="Next Credit Note Number" for="sale_refund_sequence_prefix" help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<div>
|
||||
<field name="sale_refund_sequence_prefix" class="oe_inline"/>
|
||||
<field name="sale_refund_sequence_next" class="oe_inline" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
|
||||
</div>
|
||||
<label for="sale_sequence_next"/>
|
||||
<group>
|
||||
<field name="sale_sequence_prefix" class="oe_inline" nolabel="1"
|
||||
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<field name="sale_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
|
||||
</group>
|
||||
<label for="sale_refund_sequence_next"/>
|
||||
<group>
|
||||
<field name="sale_refund_sequence_prefix" class="oe_inline" nolabel="1"
|
||||
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<field name="sale_refund_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
|
||||
</group>
|
||||
<field name="module_account_invoice_layout"/>
|
||||
<field name="module_account_voucher"/>
|
||||
<field name="module_account_followup"/>
|
||||
<field name="group_proforma_invoices"/>
|
||||
</group>
|
||||
|
||||
<group string="Supplier Invoices">
|
||||
<label string="Next Supplier Invoice Number" for="purchase_sequence_prefix" help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<div>
|
||||
<field name="purchase_sequence_prefix" class="oe_inline"/>
|
||||
<field name="purchase_sequence_next" class="oe_inline" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
|
||||
</div>
|
||||
<label string="Next Supplier Credit Note Number" for="purchase_refund_sequence_prefix" help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<div>
|
||||
<field name="purchase_refund_sequence_prefix" class="oe_inline"/>
|
||||
<field name="purchase_refund_sequence_next" class="oe_inline"
|
||||
<label for="purchase_sequence_next"/>
|
||||
<group>
|
||||
<field name="purchase_sequence_prefix" class="oe_inline" nolabel="1"
|
||||
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<field name="purchase_sequence_next" class="oe_inline" nolabel="1" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
|
||||
</group>
|
||||
<label for="purchase_refund_sequence_next"/>
|
||||
<group>
|
||||
<field name="purchase_refund_sequence_prefix" class="oe_inline" nolabel="1"
|
||||
help='If you put "%%(year)s" in the prefix, it will be replaced by the current year.'/>
|
||||
<field name="purchase_refund_sequence_next" class="oe_inline" nolabel="1"
|
||||
attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
|
||||
</div>
|
||||
</group>
|
||||
<field name="module_account_payment"/>
|
||||
</group>
|
||||
|
||||
<group string="Electronic Payments">
|
||||
<field name="paypal_account"/>
|
||||
<field name="paypal_account" placeholder="sales@openerp.com"/>
|
||||
</group>
|
||||
|
||||
<group string="Bank & Cash">
|
||||
<b><label string="Configure Bank Accounts :"/></b>
|
||||
<label for="id" string="Configure Bank Accounts"/>
|
||||
<button name="%(action_bank_tree)d" string="Configure Bank Accounts" icon="gtk-go-forward" type="action"/>
|
||||
<field name="company_footer"/>
|
||||
<field name="module_account_check_writing"/>
|
||||
</group>
|
||||
|
||||
<group name="analytic_accounting" invisible="1" string="Analytic Accounting"/>
|
||||
</group>
|
||||
</sheet>
|
||||
|
|
Loading…
Reference in New Issue