[MERGE]: Merge with lp:openobject-addons
authorrpa (Open ERP) <rpa@tinyerp.com>
Tue, 29 Jun 2010 05:30:51 +0000 (11:00 +0530)
committerrpa (Open ERP) <rpa@tinyerp.com>
Tue, 29 Jun 2010 05:30:51 +0000 (11:00 +0530)
bzr revid: rpa@tinyerp.com-20100629053051-tbmlaes9vivky5xn

1  2 
addons/crm/wizard/crm_send_email.py
addons/document_ftp/wizard/ftp_configuration.py
addons/mrp/mrp.py

Simple merge
index 0000000,40926bd..a4eee9b
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,55 +1,52 @@@
+ # -*- coding: utf-8 -*-
+ ##############################################################################
+ #
+ #    OpenERP, Open Source Management Solution
+ #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+ #
+ #    This program is free software: you can redistribute it and/or modify
+ #    it under the terms of the GNU Affero General Public License as
+ #    published by the Free Software Foundation, either version 3 of the
+ #    License, or (at your option) any later version.
+ #
+ #    This program is distributed in the hope that it will be useful,
+ #    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #    GNU Affero General Public License for more details.
+ #
+ #    You should have received a copy of the GNU Affero General Public License
+ #    along with this program.  If not, see <http://www.gnu.org/licenses/>
+ #
+ ##############################################################################
 -
 -import base64
 -
+ from osv import osv, fields
+ from osv.orm import except_orm
+ from tools import config
+ import urlparse
+ import os
+ class document_ftp_configuration(osv.osv_memory):
+     _name='document.ftp.configuration'
+     _description = 'Auto Directory Configuration'
 -    _inherit = 'res.config'
 -    _rec_name = 'host'
++    _inherit = 'res.config'   
++
+     _columns = {
+         'host': fields.char('Address', size=64,
+                             help="Server address or IP and port to which users should connect to for DMS access", 
+                             required=True),
+     }
+     _defaults = {
+         'host': config.get('ftp_server_host', 'localhost') + ':' + config.get('ftp_server_port', '8021'),
+     }
+     def execute(self, cr, uid, ids, context=None):
+         conf = self.browse(cr, uid, ids[0], context)
+         dir_pool = self.pool.get('document.directory')
+         data_pool = self.pool.get('ir.model.data')        
+         # Update the action for FTP browse.
+         aid = data_pool._get_id(cr, uid, 'document_ftp', 'action_document_browse')
+         aid = data_pool.browse(cr, uid, aid, context=context).res_id
+         self.pool.get('ir.actions.url').write(cr, uid, [aid], {'url': 'ftp://'+(conf.host or 'localhost:8021')+'/'})
+ document_ftp_configuration()
Simple merge