[IMP] edi: minor EDI preview template improvements

bzr revid: odo@openerp.com-20111017131931-9ak4u7x03bvhgchf
This commit is contained in:
Olivier Dony
2011-10-17 15:19:31 +02:00
parent fdc1eae697
commit bc1ea9c051
3 changed files with 84 additions and 84 deletions
+3
View File
@@ -50,6 +50,9 @@ technical OpenERP documentation at http://doc.openerp.com
'static/src/js/edi_invoice.js',
'static/src/js/edi_sale_purchase_order.js',
],
"css": [
"static/src/css/edi.css"
],
'installable': True,
'active': False,
'certificate': '002046536359186',
+7 -7
View File
@@ -23,7 +23,7 @@ edi_view_template = textwrap.dedent("""<!DOCTYPE html>
}
}
var edi_engine = new c.web.EdiView("oe");
edi_engine.view_edi('%(token)s', '%(db)s');
edi_engine.view_edi('%(token)s', '%(db)s');
});
</script>
@@ -33,8 +33,8 @@ edi_view_template = textwrap.dedent("""<!DOCTYPE html>
""")
def edi_addons():
#FIXME: hardcoded to be able to test
return 'web,edi,sale,purchase'
#FIXME: hardcoded to be able to test
return 'web,edi'
_addons = ['web', 'edi', 'sale', 'purchase']
for addon in openerpweb.addons_module:
@@ -47,7 +47,7 @@ def edi_addons():
return _addons
class EDIView(web.WebClient):
# http://path.to.web.client:8080/web/view_edi?db=XXX&token=XXXXXXXXXXX
# http://path.to.web.client:8080/web/view_edi?db=XXX&token=XXXXXXXXXXX
_cp_path = "/web/view_edi"
@openerpweb.httprequest
@@ -63,7 +63,7 @@ class EDIView(web.WebClient):
content,timestamp = web.concat_files(req.config.addons_path[0], files)
# TODO request set the Date of last modif and Etag
return req.make_response(content, [('Content-Type', 'application/javascript')])
@openerpweb.httprequest
def index(self, req, token, db):
# script tags
@@ -80,7 +80,7 @@ class EDIView(web.WebClient):
css = "\n ".join(['<link rel="stylesheet" href="%s">'%i for i in csslist])
js_files = [str(js_file.split('/')[-1].split('.')[0]) for js_file in self.manifest_glob(req, addons, 'js')]
r = edi_view_template % {
'javascript': js,
'css': css,
@@ -89,6 +89,6 @@ class EDIView(web.WebClient):
'edi_js': js_files
}
return r
+74 -77
View File
@@ -1,62 +1,57 @@
<template>
<t t-name="EdiView">
<div class="oe_form_header">
<table width="100%">
<tr>
<td width="10%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="oe_forms">
<tr>
<td colspan="2" valign="top">
<div id="oe_header" class="header">
<div>
<a href="/" class="company_logo_link">
<div class="company_logo" />
</a>
</td>
<td width="30%" align="center">
<div class="header_corner">
<button type="button" name="action_print">View/Print PDF</button>
</div>
</td>
<td width="50%">
<div class="header_corner">
</div>
</td>
</tr>
<tr>
<td colspan="3">
<hr/>
</td>
</tr>
</table>
</div>
<div hight="100%">
<table width="100%" hight="100%">
</div>
<div class="header_corner">
<button type="button" name="action_print">View/Print PDF</button>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2" valign="top" height="100%">
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
<tr>
<td width="70%" align="top">
<div class="oe_edi_center">
</div>
</td>
<td width="30%" valign="top">
<div class="oe_edi_right_top">
</div>
<div class="oe_edi_right_bottom">
</div>
</td>
</tr>
<tr>
<td><hr/></td>
</tr>
<tr>
<td align="center">
<button type="button" name="action_print">View/Print PDF</button>
<td valign="top" class="oe-application-container">
<div id="oe_app" class="oe-application">
<table width="100%" height="100%">
<tr class="oe_edi_preview_container">
<td class="oe_edi_preview">
<div class="oe_edi_center">
</div>
<div class="oe_edi_center_bottom" align="center">
<button type="button" name="action_print">View/Print PDF</button>
</div>
</td>
<td class="oe_edi_sidebar_container">
<div class="oe_edi_right_top">
</div>
<div class="oe_edi_right_bottom">
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<div id="oe_footer" class="oe_footer">
<p class="oe_footer_powered">Powered by <a href="http://www.openerp.com">openerp.com</a>.</p>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div id="oe_footer" class="oe_footer">
<p class="oe_footer_powered">Powered by <a href="http://www.openerp.com">OpenERP</a>.</p>
</div>
</td>
</tr>
</table>
</t>
<t t-name="EdiViewCenter">
<div>
@@ -66,33 +61,35 @@
<t t-name="EdiViewRightTop">
<div>
<table>
<tr>
<td>
<b>Push this document into your enterprise management system </b>
</td>
</tr>
<tr>
<td>
<hr/>
</td>
</tr>
<tr>
<td>
<input type="radio" id="oe_edi_rd_import_openerp" name="oe_edi_rd_import" value="oe_edi_import_openerp">Import it into exising OpenERP Server<br/> OpenERP Server Address: http:// <input type="text" id="oe_edi_txt_server_url"></input></input><br/>
<input type="radio" id="oe_edi_rd_import_saas_account" name="oe_edi_rd_import" value="oe_edi_create_saas_account">Please create OpenERP Server for me and import it into my server.<br/>
</input>
Compnay: <input type="text" name="oe_edi_txt_saas_url"></input> .my.openerp.com<br/>
Password: <input type="password" name="oe_edi_txt_saas_password"></input> <br/>
Email: <input type="text" name="oe_edi_txt_saas_email"></input><br/>
<input type="radio" id="oe_edi_rd_import_other" name="oe_edi_rd_import" value="oe_edi_import_other">Import into another application</input>
</td>
</tr>
<tr>
<td align="center"><button type="button" class="oe_edi_button_import">Continue</button>
</td>
</tr>
</table>
<p class="oe_edi_sidebar_title">
Push this document into your enterprise management system
</p>
<p>
<input type="radio" id="oe_edi_rd_import_openerp" name="oe_edi_rd_import" value="oe_edi_import_openerp"/>
<label for="oe_edi_rd_import_openerp">Import it into my existing OpenERP instance</label>
<p class="oe_edi_nested_block">
<label for="oe_edi_txt_saas_url">OpenERP instance address:</label> http://<input type="text" id="oe_edi_txt_server_url"/>
</p>
</p>
<p>
<input type="radio" id="oe_edi_rd_import_saas_account" name="oe_edi_rd_import" value="oe_edi_create_saas_account"/>
<label for="oe_edi_rd_import_saas_account">Create a new OpenERP instance for me:</label>
<p class="oe_edi_nested_block"><label for="oe_edi_txt_saas_url">Company:</label><input type="text" name="oe_edi_txt_saas_url"/>.my.openerp.com</p>
<p class="oe_edi_nested_block"><label for="oe_edi_txt_saas_password">Password:</label><input type="password" name="oe_edi_txt_saas_password"/></p>
<p class="oe_edi_nested_block"><label for="oe_edi_txt_saas_email">Email:</label><input type="text" name="oe_edi_txt_saas_email"/></p>
</p>
<p>
<input type="radio" id="oe_edi_rd_import_other" name="oe_edi_rd_import" value="oe_edi_import_other"/>
<label for="oe_edi_rd_import_other">Import into another application</label>
</p>
<p>
<button type="button" class="oe_edi_button_import">Continue</button>
</p>
</div>
</t>
<t t-name="EdiViewRightBottom">