[IMP] PoS Useability

bzr revid: fp@tinyerp.com-20121126121350-1n3v1nqsrjf8b5qf
This commit is contained in:
Fabien Pinckaers 2012-11-26 13:13:50 +01:00
commit 9c66d7d2f9
4 changed files with 7 additions and 6 deletions

View File

@ -618,9 +618,10 @@ class pos_order(osv.osv):
return session_ids and session_ids[0] or False
def _default_pricelist(self, cr, uid, context=None):
res = self.pool.get('sale.shop').search(cr, uid, [], context=context)
if res:
shop = self.pool.get('sale.shop').browse(cr, uid, res[0], context=context)
session_ids = self._default_session(cr, uid, context)
if session_ids:
session_record = self.pool.get('pos.session').browse(cr, uid, session_ids, context=context)
shop = self.pool.get('sale.shop').browse(cr, uid, session_record.config_id.shop_id.id, context=context)
return shop.pricelist_id and shop.pricelist_id.id or False
return False

View File

@ -1060,7 +1060,7 @@
<field name="arch" type="xml">
<form string="Ean13 Generator" version="7.0">
<p class="oe_grey">
Enter a reference for this product, it will be converted
Enter a reference, it will be converted
automatically to a valid EAN number.
</p>
<group>

View File

@ -19,7 +19,7 @@ class res_users(osv.osv):
def edit_ean(self, cr, uid, ids, context):
return {
'name': "Edit Ean",
'name': "Edit EAN",
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',

View File

@ -23,7 +23,7 @@
<group>
<field name="pos_config" />
<field name="ean13" />
<button name="edit_ean" type="object" string="Edit" />
<button name="edit_ean" type="object" string="Edit EAN" class="oe_edit_only" />
</group>
</page>
</notebook>