[FIX]: Set resource_find_all by default False.

bzr revid: atp@tinyerp.co.in-20110111084047-tup3tb590nq68qrj
This commit is contained in:
atp (Open ERP)
2011-01-11 14:10:47 +05:30
parent 228a089fb1
commit bc39af4d02
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -104,7 +104,7 @@ class document_directory(osv.osv):
'type': 'directory',
'ressource_id': 0,
'storage_id': _get_def_storage, # Still, it is bad practice to set it everywhere.
'resource_find_all': True,
'resource_find_all': False,
}
_sql_constraints = [
('dirname_uniq', 'unique (name,parent_id,ressource_id,ressource_parent_type_id)', 'The directory name must be unique !'),
@@ -160,10 +160,6 @@ class document_directory(osv.osv):
def __init__(self, *args, **kwargs):
super(document_directory, self).__init__(*args, **kwargs)
def onchange_type_id(self, cr, uid, ids, type):
if type == "ressource":
self.write(cr, uid, ids, {'resource_find_all': False})
return {}
def onchange_content_id(self, cr, uid, ids, ressource_type_id):
return {}
+1 -1
View File
@@ -78,7 +78,7 @@
<notebook colspan="4">
<page string="Definition">
<separator string="Directory Type" colspan="4"/>
<field name="type" on_change="onchange_type_id(type)"/>
<field name="type"/>
<group colspan="4" col="4" attrs="{'invisible': [('type','!=','ressource')]}">
<field name="ressource_type_id" on_change="onchange_content_id(ressource_type_id)"
attrs="{'required': [('type','=','ressource')] }"/>