[FIX] hw_escops, point_of_sale: backporting fixes from the pos-restaurant branch
bzr revid: fva@openerp.com-20140328134401-ao85rr8b29nqg626
This commit is contained in:
parent
a224b88d80
commit
4745099706
|
@ -288,6 +288,7 @@ class EscposDriver(Thread):
|
|||
+' '+ str(receipt['date']['hour']).zfill(2)
|
||||
+':'+ str(receipt['date']['minute']).zfill(2) )
|
||||
|
||||
|
||||
driver = EscposDriver()
|
||||
|
||||
driver.push_task('printstatus')
|
||||
|
|
|
@ -33,6 +33,8 @@ TXT_FONT_B = '\x1b\x4d\x01' # Font type B
|
|||
TXT_ALIGN_LT = '\x1b\x61\x00' # Left justification
|
||||
TXT_ALIGN_CT = '\x1b\x61\x01' # Centering
|
||||
TXT_ALIGN_RT = '\x1b\x61\x02' # Right justification
|
||||
TXT_COLOR_BLACK = '\x1b\x72\x00' # Default Color
|
||||
TXT_COLOR_RED = '\x1b\x72\x01' # Alternative Color ( Usually Red )
|
||||
|
||||
# Text Encoding
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ class StyleStack:
|
|||
'tabwidth': 2,
|
||||
'bullet': ' - ',
|
||||
'line-ratio':0.5,
|
||||
'color': 'black',
|
||||
|
||||
'value-decimals': 2,
|
||||
'value-symbol': '',
|
||||
|
@ -107,7 +108,11 @@ class StyleStack:
|
|||
'double-height': TXT_2HEIGHT,
|
||||
'double-width': TXT_2WIDTH,
|
||||
'double': TXT_DOUBLE,
|
||||
}
|
||||
},
|
||||
'color': {
|
||||
'black': TXT_COLOR_BLACK,
|
||||
'red': TXT_COLOR_RED,
|
||||
},
|
||||
}
|
||||
|
||||
self.push(self.defaults)
|
||||
|
@ -595,7 +600,7 @@ class Escpos:
|
|||
width=stylestack.get('value-width'),
|
||||
decimals_separator=stylestack.get('value-decimals-separator'),
|
||||
thousands_separator=stylestack.get('value-thousands-separator'),
|
||||
autoint=(stylestack.get('autoint') == 'on'),
|
||||
autoint=(stylestack.get('value-autoint') == 'on'),
|
||||
symbol=stylestack.get('value-symbol'),
|
||||
position=stylestack.get('value-symbol-position')
|
||||
))
|
||||
|
|
|
@ -400,7 +400,7 @@
|
|||
<t t-set='taxincluded' t-value='Math.abs(receipt.subtotal - receipt.total_with_tax) <= 0.000001' />
|
||||
<t t-if='!taxincluded'>
|
||||
<line><right>--------</right></line>
|
||||
<line><left>Subtotal</left><right> <value>receipt.subtotal</value></right></line>
|
||||
<line><left>Subtotal</left><right> <value><t t-esc="receipt.subtotal" /></value></right></line>
|
||||
<t t-foreach='receipt.tax_details' t-as='tax'>
|
||||
<line>
|
||||
<left><t t-esc='tax.name' /></left>
|
||||
|
@ -411,7 +411,7 @@
|
|||
|
||||
<!-- Total -->
|
||||
|
||||
<line><right>-------</right></line>
|
||||
<line><right>--------</right></line>
|
||||
<line size='double-height'>
|
||||
<left><pre> TOTAL</pre></left>
|
||||
<right><value><t t-esc='receipt.total_with_tax' /></value></right>
|
||||
|
|
Loading…
Reference in New Issue