Merge branch 'master' of https://github.com/odoo/odoo
This commit is contained in:
@@ -132,6 +132,20 @@
|
||||
</record>
|
||||
<menuitem action="action_account_form" id="menu_action_account_form" parent="menu_finance_entries" sequence="20"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_partner_ledger_payable"
|
||||
name="Partner Ledger: Payable"
|
||||
res_model="account.move.line"
|
||||
context="{'search_default_partner_id':[active_id], 'search_default_unreconciled':1, 'search_default_payable':1}"
|
||||
src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_partner_ledger_receivable"
|
||||
name="Partner Ledger: Receivable"
|
||||
res_model="account.move.line"
|
||||
context="{'search_default_partner_id':[active_id], 'search_default_unreconciled':1, 'search_default_receivable':1}"
|
||||
src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_acount_move_line_open_unreconciled"
|
||||
name="Unreconciled Entries"
|
||||
@@ -1131,6 +1145,9 @@
|
||||
<separator/>
|
||||
<filter string="Unreconciled" domain="[('reconciled','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items" name="unreconciled"/>
|
||||
<separator/>
|
||||
<filter string="Payable" domain="[('account_id.internal_type', '=', 'payable')]" help="From Payable accounts" name="payable"/>
|
||||
<filter string="Receivable" domain="[('account_id.internal_type', '=', 'receivable')]" help="From Receivable accounts" name="receivable"/>
|
||||
<separator/>
|
||||
<field name="move_id" string="Number (Move)"/>
|
||||
<field name="account_id"/>
|
||||
<field name="partner_id"/>
|
||||
|
||||
@@ -30,7 +30,6 @@ Main Features
|
||||
""",
|
||||
'depends': ['sale_stock', 'barcodes'],
|
||||
'data': [
|
||||
'data/report_paperformat.xml',
|
||||
'data/default_barcode_patterns.xml',
|
||||
'security/point_of_sale_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
@@ -55,7 +54,6 @@ Main Features
|
||||
'res_config_view.xml',
|
||||
'views/report_statement.xml',
|
||||
'views/report_usersproduct.xml',
|
||||
'views/report_receipt.xml',
|
||||
'views/report_saleslines.xml',
|
||||
'views/report_detailsofsales.xml',
|
||||
'views/report_payment.xml',
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="paperformat_posreceipt" model="report.paperformat">
|
||||
<field name="name">Point Of Sale Receipt</field>
|
||||
<field name="default" eval="True"/>
|
||||
<field name="format">custom</field>
|
||||
<field name="page_height">150</field>
|
||||
<field name="page_width">60</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">3</field>
|
||||
<field name="margin_bottom">3</field>
|
||||
<field name="margin_left">3</field>
|
||||
<field name="margin_right">3</field>
|
||||
<field name="header_line" eval="False" />
|
||||
<field name="header_spacing">3</field>
|
||||
<field name="dpi">130</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -19,16 +19,6 @@
|
||||
file="point_of_sale.report_invoice"
|
||||
/>
|
||||
|
||||
<report
|
||||
id="action_report_pos_receipt"
|
||||
string="Receipt"
|
||||
model="pos.order"
|
||||
report_type="qweb-pdf"
|
||||
name="point_of_sale.report_receipt"
|
||||
file="point_of_sale.report_receipt"
|
||||
paperformat="point_of_sale.paperformat_posreceipt"
|
||||
/>
|
||||
|
||||
<report
|
||||
id="pos_lines_report"
|
||||
string="Sales Lines"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<button name="action_invoice" string="Invoice" type="object" states="paid" attrs="{'readonly': [('partner_id','=',False)]}"/>
|
||||
<button name="refund" string="Return Products" type="object"
|
||||
attrs="{'invisible':[('state','=','draft')]}"/>
|
||||
<button name="%(action_report_pos_receipt)d" string="Reprint" type="action" states="paid,done,invoiced"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,paid,done" statusbar_colors='{"cancel":"red"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
||||
@@ -55,10 +55,3 @@ class order(report_sxw.rml_parse):
|
||||
self.cr.execute(sql)
|
||||
data = self.cr.dictfetchall()
|
||||
return data
|
||||
|
||||
|
||||
class report_order_receipt(osv.AbstractModel):
|
||||
_name = 'report.point_of_sale.report_receipt'
|
||||
_inherit = 'report.abstract_report'
|
||||
_template = 'point_of_sale.report_receipt'
|
||||
_wrapped_report_class = order
|
||||
|
||||
@@ -20,17 +20,6 @@
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-lines_report.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
In order to test the PDF reports defined on a Point of Sale, we will print a POS Receipt Report
|
||||
-
|
||||
!python {model: pos.order}: |
|
||||
import os
|
||||
import openerp.report
|
||||
from openerp import tools
|
||||
data, format = openerp.report.render_report(cr, uid, [ref('pos_order_pos1')], 'point_of_sale.report_receipt', {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-receipt_report.'+format), 'wb+').write(data)
|
||||
|
||||
-
|
||||
Print the POS Details Report through the wizard
|
||||
-
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_receipt">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-center">
|
||||
<h2 t-esc="o.user_id.company_id.name"/>
|
||||
<div t-field="o.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>
|
||||
User: <span t-field="o.user_id"/><br/>
|
||||
Date: <span t-field="o.date_order"/><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th class="text-right">Price</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="o.lines" t-as="line">
|
||||
<td><span t-field="line.product_id"/></td>
|
||||
<td class="text-right">
|
||||
<t t-if="o.state != 'cancel' and o.statement_ids">
|
||||
<span t-field="line.qty"/>
|
||||
</t>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<t t-if="o.state != 'cancel' and o.statement_ids">
|
||||
<span t-esc="formatLang(net(line.id), currency_obj=res_company.currency_id)"/>
|
||||
</t>
|
||||
<t t-if="line.discount != 0.0">
|
||||
<span t-esc="formatLang(line.discount, currency_obj=res_company.currency_id)"/>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6 pull-right">
|
||||
<table class="table table-condensed">
|
||||
<tr class="border-black">
|
||||
<td><strong>Taxes</strong></td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="formatLang(o.amount_tax, currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Total</strong></td>
|
||||
<td class="text-right">
|
||||
<strong t-esc="formatLang(o.amount_total, currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Payment Mode</th>
|
||||
<th>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="get_journal_amt(o)" t-as="d">
|
||||
<td>
|
||||
<span t-esc="d['name']"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="formatLang(d['amt'], currency_obj=res_company.currency_id)"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user