summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-05-22 16:44:33 +0200
committerOlivier Dony <odo@openerp.com>2014-05-22 16:44:33 +0200
commit2af03e1b6eb203cfa52082d49ef1ff1a8fec2b49 (patch)
tree24993bde74980ff5cf304a49340bde0892b9c938
parent35a07975deb0187e3480c4866e244dee147b3344 (diff)
parentf8671cb48abfb5728a116a183e13e5cb1af6b45e (diff)
[MERGE] Forward-port latest 7.0 bugfixes, up to f8671cb
-rw-r--r--addons/account/project/report/analytic_balance.sxwbin0 -> 20458 bytes
-rw-r--r--addons/account/project/report/analytic_journal.sxwbin0 -> 18097 bytes
-rw-r--r--addons/account/project/report/cost_ledger.sxwbin0 -> 20004 bytes
-rw-r--r--addons/account/project/report/inverted_analytic_balance.sxwbin0 -> 22547 bytes
-rw-r--r--addons/account/project/report/quantity_cost_ledger.sxwbin0 -> 17855 bytes
-rw-r--r--addons/account/report/account_aged_partner_balance.py26
-rw-r--r--addons/account/report/account_aged_partner_balance.sxwbin0 -> 25325 bytes
-rw-r--r--addons/account/report/account_balance.sxwbin0 -> 21797 bytes
-rw-r--r--addons/account/report/account_central_journal.sxwbin0 -> 25367 bytes
-rw-r--r--addons/account/report/account_general_journal.sxwbin0 -> 22467 bytes
-rw-r--r--addons/account/report/account_general_ledger.sxwbin0 -> 25187 bytes
-rw-r--r--addons/account/report/account_general_ledger_landscape.sxwbin0 -> 19356 bytes
-rw-r--r--addons/account/report/account_journal.sxwbin0 -> 27078 bytes
-rw-r--r--addons/account/report/account_journal_sale_purchase.sxwbin0 -> 16990 bytes
-rw-r--r--addons/account/report/account_partner_balance.sxwbin0 -> 24299 bytes
-rw-r--r--addons/account/report/account_partner_ledger.sxwbin0 -> 25071 bytes
-rw-r--r--addons/account/report/account_partner_ledger_other.sxwbin0 -> 23168 bytes
-rw-r--r--addons/account/report/account_print_invoice.sxwbin0 -> 14947 bytes
-rw-r--r--addons/account/report/account_print_overdue.sxwbin0 -> 13875 bytes
-rw-r--r--addons/account/report/account_tax_report.sxwbin0 -> 15966 bytes
-rw-r--r--addons/account_analytic_plans/report/crossovered_analytic.sxwbin0 -> 17271 bytes
-rw-r--r--addons/account_budget/account_budget.py3
-rw-r--r--addons/account_budget/report/analytic_account_budget_report.sxwbin0 -> 19223 bytes
-rw-r--r--addons/account_budget/report/budget_report.sxwbin0 -> 20313 bytes
-rw-r--r--addons/account_budget/report/crossovered_budget_report.sxwbin0 -> 21931 bytes
-rw-r--r--addons/account_check_writing/report/check_print.sxwbin0 -> 17039 bytes
-rw-r--r--addons/account_check_writing/report/check_print_bottom.sxwbin0 -> 18000 bytes
-rw-r--r--addons/account_check_writing/report/check_print_middle.sxwbin0 -> 19768 bytes
-rw-r--r--addons/account_check_writing/report/check_print_top.sxwbin0 -> 19075 bytes
-rw-r--r--addons/account_followup/report/account_followup_print.sxwbin0 -> 12158 bytes
-rw-r--r--addons/account_payment/report/order.sxwbin0 -> 22749 bytes
-rw-r--r--addons/account_test/report/account_test.sxwbin0 -> 11038 bytes
-rw-r--r--addons/account_voucher/report/account_voucher.sxwbin0 -> 21496 bytes
-rw-r--r--addons/account_voucher/report/account_voucher_print.sxwbin0 -> 16832 bytes
-rw-r--r--addons/delivery/report/shipping.sxwbin0 -> 11591 bytes
-rw-r--r--addons/hr_attendance/report/attendance_errors.sxwbin0 -> 16072 bytes
-rw-r--r--addons/hr_expense/report/expense.sxwbin0 -> 17540 bytes
-rw-r--r--addons/hr_payroll/report/report_contribution_register.sxwbin0 -> 14676 bytes
-rw-r--r--addons/hr_payroll/report/report_payslip.sxwbin0 -> 15896 bytes
-rw-r--r--addons/hr_payroll/report/report_payslip_details.sxwbin0 -> 22512 bytes
-rw-r--r--addons/hr_timesheet_invoice/report/account_analytic_profit.sxwbin0 -> 16566 bytes
-rw-r--r--addons/l10n_fr/report/bilan_report.sxwbin0 -> 24614 bytes
-rw-r--r--addons/l10n_fr/report/compute_resultant_report.sxwbin0 -> 19002 bytes
-rw-r--r--addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxwbin0 -> 22575 bytes
-rw-r--r--addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.sxwbin0 -> 19751 bytes
-rw-r--r--addons/l10n_in_hr_payroll/report/report_payroll_advice.sxwbin0 -> 16385 bytes
-rw-r--r--addons/l10n_in_hr_payroll/report/report_payslip_details.sxwbin0 -> 18941 bytes
-rw-r--r--addons/lunch/report/order.sxwbin0 -> 17904 bytes
-rw-r--r--addons/mrp/report/bom_structure.sxwbin0 -> 14353 bytes
-rw-r--r--addons/mrp/report/order.sxwbin0 -> 24434 bytes
-rw-r--r--addons/point_of_sale/report/account_statement.sxwbin0 -> 15264 bytes
-rw-r--r--addons/point_of_sale/report/all_closed_cashbox_of_the_day.sxwbin0 -> 16504 bytes
-rw-r--r--addons/point_of_sale/report/pos_details.sxwbin0 -> 21857 bytes
-rw-r--r--addons/point_of_sale/report/pos_details_summary.sxwbin0 -> 11749 bytes
-rw-r--r--addons/point_of_sale/report/pos_lines.sxwbin0 -> 16844 bytes
-rw-r--r--addons/point_of_sale/report/pos_payment_report_user.sxwbin0 -> 15845 bytes
-rw-r--r--addons/point_of_sale/report/pos_receipt.sxwbin0 -> 19717 bytes
-rw-r--r--addons/point_of_sale/report/pos_sales_user.sxwbin0 -> 12774 bytes
-rw-r--r--addons/point_of_sale/report/pos_sales_user_today.sxwbin0 -> 13095 bytes
-rw-r--r--addons/point_of_sale/report/pos_users_product.sxwbin0 -> 14894 bytes
-rw-r--r--addons/product/report/product_pricelist.sxwbin0 -> 11719 bytes
-rw-r--r--addons/purchase/report/order.sxwbin0 -> 13413 bytes
-rw-r--r--addons/purchase/report/request_quotation.sxwbin0 -> 19650 bytes
-rw-r--r--addons/purchase_requisition/report/purchase_requisition.sxwbin0 -> 20746 bytes
-rw-r--r--addons/report_intrastat/report/invoice.sxwbin0 -> 27179 bytes
-rw-r--r--addons/report_webkit/webkit_report.py40
-rw-r--r--addons/sale/report/sale_order.sxwbin0 -> 14345 bytes
-rw-r--r--addons/stock/report/lot_overview.sxwbin0 -> 16765 bytes
-rw-r--r--addons/stock/report/lot_overview_all.sxwbin0 -> 16567 bytes
-rw-r--r--addons/stock/report/picking.sxwbin0 -> 14200 bytes
-rw-r--r--addons/stock/report/stock_inventory_move.sxwbin0 -> 14404 bytes
-rw-r--r--openerp/report/render/rml2pdf/trml2pdf.py2
72 files changed, 38 insertions, 33 deletions
diff --git a/addons/account/project/report/analytic_balance.sxw b/addons/account/project/report/analytic_balance.sxw
new file mode 100644
index 00000000000..cea80fa1105
--- /dev/null
+++ b/addons/account/project/report/analytic_balance.sxw
Binary files differ
diff --git a/addons/account/project/report/analytic_journal.sxw b/addons/account/project/report/analytic_journal.sxw
new file mode 100644
index 00000000000..de3fa533a2b
--- /dev/null
+++ b/addons/account/project/report/analytic_journal.sxw
Binary files differ
diff --git a/addons/account/project/report/cost_ledger.sxw b/addons/account/project/report/cost_ledger.sxw
new file mode 100644
index 00000000000..dc1c18d39e1
--- /dev/null
+++ b/addons/account/project/report/cost_ledger.sxw
Binary files differ
diff --git a/addons/account/project/report/inverted_analytic_balance.sxw b/addons/account/project/report/inverted_analytic_balance.sxw
new file mode 100644
index 00000000000..99c4987b193
--- /dev/null
+++ b/addons/account/project/report/inverted_analytic_balance.sxw
Binary files differ
diff --git a/addons/account/project/report/quantity_cost_ledger.sxw b/addons/account/project/report/quantity_cost_ledger.sxw
new file mode 100644
index 00000000000..18bf9af328c
--- /dev/null
+++ b/addons/account/project/report/quantity_cost_ledger.sxw
Binary files differ
diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index 3b000e40592..b7c26120b48 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -159,7 +159,7 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
dates_query += ' < %s)'
args_list += (form[str(i)]['stop'],)
args_list += (self.date_from,)
- self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit)
+ self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit), l.reconcile_partial_id
FROM account_move_line AS l, account_account, account_move am
WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)
AND (am.state IN %s)
@@ -171,12 +171,24 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
AND account_account.active
AND ''' + dates_query + '''
AND (l.date <= %s)
- GROUP BY l.partner_id''', args_list)
- t = self.cr.fetchall()
- d = {}
- for i in t:
- d[i[0]] = i[1]
- history.append(d)
+ GROUP BY l.partner_id, l.reconcile_partial_id''', args_list)
+ partners_partial = self.cr.fetchall()
+ partners_amount = dict((i[0],0) for i in partners_partial)
+ for partner_info in partners_partial:
+ if partner_info[2]:
+ # in case of partial reconciliation, we want to keep the left amount in the oldest period
+ self.cr.execute('''SELECT MIN(COALESCE(date_maturity,date)) FROM account_move_line WHERE reconcile_partial_id = %s''', (partner_info[2],))
+ date = self.cr.fetchall()
+ if date and args_list[-3] <= date[0][0] <= args_list[-2]:
+ # partial reconcilation
+ self.cr.execute('''SELECT SUM(l.debit-l.credit)
+ FROM account_move_line AS l
+ WHERE l.reconcile_partial_id = %s''', (partner_info[2],))
+ unreconciled_amount = self.cr.fetchall()
+ partners_amount[partner_info[0]] += unreconciled_amount[0][0]
+ else:
+ partners_amount[partner_info[0]] += partner_info[1]
+ history.append(partners_amount)
for partner in partners:
values = {}
diff --git a/addons/account/report/account_aged_partner_balance.sxw b/addons/account/report/account_aged_partner_balance.sxw
new file mode 100644
index 00000000000..bce27e551ce
--- /dev/null
+++ b/addons/account/report/account_aged_partner_balance.sxw
Binary files differ
diff --git a/addons/account/report/account_balance.sxw b/addons/account/report/account_balance.sxw
new file mode 100644
index 00000000000..117c0bc386b
--- /dev/null
+++ b/addons/account/report/account_balance.sxw
Binary files differ
diff --git a/addons/account/report/account_central_journal.sxw b/addons/account/report/account_central_journal.sxw
new file mode 100644
index 00000000000..8fd2b46e348
--- /dev/null
+++ b/addons/account/report/account_central_journal.sxw
Binary files differ
diff --git a/addons/account/report/account_general_journal.sxw b/addons/account/report/account_general_journal.sxw
new file mode 100644
index 00000000000..631b2e87151
--- /dev/null
+++ b/addons/account/report/account_general_journal.sxw
Binary files differ
diff --git a/addons/account/report/account_general_ledger.sxw b/addons/account/report/account_general_ledger.sxw
new file mode 100644
index 00000000000..35c1d0bc5cc
--- /dev/null
+++ b/addons/account/report/account_general_ledger.sxw
Binary files differ
diff --git a/addons/account/report/account_general_ledger_landscape.sxw b/addons/account/report/account_general_ledger_landscape.sxw
new file mode 100644
index 00000000000..815a5adf88a
--- /dev/null
+++ b/addons/account/report/account_general_ledger_landscape.sxw
Binary files differ
diff --git a/addons/account/report/account_journal.sxw b/addons/account/report/account_journal.sxw
new file mode 100644
index 00000000000..5010574eac7
--- /dev/null
+++ b/addons/account/report/account_journal.sxw
Binary files differ
diff --git a/addons/account/report/account_journal_sale_purchase.sxw b/addons/account/report/account_journal_sale_purchase.sxw
new file mode 100644
index 00000000000..19a77dec18b
--- /dev/null
+++ b/addons/account/report/account_journal_sale_purchase.sxw
Binary files differ
diff --git a/addons/account/report/account_partner_balance.sxw b/addons/account/report/account_partner_balance.sxw
new file mode 100644
index 00000000000..d721a9df080
--- /dev/null
+++ b/addons/account/report/account_partner_balance.sxw
Binary files differ
diff --git a/addons/account/report/account_partner_ledger.sxw b/addons/account/report/account_partner_ledger.sxw
new file mode 100644
index 00000000000..f08b997f240
--- /dev/null
+++ b/addons/account/report/account_partner_ledger.sxw
Binary files differ
diff --git a/addons/account/report/account_partner_ledger_other.sxw b/addons/account/report/account_partner_ledger_other.sxw
new file mode 100644
index 00000000000..811bffc4767
--- /dev/null
+++ b/addons/account/report/account_partner_ledger_other.sxw
Binary files differ
diff --git a/addons/account/report/account_print_invoice.sxw b/addons/account/report/account_print_invoice.sxw
new file mode 100644
index 00000000000..ad2f7591304
--- /dev/null
+++ b/addons/account/report/account_print_invoice.sxw
Binary files differ
diff --git a/addons/account/report/account_print_overdue.sxw b/addons/account/report/account_print_overdue.sxw
new file mode 100644
index 00000000000..2faddc7606c
--- /dev/null
+++ b/addons/account/report/account_print_overdue.sxw
Binary files differ
diff --git a/addons/account/report/account_tax_report.sxw b/addons/account/report/account_tax_report.sxw
new file mode 100644
index 00000000000..2153eec7ef1
--- /dev/null
+++ b/addons/account/report/account_tax_report.sxw
Binary files differ
diff --git a/addons/account_analytic_plans/report/crossovered_analytic.sxw b/addons/account_analytic_plans/report/crossovered_analytic.sxw
new file mode 100644
index 00000000000..e1c1cc9c6f3
--- /dev/null
+++ b/addons/account_analytic_plans/report/crossovered_analytic.sxw
Binary files differ
diff --git a/addons/account_budget/account_budget.py b/addons/account_budget/account_budget.py
index 753a5df79f4..78e85716bbd 100644
--- a/addons/account_budget/account_budget.py
+++ b/addons/account_budget/account_budget.py
@@ -22,6 +22,7 @@
import datetime
from openerp.osv import fields, osv
+from openerp.tools import ustr
from openerp.tools.translate import _
import openerp.addons.decimal_precision as dp
@@ -114,7 +115,7 @@ class crossovered_budget_lines(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
acc_ids = [x.id for x in line.general_budget_id.account_ids]
if not acc_ids:
- raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
+ raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % ustr(line.general_budget_id.name))
date_to = line.date_to
date_from = line.date_from
if context.has_key('wizard_date_from'):
diff --git a/addons/account_budget/report/analytic_account_budget_report.sxw b/addons/account_budget/report/analytic_account_budget_report.sxw
new file mode 100644
index 00000000000..f248e6e33dc
--- /dev/null
+++ b/addons/account_budget/report/analytic_account_budget_report.sxw
Binary files differ
diff --git a/addons/account_budget/report/budget_report.sxw b/addons/account_budget/report/budget_report.sxw
new file mode 100644
index 00000000000..84ecf3c39d1
--- /dev/null
+++ b/addons/account_budget/report/budget_report.sxw
Binary files differ
diff --git a/addons/account_budget/report/crossovered_budget_report.sxw b/addons/account_budget/report/crossovered_budget_report.sxw
new file mode 100644
index 00000000000..8922113b2a0
--- /dev/null
+++ b/addons/account_budget/report/crossovered_budget_report.sxw
Binary files differ
diff --git a/addons/account_check_writing/report/check_print.sxw b/addons/account_check_writing/report/check_print.sxw
new file mode 100644
index 00000000000..98dae7b4fc9
--- /dev/null
+++ b/addons/account_check_writing/report/check_print.sxw
Binary files differ
diff --git a/addons/account_check_writing/report/check_print_bottom.sxw b/addons/account_check_writing/report/check_print_bottom.sxw
new file mode 100644
index 00000000000..baf56526dc9
--- /dev/null
+++ b/addons/account_check_writing/report/check_print_bottom.sxw
Binary files differ
diff --git a/addons/account_check_writing/report/check_print_middle.sxw b/addons/account_check_writing/report/check_print_middle.sxw
new file mode 100644
index 00000000000..86e4f280fee
--- /dev/null
+++ b/addons/account_check_writing/report/check_print_middle.sxw
Binary files differ
diff --git a/addons/account_check_writing/report/check_print_top.sxw b/addons/account_check_writing/report/check_print_top.sxw
new file mode 100644
index 00000000000..f55159d57ee
--- /dev/null
+++ b/addons/account_check_writing/report/check_print_top.sxw
Binary files differ
diff --git a/addons/account_followup/report/account_followup_print.sxw b/addons/account_followup/report/account_followup_print.sxw
new file mode 100644
index 00000000000..4379aa5abce
--- /dev/null
+++ b/addons/account_followup/report/account_followup_print.sxw
Binary files differ
diff --git a/addons/account_payment/report/order.sxw b/addons/account_payment/report/order.sxw
new file mode 100644
index 00000000000..ac3d65c6586
--- /dev/null
+++ b/addons/account_payment/report/order.sxw
Binary files differ
diff --git a/addons/account_test/report/account_test.sxw b/addons/account_test/report/account_test.sxw
new file mode 100644
index 00000000000..a4047e151e6
--- /dev/null
+++ b/addons/account_test/report/account_test.sxw
Binary files differ
diff --git a/addons/account_voucher/report/account_voucher.sxw b/addons/account_voucher/report/account_voucher.sxw
new file mode 100644
index 00000000000..9db5937944e
--- /dev/null
+++ b/addons/account_voucher/report/account_voucher.sxw
Binary files differ
diff --git a/addons/account_voucher/report/account_voucher_print.sxw b/addons/account_voucher/report/account_voucher_print.sxw
new file mode 100644
index 00000000000..452605b57ca
--- /dev/null
+++ b/addons/account_voucher/report/account_voucher_print.sxw
Binary files differ
diff --git a/addons/delivery/report/shipping.sxw b/addons/delivery/report/shipping.sxw
new file mode 100644
index 00000000000..b169a2d7039
--- /dev/null
+++ b/addons/delivery/report/shipping.sxw
Binary files differ
diff --git a/addons/hr_attendance/report/attendance_errors.sxw b/addons/hr_attendance/report/attendance_errors.sxw
new file mode 100644
index 00000000000..1faeca38251
--- /dev/null
+++ b/addons/hr_attendance/report/attendance_errors.sxw
Binary files differ
diff --git a/addons/hr_expense/report/expense.sxw b/addons/hr_expense/report/expense.sxw
new file mode 100644
index 00000000000..ac31b2d7f2e
--- /dev/null
+++ b/addons/hr_expense/report/expense.sxw
Binary files differ
diff --git a/addons/hr_payroll/report/report_contribution_register.sxw b/addons/hr_payroll/report/report_contribution_register.sxw
new file mode 100644
index 00000000000..01cef632cbb
--- /dev/null
+++ b/addons/hr_payroll/report/report_contribution_register.sxw
Binary files differ
diff --git a/addons/hr_payroll/report/report_payslip.sxw b/addons/hr_payroll/report/report_payslip.sxw
new file mode 100644
index 00000000000..1c5b7fce54f
--- /dev/null
+++ b/addons/hr_payroll/report/report_payslip.sxw
Binary files differ
diff --git a/addons/hr_payroll/report/report_payslip_details.sxw b/addons/hr_payroll/report/report_payslip_details.sxw
new file mode 100644
index 00000000000..ad84d765292
--- /dev/null
+++ b/addons/hr_payroll/report/report_payslip_details.sxw
Binary files differ
diff --git a/addons/hr_timesheet_invoice/report/account_analytic_profit.sxw b/addons/hr_timesheet_invoice/report/account_analytic_profit.sxw
new file mode 100644
index 00000000000..dbd77e8496a
--- /dev/null
+++ b/addons/hr_timesheet_invoice/report/account_analytic_profit.sxw
Binary files differ
diff --git a/addons/l10n_fr/report/bilan_report.sxw b/addons/l10n_fr/report/bilan_report.sxw
new file mode 100644
index 00000000000..45b8476b0ba
--- /dev/null
+++ b/addons/l10n_fr/report/bilan_report.sxw
Binary files differ
diff --git a/addons/l10n_fr/report/compute_resultant_report.sxw b/addons/l10n_fr/report/compute_resultant_report.sxw
new file mode 100644
index 00000000000..69ec3882180
--- /dev/null
+++ b/addons/l10n_fr/report/compute_resultant_report.sxw
Binary files differ
diff --git a/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxw b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxw
new file mode 100644
index 00000000000..4eb40f3edc9
--- /dev/null
+++ b/addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.sxw
Binary files differ
diff --git a/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.sxw b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.sxw
new file mode 100644
index 00000000000..e1a6f012fbd
--- /dev/null
+++ b/addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.sxw
Binary files differ
diff --git a/addons/l10n_in_hr_payroll/report/report_payroll_advice.sxw b/addons/l10n_in_hr_payroll/report/report_payroll_advice.sxw
new file mode 100644
index 00000000000..46b3596ae54
--- /dev/null
+++ b/addons/l10n_in_hr_payroll/report/report_payroll_advice.sxw
Binary files differ
diff --git a/addons/l10n_in_hr_payroll/report/report_payslip_details.sxw b/addons/l10n_in_hr_payroll/report/report_payslip_details.sxw
new file mode 100644
index 00000000000..782297d9324
--- /dev/null
+++ b/addons/l10n_in_hr_payroll/report/report_payslip_details.sxw
Binary files differ
diff --git a/addons/lunch/report/order.sxw b/addons/lunch/report/order.sxw
new file mode 100644
index 00000000000..c8ec7ac3d47
--- /dev/null
+++ b/addons/lunch/report/order.sxw
Binary files differ
diff --git a/addons/mrp/report/bom_structure.sxw b/addons/mrp/report/bom_structure.sxw
new file mode 100644
index 00000000000..3cf1cf10086
--- /dev/null
+++ b/addons/mrp/report/bom_structure.sxw
Binary files differ
diff --git a/addons/mrp/report/order.sxw b/addons/mrp/report/order.sxw
new file mode 100644
index 00000000000..2786a2e50d3
--- /dev/null
+++ b/addons/mrp/report/order.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/account_statement.sxw b/addons/point_of_sale/report/account_statement.sxw
new file mode 100644
index 00000000000..bc251a62bbf
--- /dev/null
+++ b/addons/point_of_sale/report/account_statement.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/all_closed_cashbox_of_the_day.sxw b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.sxw
new file mode 100644
index 00000000000..957700631d6
--- /dev/null
+++ b/addons/point_of_sale/report/all_closed_cashbox_of_the_day.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_details.sxw b/addons/point_of_sale/report/pos_details.sxw
new file mode 100644
index 00000000000..5f5bb4c412f
--- /dev/null
+++ b/addons/point_of_sale/report/pos_details.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_details_summary.sxw b/addons/point_of_sale/report/pos_details_summary.sxw
new file mode 100644
index 00000000000..5ce7a41895a
--- /dev/null
+++ b/addons/point_of_sale/report/pos_details_summary.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_lines.sxw b/addons/point_of_sale/report/pos_lines.sxw
new file mode 100644
index 00000000000..01df6238300
--- /dev/null
+++ b/addons/point_of_sale/report/pos_lines.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_payment_report_user.sxw b/addons/point_of_sale/report/pos_payment_report_user.sxw
new file mode 100644
index 00000000000..fbe04ed9d5e
--- /dev/null
+++ b/addons/point_of_sale/report/pos_payment_report_user.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_receipt.sxw b/addons/point_of_sale/report/pos_receipt.sxw
new file mode 100644
index 00000000000..7baf80e1603
--- /dev/null
+++ b/addons/point_of_sale/report/pos_receipt.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_sales_user.sxw b/addons/point_of_sale/report/pos_sales_user.sxw
new file mode 100644
index 00000000000..cab80ff4f55
--- /dev/null
+++ b/addons/point_of_sale/report/pos_sales_user.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_sales_user_today.sxw b/addons/point_of_sale/report/pos_sales_user_today.sxw
new file mode 100644
index 00000000000..81554e65d89
--- /dev/null
+++ b/addons/point_of_sale/report/pos_sales_user_today.sxw
Binary files differ
diff --git a/addons/point_of_sale/report/pos_users_product.sxw b/addons/point_of_sale/report/pos_users_product.sxw
new file mode 100644
index 00000000000..ec934d807ee
--- /dev/null
+++ b/addons/point_of_sale/report/pos_users_product.sxw
Binary files differ
diff --git a/addons/product/report/product_pricelist.sxw b/addons/product/report/product_pricelist.sxw
new file mode 100644
index 00000000000..40d7a0d9642
--- /dev/null
+++ b/addons/product/report/product_pricelist.sxw
Binary files differ
diff --git a/addons/purchase/report/order.sxw b/addons/purchase/report/order.sxw
new file mode 100644
index 00000000000..827bcb1efe5
--- /dev/null
+++ b/addons/purchase/report/order.sxw
Binary files differ
diff --git a/addons/purchase/report/request_quotation.sxw b/addons/purchase/report/request_quotation.sxw
new file mode 100644
index 00000000000..8c242cb1284
--- /dev/null
+++ b/addons/purchase/report/request_quotation.sxw
Binary files differ
diff --git a/addons/purchase_requisition/report/purchase_requisition.sxw b/addons/purchase_requisition/report/purchase_requisition.sxw
new file mode 100644
index 00000000000..1d6c2c69c70
--- /dev/null
+++ b/addons/purchase_requisition/report/purchase_requisition.sxw
Binary files differ
diff --git a/addons/report_intrastat/report/invoice.sxw b/addons/report_intrastat/report/invoice.sxw
new file mode 100644
index 00000000000..11ed9cd7db1
--- /dev/null
+++ b/addons/report_intrastat/report/invoice.sxw
Binary files differ
diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py
index 60fb536ca96..c442ea32549 100644
--- a/addons/report_webkit/webkit_report.py
+++ b/addons/report_webkit/webkit_report.py
@@ -156,8 +156,8 @@ class WebKitParser(report_sxw):
"""Call webkit in order to generate pdf"""
if not webkit_header:
webkit_header = report_xml.webkit_header
- tmp_dir = tempfile.gettempdir()
- out_filename = tempfile.mktemp(suffix=".pdf", prefix="webkit.tmp.")
+ fd, out_filename = tempfile.mkstemp(suffix=".pdf",
+ prefix="webkit.tmp.")
file_to_del = [out_filename]
if comm_path:
command = [comm_path]
@@ -168,25 +168,15 @@ class WebKitParser(report_sxw):
# default to UTF-8 encoding. Use <meta charset="latin-1"> to override.
command.extend(['--encoding', 'utf-8'])
if header :
- head_file = file( os.path.join(
- tmp_dir,
- str(time.time()) + '.head.html'
- ),
- 'w'
- )
- head_file.write(self._sanitize_html(header.encode('utf-8')))
- head_file.close()
+ with tempfile.NamedTemporaryFile(suffix=".head.html",
+ delete=False) as head_file:
+ head_file.write(self._sanitize_html(header.encode('utf-8')))
file_to_del.append(head_file.name)
command.extend(['--header-html', head_file.name])
if footer :
- foot_file = file( os.path.join(
- tmp_dir,
- str(time.time()) + '.foot.html'
- ),
- 'w'
- )
- foot_file.write(self._sanitize_html(footer.encode('utf-8')))
- foot_file.close()
+ with tempfile.NamedTemporaryFile(suffix=".foot.html",
+ delete=False) as foot_file:
+ foot_file.write(self._sanitize_html(footer.encode('utf-8')))
file_to_del.append(foot_file.name)
command.extend(['--footer-html', foot_file.name])
@@ -204,10 +194,10 @@ class WebKitParser(report_sxw):
command.extend(['--page-size', str(webkit_header.format).replace(',', '.')])
count = 0
for html in html_list :
- html_file = file(os.path.join(tmp_dir, str(time.time()) + str(count) +'.body.html'), 'w')
- count += 1
- html_file.write(self._sanitize_html(html.encode('utf-8')))
- html_file.close()
+ with tempfile.NamedTemporaryFile(suffix="%d.body.html" %count,
+ delete=False) as html_file:
+ count += 1
+ html_file.write(self._sanitize_html(html.encode('utf-8')))
file_to_del.append(html_file.name)
command.append(html_file.name)
command.append(out_filename)
@@ -227,9 +217,9 @@ class WebKitParser(report_sxw):
if status :
raise except_osv(_('Webkit error' ),
_("The command 'wkhtmltopdf' failed with error code = %s. Message: %s") % (status, error_message))
- pdf_file = open(out_filename, 'rb')
- pdf = pdf_file.read()
- pdf_file.close()
+ with open(out_filename, 'rb') as pdf_file:
+ pdf = pdf_file.read()
+ os.close(fd)
finally:
if stderr_fd is not None:
os.close(stderr_fd)
diff --git a/addons/sale/report/sale_order.sxw b/addons/sale/report/sale_order.sxw
new file mode 100644
index 00000000000..4ae68b6060b
--- /dev/null
+++ b/addons/sale/report/sale_order.sxw
Binary files differ
diff --git a/addons/stock/report/lot_overview.sxw b/addons/stock/report/lot_overview.sxw
new file mode 100644
index 00000000000..25f42603e5d
--- /dev/null
+++ b/addons/stock/report/lot_overview.sxw
Binary files differ
diff --git a/addons/stock/report/lot_overview_all.sxw b/addons/stock/report/lot_overview_all.sxw
new file mode 100644
index 00000000000..c774f1bae9f
--- /dev/null
+++ b/addons/stock/report/lot_overview_all.sxw
Binary files differ
diff --git a/addons/stock/report/picking.sxw b/addons/stock/report/picking.sxw
new file mode 100644
index 00000000000..b397c285146
--- /dev/null
+++ b/addons/stock/report/picking.sxw
Binary files differ
diff --git a/addons/stock/report/stock_inventory_move.sxw b/addons/stock/report/stock_inventory_move.sxw
new file mode 100644
index 00000000000..bb6084a9ca0
--- /dev/null
+++ b/addons/stock/report/stock_inventory_move.sxw
Binary files differ
diff --git a/openerp/report/render/rml2pdf/trml2pdf.py b/openerp/report/render/rml2pdf/trml2pdf.py
index 6061c78e813..38308209999 100644
--- a/openerp/report/render/rml2pdf/trml2pdf.py
+++ b/openerp/report/render/rml2pdf/trml2pdf.py
@@ -1007,6 +1007,8 @@ class _rml_template(object):
if story_cnt > 0:
fis.append(platypus.PageBreak())
fis += r.render(node_story)
+ # Reset Page Number with new story tag
+ fis.append(PageReset())
story_cnt += 1
try:
if self.localcontext and self.localcontext.get('internal_header',False):