Skip to content

Commit

Permalink
Merge pull request odoo#1983 from odoo-dev/master-pos-new-payment-scr…
Browse files Browse the repository at this point in the history
…een-fva

Point of Sale : New Payment Screen & Receipt Screens
  • Loading branch information
fvdsn committed Aug 25, 2014
2 parents 48e0afc + d7f93de commit e96bb90
Show file tree
Hide file tree
Showing 35 changed files with 2,488 additions and 1,014 deletions.
4 changes: 3 additions & 1 deletion addons/point_of_sale/point_of_sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def _get_currency(self, cr, uid, ids, fieldnames, args, context=None):
'iface_scan_via_proxy' : fields.boolean('Scan via Proxy', help="Enable barcode scanning with a remotely connected barcode scanner"),
'iface_invoicing': fields.boolean('Invoicing',help='Enables invoice generation from the Point of Sale'),
'iface_big_scrollbars': fields.boolean('Large Scrollbars',help='For imprecise industrial touchscreens'),
'iface_fullscreen': fields.boolean('Fullscreen', help='Display the Point of Sale in full screen mode'),
'receipt_header': fields.text('Receipt Header',help="A short text that will be inserted as a header in the printed receipt"),
'receipt_footer': fields.text('Receipt Footer',help="A short text that will be inserted as a footer in the printed receipt"),
'proxy_ip': fields.char('IP Address', help='The hostname or ip address of the hardware proxy, Will be autodetected if left empty', size=45),
Expand Down Expand Up @@ -394,7 +395,7 @@ def unlink(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
for statement in obj.statement_ids:
statement.unlink(context=context)
return True
return super(pos_session, self).unlink(cr, uid, ids, context=context)


def open_cb(self, cr, uid, ids, context=None):
Expand Down Expand Up @@ -553,6 +554,7 @@ def create_from_ui(self, cr, uid, orders, context=None):
orders_to_save = [o for o in orders if o['data']['name'] not in existing_references]

order_ids = []

for tmp_order in orders_to_save:
to_invoice = tmp_order['to_invoice']
order = tmp_order['data']
Expand Down
121 changes: 72 additions & 49 deletions addons/point_of_sale/point_of_sale_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -628,57 +628,80 @@
</div>
</header>

<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
<group col="4">
<field name="picking_type_id" widget="selection" groups="stock.group_locations"
on_change="onchange_picking_type_id(picking_type_id)"/>
<field name="stock_location_id" groups="stock.group_locations"/>
<field name="pricelist_id" groups="product.group_sale_pricelist"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" widget="selection"/>
<field name="group_by" groups="account.group_account_user"/>
<field name="sequence_id" readonly="1" groups="base.group_no_one"/>
</group>
<separator string="Available Payment Methods" colspan="4"/>
<field name="journal_ids" colspan="4" nolabel="1">
<tree string="Journals">
<field name="code" />
<field name="name" />
<field name="type" />
<field name="cash_control" />
</tree>
</field>
<group string="Features" >
<group>
<field name="iface_vkeyboard" />
<field name="iface_invoicing" />
<sheet>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
<group col="4">
<field name="picking_type_id" widget="selection" groups="stock.group_locations"
on_change="onchange_picking_type_id(picking_type_id)"/>
<field name="stock_location_id" groups="stock.group_locations"/>
<field name="pricelist_id" groups="product.group_sale_pricelist"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" widget="selection"/>
<field name="group_by" groups="account.group_account_user"/>
<field name="sequence_id" readonly="1" groups="base.group_no_one"/>
</group>
<group>
<field name="iface_big_scrollbars" />
<separator string="Available Payment Methods" colspan="4"/>
<field name="journal_ids" colspan="4" nolabel="1">
<tree string="Journals">
<field name="code" />
<field name="name" />
<field name="type" />
<field name="cash_control" />
</tree>
</field>
<group string="Features" >
<group>
<field name="iface_vkeyboard" />
<field name="iface_invoicing" />
</group>
<group>
<field name="iface_fullscreen" />
<field name="iface_big_scrollbars" />
</group>
</group>
</group>
<group string="Hardware Proxy" >
<field name="proxy_ip" />
<field name="iface_print_via_proxy" />
<field name="iface_scan_via_proxy" />
<field name="iface_electronic_scale" />
<field name="iface_cashdrawer" />
</group>
<group string="Receipt" >
<field name="receipt_header" placeholder="A custom receipt header message"/>
<field name="receipt_footer" placeholder="A custom receipt header footage"/>
</group>
<group string="Barcode Types" col="4">
<field name="barcode_product" />
<field name="barcode_cashier" />
<field name="barcode_customer" />
<field name="barcode_weight" />
<field name="barcode_discount" />
<field name="barcode_price" />
</group>
<group string="Hardware Proxy" >
<field name="proxy_ip" />
<field name="iface_print_via_proxy" />
<field name="iface_scan_via_proxy" />
<field name="iface_electronic_scale" />
<field name="iface_cashdrawer" />
</group>
<group string="Receipt" >
<field name="receipt_header" placeholder="A custom receipt header message"/>
<field name="receipt_footer" placeholder="A custom receipt header footage"/>
</group>
<group string="Barcode Types" col="1">
<p>
Barcode Patterns allow to match barcodes to actions or to embed information such as price and quantity in the barcode.
Barcode Patterns only work with EAN13 barcodes.
</p>
<p>
Each type of barcode accepts a list of patterns seprated by commas. A scanned
barcode will be attributed to a type if it matches one of its patterns.
The patterns take the form of EAN13 barcodes. Numbers in the pattern must match
the number in the scanned barcode. A 'x' or a '*' in a pattern will match
any one number. If the patterns are shorter than EAN13 barcodes, they are assumed
to be prefixes and match at the beginning. Weight, Price and Discount patterns also
tell how the weight, price or discount is encoded in the barcode. 'N' indicate the
positions where the integer part is en encoded, and 'D' where the decimals are encoded.
If multiple pattern match one barcode, the longest pattern with the less 'x' or '*' is
considered the matching one. If a barcode matches no pattern it will not be found in
the POS.
</p>
<group col="4">

<field name="barcode_product" />
<field name="barcode_cashier" />
<field name="barcode_customer" />
<field name="barcode_weight" />
<field name="barcode_discount" />
<field name="barcode_price" />
</group>
</group>
</sheet>

</form>
</field>
Expand Down
Loading

0 comments on commit e96bb90

Please sign in to comment.