[FIX] point_of_sale: Fixed report error and yaml.

bzr revid: uco@tinyerp.com-20111101053930-58z2xraetj25i9e0
This commit is contained in:
Ujjvala Collins (OpenERP)
2011-11-01 11:09:30 +05:30
parent f4d5f0aaa0
commit 6337070b9a
2 changed files with 1 additions and 51 deletions
@@ -61,56 +61,6 @@
from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale')
-
I create a cash journal.
-
!record {model: account.journal, id: account_journal_cash0}:
name: 'Cash Journal'
code: 'CSJ'
type: 'cash'
view_id: account.account_journal_bank_view
sequence_id: account.sequence_journal
-
I create a record for Bank Statement.
-
!record {model: account.bank.statement, id: account_bank_statement_st0}:
name: St.05/19
balance_end_real: 0.0
date: !eval time.strftime('%Y-%m-%d')
journal_id: account_journal_cash0
line_ids:
- name: statement
date: !eval "(datetime.now() + timedelta(5*31)).strftime('%Y-%m-%d')"
type: customer
account_id: account_pos_account_sales
amount: 100
partner_id: base.res_partner_agrolait
period_id: account.period_5
state: 'draft'
-
In order to test the PDF reports defined on a Point Of Sale, we will print a Account Statement Report
-
!python {model: account.bank.statement}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.account.statement').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-account_statement_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS User Product Report
-
!python {model: account.bank.statement}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.pos.user.product').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-user_product_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point Of Sale, we will print a POS All Close Cashbox Of the Day Report
-
!python {model: account.bank.statement}: |
import netsvc, tools, os, time
(data, format) = netsvc.LocalService('report.all.closed.cashbox.of.the.day').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-all_closed_cash_box_of_the_day_report'+format), 'wb+').write(data)
-
In order to test the PDF reports defined on a Point of Sale, we will print a POS Sales User Report
-
+1 -1
View File
@@ -30,7 +30,7 @@ class pos_details(osv.osv_memory):
_columns = {
'date_start': fields.date('Date Start', required=True),
'date_end': fields.date('Date End', required=True),
'user_ids': fields.many2many('res.users', 'sale_user_rel', 'user_id', 'uid', 'Salesman'),
'user_ids': fields.many2many('res.users', 'sale_user_rel_details', 'user_id', 'uid', 'Salesman'),
}
_defaults = {
'date_start': lambda *a: time.strftime('%Y-%m-%d'),