[WIP] point_of_sale: making the standalone pos launchable from the pos backend
bzr revid: fva@openerp.com-20131207170014-9pctopzgx5ahtb21
This commit is contained in:
parent
3805e87c73
commit
173ffb995f
|
@ -100,11 +100,6 @@ Main Features
|
|||
'static/src/js/tests.js',
|
||||
'static/src/js/main.js',
|
||||
],
|
||||
'css': [
|
||||
'static/src/css/pos.css', # this is the default css with hover effects
|
||||
#'static/src/css/pos_nohover.css', # this css has no hover effects (for resistive touchscreens)
|
||||
'static/src/css/keyboard.css'
|
||||
],
|
||||
'qweb': ['static/src/xml/pos.xml'],
|
||||
'auto_install': False,
|
||||
}
|
||||
|
|
|
@ -32,7 +32,9 @@ html_template = """<!DOCTYPE html>
|
|||
<link rel="apple-touch-icon" sizes="152x152" href="/point_of_sale/static/src/img/touch-icon-ipad-retina.png">
|
||||
|
||||
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
||||
<!-- <link rel="stylesheet" href="/point_of_sale/static/src/fonts/lato/stylesheet.css" /> -->
|
||||
<link rel="stylesheet" href="/point_of_sale/static/src/css/pos.css" />
|
||||
<!-- <link rel="stylesheet" href="/point_of_sale/static/src/css/keyboard.css" />-->
|
||||
%(js)s
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
@ -69,18 +71,14 @@ class PosController(http.Controller):
|
|||
# 'css': css,
|
||||
'modules': simplejson.dumps(module_boot(request.db)),
|
||||
'init': """
|
||||
console.log('LOADED');
|
||||
var wc = new s.web.WebClient();
|
||||
wc.show_application = function(){
|
||||
console.log('SHOW APPLICATION');
|
||||
wc.action_manager.do_action("pos.ui");
|
||||
};
|
||||
wc.show_login = function(){
|
||||
console.log('SHOW LOGIN');
|
||||
window.location.href = '/';
|
||||
}
|
||||
wc.appendTo($(document.body));
|
||||
console.log('APPENDED');
|
||||
"""
|
||||
}
|
||||
return r
|
||||
|
|
|
@ -380,10 +380,9 @@ class pos_session(osv.osv):
|
|||
context.update(active_id=this_record.id)
|
||||
|
||||
return {
|
||||
'type' : 'ir.actions.client',
|
||||
'name' : _('Start Point Of Sale'),
|
||||
'tag' : 'pos.ui',
|
||||
'context' : context,
|
||||
'type' : 'ir.actions.act_url',
|
||||
'url' : '/pos/web/',
|
||||
'target': 'self',
|
||||
}
|
||||
|
||||
def wkf_action_open(self, cr, uid, ids, context=None):
|
||||
|
@ -486,10 +485,9 @@ class pos_session(osv.osv):
|
|||
_("You cannot use the session of another users. This session is owned by %s. Please first close this one to use this point of sale." % session.user_id.name))
|
||||
context.update({'active_id': ids[0]})
|
||||
return {
|
||||
'type' : 'ir.actions.client',
|
||||
'name' : _('Start Point Of Sale'),
|
||||
'tag' : 'pos.ui',
|
||||
'context' : context,
|
||||
'type' : 'ir.actions.act_url',
|
||||
'target': 'self',
|
||||
'url': '/pos/web/',
|
||||
}
|
||||
|
||||
class pos_order(osv.osv):
|
||||
|
|
|
@ -744,9 +744,10 @@
|
|||
<menuitem icon="STOCK_PRINT" action="action_report_pos_details"
|
||||
id="menu_pos_details" parent="menu_point_rep" sequence="6" />
|
||||
|
||||
<record model="ir.actions.client" id="action_pos_pos">
|
||||
<record model="ir.actions.act_url" id="action_pos_pos">
|
||||
<field name="name">Start Point of Sale</field>
|
||||
<field name="tag">pos.ui</field>
|
||||
<field name="url">/pos/web/</field>
|
||||
<field name="target">self</field>
|
||||
</record>
|
||||
|
||||
<!-- Top menu item -->
|
||||
|
|
|
@ -28,10 +28,9 @@ class pos_session_opening(osv.osv_memory):
|
|||
data = self.browse(cr, uid, ids[0], context=context)
|
||||
context['active_id'] = data.pos_session_id.id
|
||||
return {
|
||||
'type' : 'ir.actions.client',
|
||||
'name' : _('Start Point Of Sale'),
|
||||
'tag' : 'pos.ui',
|
||||
'context' : context
|
||||
'type' : 'ir.actions.act_url',
|
||||
'url': '/pos/web/',
|
||||
'target': 'self',
|
||||
}
|
||||
|
||||
def open_existing_session_cb_close(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue