Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-576907-rha into 
lp:openobject-addons/6.0.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-576907-rha/+merge/115276

Hello,

I have changed type of the document name from str to unicode. Problem occurs
when we have accented char in document name, it generated error.

Steps to re-produce:
1. Install module document. Create a document with name "Brochure_EspaƱol.pdf",
   Provide any Directory and save record.
2. Now edit record, change Directory and try to save. Error occurs!

"raise NotImplementedError("Cannot rename and move") # TODO
NotImplementedError: Cannot rename and move"

In write(), it calls fnode.move_to() and it fails name checking in this method 
because
of type difference of name which is str and unicode.

Please review it.

Regards,
Rifakat
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-576907-rha/+merge/115276
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-576907-rha.
=== modified file 'document/document.py'
--- document/document.py	2011-07-06 12:44:07 +0000
+++ document/document.py	2012-07-17 06:26:14 +0000
@@ -235,7 +235,7 @@
                         ids2.append(fbro.id)
                         continue
                 fnode = nctx.get_file_node(cr, fbro)
-                res = fnode.move_to(cr, dnode or fnode.parent, vals.get('name', fbro.name), fbro, dbro, True)
+                res = fnode.move_to(cr, dnode or fnode.parent, tools.ustr(vals.get('name', fbro.name)), fbro, dbro, True)
                 if isinstance(res, dict):
                     vals2 = vals.copy()
                     vals2.update(res)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to