Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-18009-msh into 
lp:openobject-client-web/6.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-18009-msh/+merge/78566

Hello,

To generate add attachment to any object from sidebar, and then go to document 
form of knowledge and then open that attachment which you have added.

You will find that there is no filename so when user will click saveas button 
he will not get the filename what he saved instead his file will be saved as a 
filename.dat.

So here changed the code of attachment.py and save the data.filename in 
data_fname field because datas_fname should be name of file.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-18009-msh/+merge/78566
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-18009-msh.
=== modified file 'addons/openerp/controllers/attachment.py'
--- addons/openerp/controllers/attachment.py	2011-01-17 11:57:11 +0000
+++ addons/openerp/controllers/attachment.py	2011-10-07 11:13:44 +0000
@@ -75,6 +75,7 @@
         attachment_id = rpc.RPCProxy('ir.attachment').create({
             'name': datas.filename,
             'datas': base64.encodestring(datas.file.read()),
+            'datas_fname': datas.filename,
         }, ctx)
         return {'id': attachment_id, 'name': datas.filename}
 

=== modified file 'addons/openerp/controllers/form.py'
=== modified file 'addons/openerp/po/javascript/fr.po'
--- addons/openerp/po/javascript/fr.po	2011-09-21 05:25:26 +0000
+++ addons/openerp/po/javascript/fr.po	2011-10-07 11:13:44 +0000
@@ -8,14 +8,24 @@
 "Project-Id-Version: PROJECT VERSION\n"
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
 "POT-Creation-Date: 2011-03-18 11:53+0100\n"
+<<<<<<< TREE
 "PO-Revision-Date: 2011-09-20 09:43+0000\n"
 "Last-Translator: Quentin THEURET <Unknown>\n"
+=======
+"PO-Revision-Date: 2011-08-24 19:57+0000\n"
+"Last-Translator: lholivier <[email protected]>\n"
+>>>>>>> MERGE-SOURCE
 "Language-Team: fr <[email protected]>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+<<<<<<< TREE
 "X-Launchpad-Export-Date: 2011-09-21 05:25+0000\n"
 "X-Generator: Launchpad (build 13996)\n"
+=======
+"X-Launchpad-Export-Date: 2011-08-25 05:14+0000\n"
+"X-Generator: Launchpad (build 13727)\n"
+>>>>>>> MERGE-SOURCE
 "Generated-By: Babel None\n"
 
 #: static/javascript/form.js:92

=== modified file 'addons/openerp/static/javascript/form_state.js'
--- addons/openerp/static/javascript/form_state.js	2011-08-19 05:44:37 +0000
+++ addons/openerp/static/javascript/form_state.js	2011-10-07 11:13:44 +0000
@@ -174,6 +174,19 @@
     }
 }
 
+function matchArray(val,eval_value){
+	if (val.length != eval_value.length) { return false; }
+    var val = val.sort(),
+        eval_value = eval_value.sort();
+    for (var i = 0; val[i]; i++) {
+    	if (val[i] !== eval_value[i]) { 
+    		return false;
+    	}
+    }
+    return true;
+	
+}
+
 function form_evalExpr(prefix, expr, ref_elem) {
 
     var stack = [];
@@ -203,8 +216,21 @@
         var elem_value;
         if(elem.is(':input')) {
             elem_value = elem.val();
+<<<<<<< TREE
         } else if(elem[0].nodeName == "TABLE"){
         	elem_value = $.trim($(elem).find("tr tbody:nth-child(2)").text())
+=======
+        } else if(elem[0].nodeName == "TABLE"){
+        	prefix = $(elem).attr('id')
+        	elem_value = eval($(idSelector(prefix+"/_terp_ids")).val())
+        	res = matchArray(eval(val), elem_value)
+        	if(res){
+        		val = elem_value = true
+        	}else{
+        		val = true
+        		elem_value = false
+        	}
+>>>>>>> MERGE-SOURCE
         } else {
             elem_value = elem.attr('value') || elem.text();
         }

_______________________________________________
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