[IMP] account: usabiltiy imp.

bzr revid: qdp-launchpad@tinyerp.com-20110113171159-lvdat1nrexheeqc3
This commit is contained in:
qdp-launchpad@tinyerp.com 2011-01-13 18:11:59 +01:00
parent 1e81abb0bd
commit 721c1fe325
3 changed files with 5 additions and 3 deletions

View File

@ -430,7 +430,7 @@ class account_account(osv.osv):
_constraints = [
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']),
(_check_type, 'You cannot create an account! \nMake sure if the account has children then it should be type "View"! ', ['type']),
(_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']),
]
_sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')
@ -2317,7 +2317,7 @@ class account_account_template(osv.osv):
_check_recursion = check_cycle
_constraints = [
(_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']),
(_check_type, 'You cannot create an account template! \nMake sure if the account template has parent then it should be type "View"! ', ['type']),
(_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']),
]

View File

@ -954,6 +954,7 @@ class account_move_line(osv.osv):
if view_type == 'search' and result['fields'].get('journal_id', False):
result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context)
ctx = context.copy()
#we add the refunds journal in the selection field of journal
if context.get('journal_type', False) == 'sale':
ctx.update({'journal_type': 'sale_refund'})
result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx)

View File

@ -170,6 +170,8 @@
</group>
<notebook colspan="4">
<page string="General Information">
<field name="active" groups="base.group_extended" />
<newline/>
<group col="2" colspan="2">
<separator string="Currency" colspan="2"/>
<field name="currency_id"/>
@ -179,7 +181,6 @@
<separator string="Reconcile" colspan="2"/>
<field name="reconcile"/>
</group>
<field name="active" groups="base.group_extended" />
<separator string="Default Taxes" colspan="4"/>
<field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
<separator string="Consolidated Children" colspan="4"/>