parent
582947ec10
commit
c3279a5702
|
@ -13,14 +13,17 @@
|
|||
* Document Indexation
|
||||
""",
|
||||
"depends" : ["base","process"],
|
||||
"init_xml" : ["document_data.xml"],
|
||||
"init_xml" : [
|
||||
"document_data.xml",
|
||||
"document_demo.xml"
|
||||
],
|
||||
"update_xml" : [
|
||||
"document_view.xml",
|
||||
"document_data.xml",
|
||||
"security/document_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
],
|
||||
"demo_xml" : ["document_demo.xml"],
|
||||
"demo_xml" : [],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
|
|
@ -229,6 +229,7 @@ class document_directory(osv.osv):
|
|||
'user_id': lambda self,cr,uid,ctx: uid,
|
||||
'domain': lambda self,cr,uid,ctx: '[]',
|
||||
'type': lambda *args: 'directory',
|
||||
'ressource_id': lambda *a: 0
|
||||
}
|
||||
_sql_constraints = [
|
||||
('dirname_uniq', 'unique (name,parent_id,ressource_id,ressource_parent_type_id)', 'The directory name must be unique !')
|
||||
|
@ -647,49 +648,69 @@ class document_configuration_wizard(osv.osv_memory):
|
|||
|
||||
def action_config(self, cr, uid, ids, context=None):
|
||||
obj=self.pool.get('document.directory')
|
||||
search_ids=obj.search(cr,uid,[])
|
||||
browse_lst=obj.browse(cr,uid,search_ids)
|
||||
model_obj=self.pool.get('ir.model')
|
||||
objid=self.pool.get('ir.model.data')
|
||||
|
||||
for doc_obj in browse_lst:
|
||||
if doc_obj.name in ('Partner','Contacts','Personnal Folders','Partner Category','Sales Order','All Sales Order','Sales by Salesman','Projects'):
|
||||
res={}
|
||||
id=[]
|
||||
if doc_obj.name=='Partner':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.partner')])
|
||||
if self.pool.get('sale.order'):
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_sale_order_all')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
mid = self.pool.get('ir.model').search(cr, uid, [('model','=','sale.order')])
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
'domain': '[]',
|
||||
})
|
||||
aid = objid._get_id(cr, uid, 'sale', 'report_sale_order')
|
||||
aid = objid.browse(cr, uid, aid, context=context).res_id
|
||||
|
||||
if doc_obj.name=='Contacts':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.partner.address')])
|
||||
self.pool.get('document.directory.content').create(cr, uid, {
|
||||
'name': "Print Order",
|
||||
'suffix': "_print",
|
||||
'report_id': aid,
|
||||
'extension': '.pdf',
|
||||
'include_name': 1,
|
||||
'directory_id': id,
|
||||
})
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_sale_order_quote')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
'domain': "[('state','=','draft')]",
|
||||
})
|
||||
|
||||
if doc_obj.name=='Partner Category':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.partner.category')])
|
||||
if self.pool.get('product.product'):
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_product')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
mid = self.pool.get('ir.model').search(cr, uid, [('model','=','product.product')])
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
})
|
||||
|
||||
if doc_obj.name=='All Sales Order':
|
||||
val={}
|
||||
id=model_obj.search(cr,uid,[('model','=','sale.order')])
|
||||
if id and not len(doc_obj.content_ids):
|
||||
val['name']='Sale Report'
|
||||
val['suffix']='_report'
|
||||
val['report_id']=self.pool.get('ir.actions.report.xml').search(cr,uid,[('report_name','=','sale.order')])[0]
|
||||
val['extension']='.pdf'
|
||||
val['directory_id']=doc_obj.id
|
||||
self.pool.get('document.directory.content').create(cr,uid,val)
|
||||
if self.pool.get('stock.location'):
|
||||
aid = objid._get_id(cr, uid, 'stock', 'report_product_history')
|
||||
aid = objid.browse(cr, uid, aid, context=context).res_id
|
||||
|
||||
if doc_obj.name=='Sales by Salesman':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.users')])
|
||||
self.pool.get('document.directory.content').create(cr, uid, {
|
||||
'name': "Product Stock",
|
||||
'suffix': "_stock_forecast",
|
||||
'report_id': aid,
|
||||
'extension': '.pdf',
|
||||
'include_name': 1,
|
||||
'directory_id': id,
|
||||
})
|
||||
|
||||
if self.pool.get('account.analytic.account'):
|
||||
id = objid._get_id(cr, uid, 'document', 'dir_project')
|
||||
id = objid.browse(cr, uid, id, context=context).res_id
|
||||
mid = self.pool.get('ir.model').search(cr, uid, [('model','=','account.analytic.account')])
|
||||
obj.write(cr, uid, [id], {
|
||||
'type':'ressource',
|
||||
'ressource_type_id': mid[0],
|
||||
'domain': '[]',
|
||||
'ressource_tree': 1
|
||||
})
|
||||
|
||||
if doc_obj.name=='Personnal Folders':
|
||||
id=model_obj.search(cr,uid,[('model','=','res.users')])
|
||||
|
||||
if doc_obj.name=='Projects':
|
||||
id=model_obj.search(cr,uid,[('model','=','account.analytic.account')])
|
||||
res['ressource_tree']=True
|
||||
|
||||
if id:
|
||||
res['ressource_type_id']=id[0]
|
||||
res['type']='ressource'
|
||||
obj.write(cr,uid,doc_obj.id,res)
|
||||
self.create_folder(cr, uid, ids, context=None)
|
||||
return {
|
||||
'view_type': 'form',
|
||||
"view_mode": 'form',
|
||||
|
@ -698,27 +719,4 @@ class document_configuration_wizard(osv.osv_memory):
|
|||
'target':'new',
|
||||
}
|
||||
|
||||
def create_folder(self, cr, uid, ids, context=None):
|
||||
doc_obj=self.pool.get('document.directory')
|
||||
model_obj=self.pool.get('ir.model')
|
||||
for name in ('Sales','Quotation','Meetings','Analysis Reports'):
|
||||
res={}
|
||||
if name=='Sales':
|
||||
child_model=model_obj.search(cr,uid,[('model','=','sale.order')])
|
||||
link_model=model_obj.search(cr,uid,[('model','=','res.users')])
|
||||
if child_model:
|
||||
res['type']='ressource'
|
||||
res['ressource_type_id']=child_model[0]
|
||||
res['ressource_parent_type_id']=link_model[0]
|
||||
res['domain']="[('user_id','=',active_id)]"
|
||||
else:
|
||||
link_model=model_obj.search(cr,uid,[('model','=','account.analytic.account')])
|
||||
if link_model:
|
||||
res['ressource_parent_type_id']=link_model[0]
|
||||
res['ressource_id']=0
|
||||
if res:
|
||||
res['name']=name
|
||||
doc_obj.create(cr,uid,res)
|
||||
return True
|
||||
|
||||
document_configuration_wizard()
|
||||
|
|
|
@ -2,92 +2,73 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="document.directory" id="dir_root">
|
||||
<field name="name">Main Repository</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
<record model="document.directory" id="dir_root">
|
||||
<field name="name">Documents</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_my_folder">
|
||||
<field name="name">My Folder</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_my_folder">
|
||||
<field name="name">My Folder</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_partner_category">
|
||||
<field name="name">Partners by Category</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="type">ressource</field>
|
||||
<field name="ressource_tree">1</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_partner_category">
|
||||
<field name="name">Partner Category</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="type">ressource</field>
|
||||
<field name="ressource_tree">1</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_partner">
|
||||
<field name="name">Partners</field>
|
||||
<field name="type">ressource</field>
|
||||
<field name="domain">[('category_id','in',[active_id])]</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner')]" />
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_my_partner">
|
||||
<field name="name">My Folder</field>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_personnal_folder">
|
||||
<field name="name">Personnal Folders</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_partner">
|
||||
<field name="name">Partner</field>
|
||||
<field name="type">ressource</field>
|
||||
<field name="domain">[('category_id','in',[active_id])]</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner')]" />
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner.category')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_product">
|
||||
<field name="name">Products</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_partner_contacts">
|
||||
<field name="name">Contacts</field>
|
||||
<field name="type">ressource</field>
|
||||
<field name="domain">[('partner_id','=',active_id)]</field>
|
||||
<field name="ressource_type_id" search="[('model','=','res.partner.address')]" />
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner')]" />
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order">
|
||||
<field name="name">Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_my_partner">
|
||||
<field name="name">My Folder</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="ressource_parent_type_id" search="[('model','=','res.partner')]" />
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order_all">
|
||||
<field name="name">All Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_personnal_folder">
|
||||
<field name="name">Personnal Folders</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order_quote">
|
||||
<field name="name">Quotations</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_sale_order">
|
||||
<field name="name">Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_sale_order_all">
|
||||
<field name="name">All Sales Order</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_sale_order_salesman">
|
||||
<field name="name">Sales by Salesman</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_sale_order"/>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_project">
|
||||
<field name="name">Projects</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
|
||||
</record>
|
||||
<record model="document.directory" id="dir_project">
|
||||
<field name="name">Projects</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<menuitem name="Document Management" icon="terp-stock" id="menu_document"/>
|
||||
<menuitem name="Configuration" id="menu_document_configuration" parent="menu_document"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_document_directory_form">
|
||||
<field name="name">document.directory</field>
|
||||
|
@ -68,26 +69,37 @@
|
|||
<field name="res_model">document.directory</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem name="Configuration" id="menu_document_configuration" parent="menu_document"/>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Directories"
|
||||
action="action_document_directory_form"
|
||||
id="menu_document_directories"
|
||||
parent="menu_document_configuration"/>
|
||||
id="menu_document_directories"
|
||||
parent="menu_document_configuration"/>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_directory_tree">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="name">Directorie's Structure</field>
|
||||
<field name="res_model">document.directory</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="domain">[('ressource_parent_type_id','=',False),('parent_id','=',False)]</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Directorie's Structure"
|
||||
action="action_document_directory_tree"
|
||||
id="menu_document_directories_tree"
|
||||
parent="menu_document"/>
|
||||
id="menu_document_directories_tree"
|
||||
parent="menu_document_configuration"/>
|
||||
|
||||
<record model="ir.actions.url" id="action_document_browse">
|
||||
<field name="name">Browse Files</field>
|
||||
<field name="url">ftp://localhost:8021/</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Browse Files Using FTP"
|
||||
action="action_document_browse"
|
||||
id="menu_document_browse"
|
||||
type="ir.actions.url"
|
||||
icon="STOCK_EXECUTE"
|
||||
parent="menu_document"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_document_file_form">
|
||||
<field name="name">ir.attachment</field>
|
||||
|
@ -147,8 +159,8 @@
|
|||
<menuitem
|
||||
name="Search a File"
|
||||
action="action_document_file_form"
|
||||
id="menu_document_files"
|
||||
parent="menu_document"/>
|
||||
id="menu_document_files"
|
||||
parent="menu_document"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_file_directory_form">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -204,33 +216,20 @@
|
|||
</record>
|
||||
|
||||
|
||||
<record id="view_auto_config_form" model="ir.ui.view">
|
||||
<record id="view_auto_config_form" model="ir.ui.view">
|
||||
<field name="name">Auto Configure Directory</field>
|
||||
<field name="model">document.configuration.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Auto Configure">
|
||||
<separator string="Connect to Document Management System." colspan="4"/>
|
||||
<label align="0.0" string="You can use ftp://admin:admin@localhost:8021 " colspan="4"/>
|
||||
<separator string="Configure Ressources Directory :" colspan="4"/>
|
||||
<newline/>
|
||||
<label string="'All Sales Order' -> sale.order" align="0.0" colspan="4"/>
|
||||
<label string="'Sales by Salesman' -> res.users" align="0.0" colspan="4"/>
|
||||
<label string="'Personnal Folders' -> res.users" align="0.0" colspan="4"/>
|
||||
<label string="'Projects' -> account.analytic.account with ressource tree" align="0.0" colspan="4"/>
|
||||
<separator string="New Directories." colspan="4"/>
|
||||
<label string="'Sales' -> sale.order which is link directory of 'res.users' model" align="0.0" colspan="4"/>
|
||||
<label align="0.0" string="'Quotation','Meetings','Analysis Reports' -> static directories which are link directories of 'account.analytic.account' model" colspan="4"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<separator string="Document Management System." colspan="4"/>
|
||||
<label string="This wizard will automatically configure the document management system according to modules installed on your system." align="0.0" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string="" colspan="2"/>
|
||||
<group col="4" colspan="2">
|
||||
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
|
||||
<button name="action_config" string="Configure" icon='gtk-ok' type="object"/>
|
||||
</group>
|
||||
<newline/>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -244,10 +243,9 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.todo"
|
||||
id="config_auto_directory">
|
||||
<record model="ir.actions.todo" id="config_auto_directory">
|
||||
<field name="name">Auto Configure Directory</field>
|
||||
<field name="note">This wizard will be configure directory for ressource model.</field>
|
||||
<field name="note">This wizard will be configure directory for ressource model.</field>
|
||||
<field name="action_id" ref="action_config_auto_directory"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
|
|
@ -327,7 +327,7 @@ class abstracted_fs:
|
|||
cr = db.cursor()
|
||||
uid = security.login(dbname, self.username, self.password)
|
||||
if not uid:
|
||||
raise OSError(1, 'Operation not permited.')
|
||||
raise OSError(2, 'Authentification Required.')
|
||||
return cr, uid, pool
|
||||
|
||||
# Ok
|
||||
|
|
|
@ -1,70 +1,71 @@
|
|||
#import pooler
|
||||
|
||||
class authorizer:
|
||||
read_perms = "elr"
|
||||
write_perms = "adfmw"
|
||||
read_perms = "elr"
|
||||
write_perms = "adfmw"
|
||||
|
||||
def __init__(self):
|
||||
self.password = ''
|
||||
def __init__(self):
|
||||
self.password = ''
|
||||
|
||||
def validate_authentication(self, username, password):
|
||||
"""Return True if the supplied username and password match the
|
||||
stored credentials."""
|
||||
self.password = password
|
||||
return True
|
||||
def validate_authentication(self, username, password):
|
||||
"""Return True if the supplied username and password match the
|
||||
stored credentials."""
|
||||
self.password = password
|
||||
return True
|
||||
|
||||
def impersonate_user(self, username, password):
|
||||
"""Impersonate another user (noop).
|
||||
def impersonate_user(self, username, password):
|
||||
"""Impersonate another user (noop).
|
||||
|
||||
It is always called before accessing the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to change the
|
||||
current user.
|
||||
"""
|
||||
It is always called before accessing the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to change the
|
||||
current user.
|
||||
"""
|
||||
|
||||
def terminate_impersonation(self):
|
||||
"""Terminate impersonation (noop).
|
||||
def terminate_impersonation(self):
|
||||
"""Terminate impersonation (noop).
|
||||
|
||||
It is always called after having accessed the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to switch back
|
||||
to the original user.
|
||||
"""
|
||||
It is always called after having accessed the filesystem.
|
||||
By default it does nothing. The subclass overriding this
|
||||
method is expected to provide a mechanism to switch back
|
||||
to the original user.
|
||||
"""
|
||||
|
||||
def has_user(self, username):
|
||||
"""Whether the username exists in the virtual users table."""
|
||||
return True
|
||||
def has_user(self, username):
|
||||
"""Whether the username exists in the virtual users table."""
|
||||
if username=='anonymous':
|
||||
return False
|
||||
return True
|
||||
|
||||
def has_perm(self, username, perm, path=None):
|
||||
"""Whether the user has permission over path (an absolute
|
||||
pathname of a file or a directory).
|
||||
def has_perm(self, username, perm, path=None):
|
||||
"""Whether the user has permission over path (an absolute
|
||||
pathname of a file or a directory).
|
||||
|
||||
Expected perm argument is one of the following letters:
|
||||
"elradfmw".
|
||||
"""
|
||||
return True
|
||||
paths = path.split('/')
|
||||
if not len(paths)>2:
|
||||
return True
|
||||
db_name = paths[1]
|
||||
db,pool = pooler.get_db_and_pool(db_name)
|
||||
res = security.login(db_name, username, self.password)
|
||||
return bool(res)
|
||||
Expected perm argument is one of the following letters:
|
||||
"elradfmw".
|
||||
"""
|
||||
paths = path.split('/')
|
||||
if not len(paths)>2:
|
||||
return True
|
||||
db_name = paths[1]
|
||||
db,pool = pooler.get_db_and_pool(db_name)
|
||||
res = security.login(db_name, username, self.password)
|
||||
return bool(res)
|
||||
|
||||
def get_perms(self, username):
|
||||
"""Return current user permissions."""
|
||||
return 'elr'
|
||||
def get_perms(self, username):
|
||||
"""Return current user permissions."""
|
||||
return 'elr'
|
||||
|
||||
def get_home_dir(self, username):
|
||||
"""Return the user's home directory."""
|
||||
return '/'
|
||||
def get_home_dir(self, username):
|
||||
"""Return the user's home directory."""
|
||||
return '/'
|
||||
|
||||
def get_msg_login(self, username):
|
||||
"""Return the user's login message."""
|
||||
return 'Welcome on OpenERP document management system.'
|
||||
def get_msg_login(self, username):
|
||||
"""Return the user's login message."""
|
||||
return 'Welcome on OpenERP document management system.'
|
||||
|
||||
def get_msg_quit(self, username):
|
||||
"""Return the user's quitting message."""
|
||||
return 'Bye.'
|
||||
def get_msg_quit(self, username):
|
||||
"""Return the user's quitting message."""
|
||||
return 'Bye.'
|
||||
|
||||
|
||||
|
|
|
@ -2512,9 +2512,14 @@ class FTPHandler(asynchat.async_chat):
|
|||
path = self.fs.ftp2fs(line, datacr)
|
||||
self.run_as_current_user(self.fs.chdir, path)
|
||||
except OSError, err:
|
||||
why = _strerror(err)
|
||||
self.log('FAIL CWD "%s". %s.' %(self.fs.ftpnorm(line), why))
|
||||
self.respond('550 %s.' %why)
|
||||
if err.errno==2:
|
||||
why = 'Authentication Required or Failed'
|
||||
self.log('FAIL CWD "%s". %s.' %(self.fs.ftpnorm(line), why))
|
||||
self.respond('530 %s.' %why)
|
||||
else:
|
||||
why = _strerror(err)
|
||||
self.log('FAIL CWD "%s". %s.' %(self.fs.ftpnorm(line), why))
|
||||
self.respond('550 %s.' %why)
|
||||
else:
|
||||
self.log('OK CWD "%s".' %self.fs.cwd)
|
||||
self.respond('250 "%s" is the current directory.' %self.fs.cwd)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future stock forecast"/>
|
||||
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
|
||||
|
||||
|
||||
<!-- <report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Packing list" xml="stock/report/picking.xml" xsl="stock/report/picking.xsl"/>-->
|
||||
|
|
Loading…
Reference in New Issue