removed_depend
bzr revid: fp@tinyerp.com-20081028071013-6e2z8qbccmceq18v
This commit is contained in:
parent
9a5138791a
commit
29495c58ce
|
@ -2,25 +2,24 @@
|
|||
# Use the custom module to put your specific code in a separate module.
|
||||
#
|
||||
{
|
||||
"name" : "Integrated Document Management System",
|
||||
"version" : "1.0",
|
||||
"author" : "Tiny",
|
||||
"category" : "Generic Modules/Others",
|
||||
"website": "http://www.tinyerp.com",
|
||||
"description": """This is a complete document management system:
|
||||
* FTP Interface
|
||||
* User Authentification
|
||||
* Document Indexation
|
||||
"name" : "Integrated Document Management System",
|
||||
"version" : "1.0",
|
||||
"author" : "Tiny",
|
||||
"category" : "Generic Modules/Others",
|
||||
"website": "http://www.tinyerp.com",
|
||||
"description": """This is a complete document management system:
|
||||
* FTP Interface
|
||||
* User Authentification
|
||||
* Document Indexation
|
||||
""",
|
||||
"depends" : ["base", "process", "hr"],
|
||||
"init_xml" : ["document_data.xml"],
|
||||
"update_xml" : [
|
||||
"document_view.xml",
|
||||
"security/document_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"process/document_process.xml"
|
||||
],
|
||||
"demo_xml" : ["document_demo.xml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
"depends" : ["base"],
|
||||
"init_xml" : ["document_data.xml"],
|
||||
"update_xml" : [
|
||||
"document_view.xml",
|
||||
"security/document_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
],
|
||||
"demo_xml" : ["document_demo.xml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
|
|
@ -81,7 +81,10 @@ class node_class(object):
|
|||
where.append( ('res_model','=',self.object2._name) )
|
||||
where.append( ('res_id','=',self.object2.id) )
|
||||
for content in self.object.content_ids:
|
||||
test_nodename = self.object2.name + (content.suffix or '') + (content.extension or '')
|
||||
if content.include_name:
|
||||
test_nodename = self.object2.name + (content.suffix or '') + (content.extension or '')
|
||||
else:
|
||||
test_nodename = (content.suffix or '') + (content.extension or '')
|
||||
if test_nodename.find('/'):
|
||||
test_nodename=test_nodename.replace('/', '_')
|
||||
path = self.path+'/'+test_nodename
|
||||
|
@ -384,15 +387,35 @@ class document_directory_content(osv.osv):
|
|||
'name': fields.char('Content Name', size=64, required=True),
|
||||
'sequence': fields.integer('Sequence', size=16),
|
||||
'suffix': fields.char('Suffix', size=16),
|
||||
'versioning': fields.boolean('Versioning'),
|
||||
'report_id': fields.many2one('ir.actions.report.xml', 'Report', required=True),
|
||||
'extension': fields.selection([('.pdf','.pdf'),('','None')], 'Extension', required=True),
|
||||
'directory_id': fields.many2one('document.directory', 'Directory')
|
||||
'extension': fields.selection([('.pdf','PDF Report'),('.ics','ICS Calendar')], 'Report Type', required=True),
|
||||
'include_name': fields.boolean('Include Record Name', help="Check if you cant that the name of the file start by the record name."),
|
||||
'directory_id': fields.many2one('document.directory', 'Directory'),
|
||||
'ics_object_id': fields.many2one('ir.model', 'Object'),
|
||||
'ics_domain': fields.char('Domain', size=64)
|
||||
}
|
||||
_defaults = {
|
||||
'extension': lambda *args: '',
|
||||
'sequence': lambda *args: 1
|
||||
'extension': lambda *args: '.pdf',
|
||||
'sequence': lambda *args: 1,
|
||||
'include_name': lambda *args: 1,
|
||||
}
|
||||
def process_read_ics(self, cr, uid, node, context={}):
|
||||
import vobject
|
||||
obj_class = self.pool.get(node.ics_object_id.name)
|
||||
ids = obj_class.search(cr, uid, node.ics_domain, context)
|
||||
cal = vobject.iCalendar()
|
||||
for obj in obj_class.browse(cr, uid, ids, context):
|
||||
cal.add('vevent')
|
||||
cal.vevent.add('summary').value = "This is a note"
|
||||
return cal.serialize()
|
||||
|
||||
def process_read_pdf(self, cr, uid, node, context={}):
|
||||
report = self.pool.get('ir.actions.report.xml').browse(cr, uid, node.report_id.id)
|
||||
srv = netsvc.LocalService('report.'+report.report_name)
|
||||
pdf,pdftype = srv.create(cr, uid, [node.object.id], {}, {})
|
||||
s = StringIO.StringIO(pdf)
|
||||
s.name = node
|
||||
return s
|
||||
document_directory_content()
|
||||
|
||||
class ir_action_report_xml(osv.osv):
|
||||
|
@ -635,6 +658,7 @@ class document_configuration_wizard(osv.osv_memory):
|
|||
if doc_obj.name=='All Sales Order':
|
||||
val={}
|
||||
id=model_obj.search(cr,uid,[('model','=','sale.order')])
|
||||
print 'Found', id
|
||||
if id and not len(doc_obj.content_ids):
|
||||
val['name']='Sale Report'
|
||||
val['suffix']='_report'
|
||||
|
|
|
@ -29,14 +29,18 @@
|
|||
<field name="sequence"/>
|
||||
<field name="suffix"/>
|
||||
<field name="extension"/>
|
||||
<separator string="PDF Report" colspan="4"/>
|
||||
<field name="report_id" domain="[('model_id','=',parent.ressource_type_id)]"/>
|
||||
<separator string="ICS Calendar" colspan="4"/>
|
||||
<field name="include_name"/>
|
||||
<field name="ics_object_id"/>
|
||||
<field name="ics_domain"/>
|
||||
</form>
|
||||
<tree string="Contents">
|
||||
<field name="sequence"/>
|
||||
<field name="sequence" string="Seq."/>
|
||||
<field name="name"/>
|
||||
<field name="suffix"/>
|
||||
<field name="extension"/>
|
||||
<field name="report_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page><page string="Security">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="process_node_papers0" model="process.node">
|
||||
<field name="menu_id" ref="document.menu_document_directories"/>
|
||||
<field name="model_id" ref="document.model_document_directory"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Papers"""" name="name"/>
|
||||
<field eval=""""Employee get papers and matrieal"""" name="note"/>
|
||||
<field name="process_id" ref="hr.process_process_employeecontractworkflow0"/>
|
||||
<field eval="0" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_papersandmaterials0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
<field eval=""""Papers and materials"""" name="name"/>
|
||||
<field eval=""""Employee get papers and necessary materials"""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_papers0"/>
|
||||
<field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue