document: fix behavior of resource-hooked folders [Bug 682761]

Original report:
> From: Dr. Ferdinand Gasauer
> Date: 29-11-2010
> Subject: webdav - create folder duplicates existing attachments

> to reproduce
> add attachment to partner using webdav (konqueror 4.5.3)
> create new folder in webdav directory
> the attachment will be displayed ALSO in the newly created folder

Well, this /did/ work as the code intended, but not as a user would
expect.
As of commit e549808c0e90, the resource directories would list _all_
attachments referencing some record, by default. This meant that a
newly created folder with files [and subfolders with files..] would
have all the files listed at the root folder, too
eg. /Dirs/Products/Product-A/ + [ /dir2/a.txt, /dir2/b.txt ]
would list a.txt, b.txt under ../Product-A/ , too.

Now, the algorithm is improved to handle such a case and turn off the
"find all" flag[1] so that child files will be contained in their
folders[2].

[1] I'm now glad I had left that option there.
[2] still, files may all appear at the root folder, too, if this has
the "find-all" flag set.

bzr revid: p_christ@hol.gr-20101209100121-6kaq1zcqfewwl25b
This commit is contained in:
P. Christeas
2010-12-09 12:01:21 +02:00
parent a726297a51
commit 0cb5ccb45d
2 changed files with 26 additions and 13 deletions
+3 -1
View File
@@ -82,7 +82,6 @@
<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')] }"/>
<field name="resource_find_all" groups="base.group_extended" />
<newline/>
<field name="resource_field" domain="[('model_id','=',ressource_type_id), ('ttype', 'in', ('char', 'selection', 'date', 'datetime'))]"/>
<field name="ressource_tree"/>
@@ -93,6 +92,9 @@
<field name="ressource_parent_type_id"/>
<field name="ressource_id" select="2" readonly="1"/>
</group>
<group colspan="4" col="2" attrs="{'invisible': [('type','!=','ressource'),('resource_parent_type_id','=',False)]}">
<field name="resource_find_all" groups="base.group_extended" />
</group>
</page>
<page string="Generated Files" groups="base.group_extended">