Merge lp:~xrg/openobject-addons/trunk-patch26 into lp:openobject-addons

Proposed by xrg
Status: Merged
Merged at revision: 4425
Proposed branch: lp:~xrg/openobject-addons/trunk-patch26
Merge into: lp:openobject-addons
Diff against target: 143 lines (+30/-4)
6 files modified
caldav/caldav_node.py (+11/-0)
document/directory_report.py (+4/-0)
document/nodes.py (+4/-3)
document_ics/document_view.xml (+1/-1)
document_webdav/dav_fs.py (+4/-0)
document_webdav/webdav.py (+6/-0)
To merge this branch: bzr merge lp:~xrg/openobject-addons/trunk-patch26
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+46635@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'caldav/caldav_node.py'
2--- caldav/caldav_node.py 2011-01-14 09:34:28 +0000
3+++ caldav/caldav_node.py 2011-01-18 17:21:40 +0000
4@@ -494,6 +494,17 @@
5 res = '%d' % (self.calendar_id)
6 return res
7
8+ def _get_wtag(self, cr):
9+ uid = self.context.uid
10+ context = self.context.context
11+ if self.model and self.res_id:
12+ mod_obj = self.context._dirobj.pool.get(self.model)
13+ pr = mod_obj.perm_read(cr, uid, [self.res_id], context=context, details=False)[0]
14+ self.write_date = pr.get('write_date') or pr.get('create_date')
15+
16+ # Super will use self.write_date, so we should be fine.
17+ return super(res_node_calendar, self)._get_wtag(cr)
18+
19 def rm(self, cr):
20 uid = self.context.uid
21 res = False
22
23=== modified file 'document/directory_report.py'
24--- document/directory_report.py 2011-01-14 00:11:01 +0000
25+++ document/directory_report.py 2011-01-18 17:21:40 +0000
26@@ -42,8 +42,12 @@
27 def _model_search(self, cr, uid, obj, name, args, context=None):
28 if not len(args):
29 return []
30+ assert len(args) == 1 and args[0][1] == '=', 'expression is not what we expect: %r' % args
31 model_id= args[0][2]
32 if not model_id:
33+ # a deviation from standard behavior: when searching model_id = False
34+ # we return *all* reports, not just ones with empty model.
35+ # One reason is that 'model' is a required field so far
36 return []
37 model = self.pool.get('ir.model').read(cr, uid, [model_id])[0]['model']
38 report_id = self.search(cr, uid, [('model','=',model)])
39
40=== modified file 'document/nodes.py'
41--- document/nodes.py 2011-01-14 09:34:28 +0000
42+++ document/nodes.py 2011-01-18 17:21:40 +0000
43@@ -23,6 +23,7 @@
44 import pooler
45 from tools.safe_eval import safe_eval
46
47+from tools.misc import ustr
48 import errno
49 # import os
50 import time
51@@ -808,7 +809,7 @@
52 return res[0]
53 return None
54
55- def _child_get(self, cr, name = None, domain=None):
56+ def _child_get(self, cr, name=None, domain=None):
57 """ return virtual children of resource, based on the
58 foreign object.
59
60@@ -868,7 +869,7 @@
61 # Escape the name for characters not supported in filenames
62 res_name = res_name.replace('/','_') # any other weird char?
63
64- if name and (res_name != name):
65+ if name and (res_name != ustr(name)):
66 # we have matched _ to any character, but we only meant to match
67 # the special ones.
68 # Eg. 'a_c' will find 'abc', 'a/c', 'a_c', may only
69@@ -1044,7 +1045,7 @@
70 if not res_name:
71 continue
72 res_name = res_name.replace('/', '_')
73- if name and (res_name != name):
74+ if name and (res_name != ustr(name)):
75 continue
76 # TODO Revise
77 klass = directory.get_node_class(directory, dynamic=True, context=ctx)
78
79=== modified file 'document_ics/document_view.xml'
80--- document_ics/document_view.xml 2011-01-14 00:11:01 +0000
81+++ document_ics/document_view.xml 2011-01-18 17:21:40 +0000
82@@ -24,7 +24,7 @@
83 <field name="inherit_id" ref="view_document_directory_form_1"/>
84 <field name="arch" type="xml">
85 <field name="report_id" position="replace">
86- <field name="report_id" domain="[('type', '=', 'ressource'),('model_id','=',parent.ressource_type_id)]"/>
87+ <field name="report_id" domain="[('model_id','=',parent.ressource_type_id)]"/>
88 <separator string="ICS Calendar" colspan="4"/>
89 <field name="ics_domain"/>
90 <field name="ics_field_ids" colspan="4">
91
92=== modified file 'document_webdav/dav_fs.py'
93--- document_webdav/dav_fs.py 2011-01-14 09:34:28 +0000
94+++ document_webdav/dav_fs.py 2011-01-18 17:21:40 +0000
95@@ -414,6 +414,8 @@
96 # relative part, because ul is relative, anyway
97 uparts=urlparse.urlparse(turi)
98 turi=uparts[2]
99+ if uparts[3]:
100+ turi += ';' + uparts[3]
101 if turi.startswith(ul):
102 result.append( turi[len(self.parent.davpath):])
103 else:
104@@ -440,6 +442,8 @@
105 def uri2local(self, uri):
106 uparts=urlparse.urlparse(uri)
107 reluri=uparts[2]
108+ if uparts[3]:
109+ reluri += ';'+uparts[3]
110 if reluri and reluri[-1]=="/":
111 reluri=reluri[:-1]
112 return reluri
113
114=== modified file 'document_webdav/webdav.py'
115--- document_webdav/webdav.py 2011-01-14 09:34:28 +0000
116+++ document_webdav/webdav.py 2011-01-18 17:21:40 +0000
117@@ -167,6 +167,8 @@
118 # write href information
119 uparts=urlparse.urlparse(uri)
120 fileloc=uparts[2]
121+ if uparts[3]:
122+ fileloc += ';' + uparts[3]
123 if isinstance(fileloc, unicode):
124 fileloc = fileloc.encode('utf-8')
125 href=doc.createElement("D:href")
126@@ -246,6 +248,8 @@
127 # write href information
128 uparts=urlparse.urlparse(uri)
129 fileloc=uparts[2]
130+ if uparts[3]:
131+ fileloc += ';' + uparts[3]
132 if isinstance(fileloc, unicode):
133 fileloc = fileloc.encode('utf-8')
134 href=doc.createElement("D:href")
135@@ -303,6 +307,8 @@
136 # write href information
137 uparts=urlparse.urlparse(uri)
138 fileloc=uparts[2]
139+ if uparts[3]:
140+ fileloc += ';' + uparts[3]
141 if isinstance(fileloc, unicode):
142 fileloc = fileloc.encode('utf-8')
143 davpath = self.parent.get_davpath()

Subscribers

People subscribed via source and target branches

to all changes: