避免重复存储相同附件的正确方法
我正在使用 project.task 模型,其中委托在两者之间创建父/子链接。
委派时,我希望获得委派任务的人也能够访问原始任务的附件,我如何避免必须真正复制它?
我考虑过使用
或向导来检查是否存在父任务,如果存在,则(还)显示父任务附件。
act_window 的问题是,您需要指定 2 个不同的 act_window 记录,并且仍然只覆盖一个父关系和一个子关系(任务可以委派更多)
对于向导方法,这似乎是很多矫枉过正的工作这也许可以更容易地解决(因此是这个问题)。
I'm using the project.task model where delegation creates a parent/child link between both.
When delegating I would like the person who gets the delegated task to also have access to the attachments on the original task, how could I avoid to have to really copy it?
I've thought about using an <act_window>
or a wizard which checks if there is a parent task and if so (also) show the parent task attachments.
The problem with act_window is that you would need to specify 2 different act_window records and that would still only cover one parent and one child relation (the task could be delegated more)
For the wizard approach it seems to be a lot of overkill work for something that could maybe be solved easier (hence the question).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为构建向导是唯一有效的方法,因为附件和project.task 之间没有真正的链接。如果我是您,我会构建一个向导来遍历父关系以构建所有祖先任务 ID 以及当前任务 ID 的列表。然后让向导使用该 ID 列表作为域搜索条件之一打开附件窗口。
I think building a wizard is the only way that will work, because there isn't a real link between attachment and project.task. If I were you, I would build a wizard that walks the parent relation to build a list of all ancestor task ids, plus the current task id. Then have the wizard open the attachment window using that list of ids as one of the domain search criteria.