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
=== modified file 'caldav/caldav_node.py'
--- caldav/caldav_node.py 2011-01-14 09:34:28 +0000
+++ caldav/caldav_node.py 2011-01-18 17:21:40 +0000
@@ -494,6 +494,17 @@
494 res = '%d' % (self.calendar_id)494 res = '%d' % (self.calendar_id)
495 return res495 return res
496496
497 def _get_wtag(self, cr):
498 uid = self.context.uid
499 context = self.context.context
500 if self.model and self.res_id:
501 mod_obj = self.context._dirobj.pool.get(self.model)
502 pr = mod_obj.perm_read(cr, uid, [self.res_id], context=context, details=False)[0]
503 self.write_date = pr.get('write_date') or pr.get('create_date')
504
505 # Super will use self.write_date, so we should be fine.
506 return super(res_node_calendar, self)._get_wtag(cr)
507
497 def rm(self, cr):508 def rm(self, cr):
498 uid = self.context.uid509 uid = self.context.uid
499 res = False510 res = False
500511
=== modified file 'document/directory_report.py'
--- document/directory_report.py 2011-01-14 00:11:01 +0000
+++ document/directory_report.py 2011-01-18 17:21:40 +0000
@@ -42,8 +42,12 @@
42 def _model_search(self, cr, uid, obj, name, args, context=None):42 def _model_search(self, cr, uid, obj, name, args, context=None):
43 if not len(args):43 if not len(args):
44 return []44 return []
45 assert len(args) == 1 and args[0][1] == '=', 'expression is not what we expect: %r' % args
45 model_id= args[0][2]46 model_id= args[0][2]
46 if not model_id:47 if not model_id:
48 # a deviation from standard behavior: when searching model_id = False
49 # we return *all* reports, not just ones with empty model.
50 # One reason is that 'model' is a required field so far
47 return []51 return []
48 model = self.pool.get('ir.model').read(cr, uid, [model_id])[0]['model']52 model = self.pool.get('ir.model').read(cr, uid, [model_id])[0]['model']
49 report_id = self.search(cr, uid, [('model','=',model)])53 report_id = self.search(cr, uid, [('model','=',model)])
5054
=== modified file 'document/nodes.py'
--- document/nodes.py 2011-01-14 09:34:28 +0000
+++ document/nodes.py 2011-01-18 17:21:40 +0000
@@ -23,6 +23,7 @@
23import pooler23import pooler
24from tools.safe_eval import safe_eval24from tools.safe_eval import safe_eval
2525
26from tools.misc import ustr
26import errno27import errno
27# import os28# import os
28import time29import time
@@ -808,7 +809,7 @@
808 return res[0]809 return res[0]
809 return None810 return None
810811
811 def _child_get(self, cr, name = None, domain=None):812 def _child_get(self, cr, name=None, domain=None):
812 """ return virtual children of resource, based on the813 """ return virtual children of resource, based on the
813 foreign object.814 foreign object.
814815
@@ -868,7 +869,7 @@
868 # Escape the name for characters not supported in filenames869 # Escape the name for characters not supported in filenames
869 res_name = res_name.replace('/','_') # any other weird char?870 res_name = res_name.replace('/','_') # any other weird char?
870 871
871 if name and (res_name != name):872 if name and (res_name != ustr(name)):
872 # we have matched _ to any character, but we only meant to match873 # we have matched _ to any character, but we only meant to match
873 # the special ones.874 # the special ones.
874 # Eg. 'a_c' will find 'abc', 'a/c', 'a_c', may only875 # Eg. 'a_c' will find 'abc', 'a/c', 'a_c', may only
@@ -1044,7 +1045,7 @@
1044 if not res_name:1045 if not res_name:
1045 continue1046 continue
1046 res_name = res_name.replace('/', '_')1047 res_name = res_name.replace('/', '_')
1047 if name and (res_name != name):1048 if name and (res_name != ustr(name)):
1048 continue1049 continue
1049 # TODO Revise1050 # TODO Revise
1050 klass = directory.get_node_class(directory, dynamic=True, context=ctx)1051 klass = directory.get_node_class(directory, dynamic=True, context=ctx)
10511052
=== modified file 'document_ics/document_view.xml'
--- document_ics/document_view.xml 2011-01-14 00:11:01 +0000
+++ document_ics/document_view.xml 2011-01-18 17:21:40 +0000
@@ -24,7 +24,7 @@
24 <field name="inherit_id" ref="view_document_directory_form_1"/>24 <field name="inherit_id" ref="view_document_directory_form_1"/>
25 <field name="arch" type="xml">25 <field name="arch" type="xml">
26 <field name="report_id" position="replace">26 <field name="report_id" position="replace">
27 <field name="report_id" domain="[('type', '=', 'ressource'),('model_id','=',parent.ressource_type_id)]"/>27 <field name="report_id" domain="[('model_id','=',parent.ressource_type_id)]"/>
28 <separator string="ICS Calendar" colspan="4"/>28 <separator string="ICS Calendar" colspan="4"/>
29 <field name="ics_domain"/>29 <field name="ics_domain"/>
30 <field name="ics_field_ids" colspan="4">30 <field name="ics_field_ids" colspan="4">
3131
=== modified file 'document_webdav/dav_fs.py'
--- document_webdav/dav_fs.py 2011-01-14 09:34:28 +0000
+++ document_webdav/dav_fs.py 2011-01-18 17:21:40 +0000
@@ -414,6 +414,8 @@
414 # relative part, because ul is relative, anyway414 # relative part, because ul is relative, anyway
415 uparts=urlparse.urlparse(turi)415 uparts=urlparse.urlparse(turi)
416 turi=uparts[2]416 turi=uparts[2]
417 if uparts[3]:
418 turi += ';' + uparts[3]
417 if turi.startswith(ul):419 if turi.startswith(ul):
418 result.append( turi[len(self.parent.davpath):])420 result.append( turi[len(self.parent.davpath):])
419 else:421 else:
@@ -440,6 +442,8 @@
440 def uri2local(self, uri):442 def uri2local(self, uri):
441 uparts=urlparse.urlparse(uri)443 uparts=urlparse.urlparse(uri)
442 reluri=uparts[2]444 reluri=uparts[2]
445 if uparts[3]:
446 reluri += ';'+uparts[3]
443 if reluri and reluri[-1]=="/":447 if reluri and reluri[-1]=="/":
444 reluri=reluri[:-1]448 reluri=reluri[:-1]
445 return reluri449 return reluri
446450
=== modified file 'document_webdav/webdav.py'
--- document_webdav/webdav.py 2011-01-14 09:34:28 +0000
+++ document_webdav/webdav.py 2011-01-18 17:21:40 +0000
@@ -167,6 +167,8 @@
167 # write href information167 # write href information
168 uparts=urlparse.urlparse(uri)168 uparts=urlparse.urlparse(uri)
169 fileloc=uparts[2]169 fileloc=uparts[2]
170 if uparts[3]:
171 fileloc += ';' + uparts[3]
170 if isinstance(fileloc, unicode):172 if isinstance(fileloc, unicode):
171 fileloc = fileloc.encode('utf-8')173 fileloc = fileloc.encode('utf-8')
172 href=doc.createElement("D:href")174 href=doc.createElement("D:href")
@@ -246,6 +248,8 @@
246 # write href information248 # write href information
247 uparts=urlparse.urlparse(uri)249 uparts=urlparse.urlparse(uri)
248 fileloc=uparts[2]250 fileloc=uparts[2]
251 if uparts[3]:
252 fileloc += ';' + uparts[3]
249 if isinstance(fileloc, unicode):253 if isinstance(fileloc, unicode):
250 fileloc = fileloc.encode('utf-8')254 fileloc = fileloc.encode('utf-8')
251 href=doc.createElement("D:href")255 href=doc.createElement("D:href")
@@ -303,6 +307,8 @@
303 # write href information307 # write href information
304 uparts=urlparse.urlparse(uri)308 uparts=urlparse.urlparse(uri)
305 fileloc=uparts[2]309 fileloc=uparts[2]
310 if uparts[3]:
311 fileloc += ';' + uparts[3]
306 if isinstance(fileloc, unicode):312 if isinstance(fileloc, unicode):
307 fileloc = fileloc.encode('utf-8')313 fileloc = fileloc.encode('utf-8')
308 davpath = self.parent.get_davpath()314 davpath = self.parent.get_davpath()

Subscribers

People subscribed via source and target branches

to all changes: