Merge lp:~openerp-dev/openobject-addons/6.0-opw-16360-nep into lp:openobject-addons/6.0

Proposed by Nehal Panchal (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-16360-nep
Merge into: lp:openobject-addons/6.0
Diff against target: 64 lines (+16/-5)
2 files modified
account/report/account_general_journal.py (+14/-3)
account/report/account_general_journal.rml (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-16360-nep
Reviewer Review Type Date Requested Status
Nehal Panchal (OpenERP) (community) Needs Resubmitting
Anup(SerpentCS) (community) Approve
Raphael Collet (OpenERP) Pending
Review via email: mp+69601@code.launchpad.net

Description of the change

Hello,

General journals Report prints double entry for the journal, if the payment currency differs from the company's currency.

Improved General journals Report for grouping the entries as per journals.

Thank You.

To post a comment you must log in.
4736. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Nehal Panchal (OpenERP) (nep-openerp) wrote :

Hello ,

"General journals" Report prints double entry for the wages, bank and expenses journal, even if payment currency and company currency are same.

Thank You.

review: Needs Resubmitting
4737. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4738. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4739. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4740. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4741. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4742. By Quentin (OpenERP) <email address hidden>

[MERGE] opw 5852

4743. By Anup(SerpentCS)

[Merge]account_vooucher : Merged My Branch to fix the regression in bank statement when importing supplier invoice

4744. By Anup(SerpentCS)

[MERGE] thunderbird : Merged Ravi's branch for fixing thunderbird issue(Case:16137)

4745. By Jay Vora (Serpent Consulting Services)

[FIX] Sale : Set taxes to be null on the onchange of Product

4746. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4747. By Anup(SerpentCS)

[MERGE] sale : Merged Ravi's branch for Picking policy reconfigure issue

4748. By Anup(SerpentCS)

[FIX] account : Merged my branch for account profit loss report fix(Case:5583)

4749. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Priyesh' branch for the fix of onchange() of analytic account inside analytic line while analytic_user_function is installed

4750. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4751. By Priyesh (OpenERP)

[MERGE] Merged my branch to improve _debit_credit_bal_qtty method of analytic account for passing the related field name instead of all fields (case:16550)

4752. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Valencia's branch for the fix of computation of company contribution in Payslip

4753. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Olivier Dony's branch to correct the stock reservation algorithm

4754. By Valencia Rodrigues (OpenERP)

[FIX] Sale_Layout : Corrected the RML and SXW for the layout report which was failing due to wrong conditions note

4755. By Priyesh (OpenERP)

[MERGE] Merged IRA's branch to improve calculation of taxes while invoicing(case:16152)

4756. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4757. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Nehal Panchal (OpenERP) (nep-openerp) :
review: Needs Resubmitting
4758. By Priyesh (OpenERP)

[MERGE] Merged ADO's branch to fix the Keyerror: 'Amount' coming when Taxtype is defined as 'None' (case:16655)

4759. By Quentin (OpenERP) <email address hidden>

[FIX] crm_partner_assign: quick and dirty hack to switch latitude and longitude fields, as they are stored in wrong fields and we need to preserve database schema for existing instances. In trunk we will fix that in the right way.

4760. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4761. By Anup(SerpentCS)

[FIX] product : Merged Nehal's branch for UoM warning

4762. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4763. By Marco(Bremskerl)

[MERGE] Merged Marco(Bremskerl)'s branch for Purchase order report fixes(Case:16747)

4764. By Priyesh (OpenERP)

[MERGE] Merged ADO's branch to fetch the correct note of Payment term in Sale order report(case:16743)

4765. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4766. By Quentin (OpenERP) <email address hidden>

[FIX] account_voucher: 'currency_id' field doesn't exist in account.journal object, it's 'currency'

4767. By Anup(SerpentCS)

[MERGE] hr_timesheet : Merged Mohammed's branch for signin/signout wizard view fixes

4768. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4769. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4770. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4771. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4772. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4773. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4774. By Jay Vora (Serpent Consulting Services)

[FIX] Account_voucher : Fixed the onchange_date method which was missing the checking of context initially

4775. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4776. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4777. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Rifakat's branch for the fix of delivery report not printing the name when product has no code

4778. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4779. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4780. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4781. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4782. By Anup(SerpentCS)

[Merge] crm_*,project_*,hr_recruitment,mail_gateway: Merged my branch for the issue of Internal note(Case:16976)

4783. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4784. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4785. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4786. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4787. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4788. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4789. By Priyesh (OpenERP)

[MERGE] Merged My branch to fix the AssertionError of Fields in 'groupby' must appear in the list of fields to read(case:16819)

4790. By Quentin (OpenERP) <email address hidden>

[FIX] account, taxes report: removal of the option to print the report based on payment, as it seems we can't really do it. On the suggestion from fp and luc (c2c)

4791. By Quentin (OpenERP) <email address hidden>

[FIX] sale: backport of revision 3164.118.785 from trunk branch, to fix picked rate on SO

4792. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4793. By Priyesh (OpenERP)

[MERGE] Merged RHA's branch to fix the problem of showing inactive employees in Holidays report per department.(case:17104)

4794. By Anup(SerpentCS)

[MERGE] thunderbird,outlook : Merged Ravi's branch for documentation link fix(Case:17190)

4795. By Anup(SerpentCS)

[MERGE] thunderbird : Merged Ravi's branch for thunderbird push mail with accented chars fix(Case:16766)

4796. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Valencia's branch for the fix of creation of menu from wiki group(case 17204)

4797. By Jay Vora (Serpent Consulting Services)

[FIX] Hr_payroll,hr_payroll_account : Corrected the views and used xpath tag

4798. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4799. By Priyesh (OpenERP)

[IMP] account_voucher: Fixed AttributeError: 'bool' object has no attribute 'replace' in the absenece of number and activated sequence in payment journal of Voucher(case:17229)

4800. By Antony Lesuisse (OpenERP)

[FIX] account journal create sequence with company_id

4801. By tfr (Openerp)

[FIX] Calendar invitation issue

4802. By Quentin (OpenERP) <email address hidden>

[FIX] stock: allowed to set 0 as qty, otherwise if you ordered x PC1 and y PC2, and received only the PC1, then you have to delete the line with PC2 in the wizard. With that fix, you can just set it to 0

4803. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4804. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4805. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4806. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4807. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4808. By Anup(SerpentCS)

[Merge] Merged Valencia's branch for decimal precision fix(Case:17325)

4809. By Anup(SerpentCS)

[Merge] hr_timesheet_sheet : Merged Riken's branch for Timesheet's workflow correction(Case:17103)

4810. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4811. By Husen Daudi <hda@hda-laptop>

merged ach branch for issue opw-6306

4812. By Anup(SerpentCS)

[Merge] hr : Merged Nehal's branch for domain correction(Case:17165)

4813. By Anup(SerpentCS)

[Merge] sale_layout : Merged Nehal's branch for translation fixes in report(Case:17286)

4814. By Anup(SerpentCS)

[Merge] hr_holidays : Merged Nehal's branch for fixing the workflow(Case:17349)

4815. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4816. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Amit's branch for the fix of RFQ report showing good format of Address

4817. By Jay Vora (Serpent Consulting Services)

[MERGE] Analytic : Fixed the problem of search()/name_search() on analytic account,project

4818. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4819. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4820. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4821. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

4822. By Raphael Collet (OpenERP)

[FIX] crm_partner_assign: switch latitude and longitude fields

4823. By Raphael Collet (OpenERP)

[FIX] crm_partner_assign: revert former fix, and switch labels in res.partner instead

4824. By Raphael Collet (OpenERP)

[MERGE] fix opw 16763: missing meetings in calendar view

4825. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Nehal,

It is a crucial one.

Indeed a great fix!

Thanks.

review: Approve
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Nehal,

Can you please made the same fix with .sxw file as you did it with rml?

Thanks.

4826. By Nehal Panchal (OpenERP)

[FIX] account : Improve General journals Report for grouping the entries as per journals

Revision history for this message
Nehal Panchal (OpenERP) (nep-openerp) wrote :

Hello Sir,

I have made the changes in .sxw as you suggested.

Thanks.

review: Needs Resubmitting

Unmerged revisions

4826. By Nehal Panchal (OpenERP)

[FIX] account : Improve General journals Report for grouping the entries as per journals

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_general_journal.py'
2--- account/report/account_general_journal.py 2011-01-14 00:11:01 +0000
3+++ account/report/account_general_journal.py 2011-09-15 16:34:28 +0000
4@@ -80,21 +80,32 @@
5 filtered_objs = filter(filter_unique, journal_period_objs)
6 return map(lambda x: x.period_id, filtered_objs)
7
8- def lines(self, period_id):
9+ def lines(self, period_id, amount_currency):
10 if not self.journal_ids:
11 return []
12 move_state = ['draft','posted']
13 if self.target_move == 'posted':
14 move_state = ['posted']
15- self.cr.execute('SELECT j.code, j.name, l.amount_currency,c.symbol AS currency_code,l.currency_id, '
16+ if not amount_currency:
17+ self.cr.execute('SELECT j.code, j.name, '
18 'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
19 'FROM account_move_line l '
20 'LEFT JOIN account_move am ON (l.move_id=am.id) '
21 'LEFT JOIN account_journal j ON (l.journal_id=j.id) '
22 'LEFT JOIN res_currency c on (l.currency_id=c.id)'
23 'WHERE am.state IN %s AND l.period_id=%s AND l.journal_id IN %s ' + self.query_get_clause + ' '
24- 'GROUP BY j.id, j.code, j.name, l.amount_currency, c.symbol, l.currency_id ',
25+ 'GROUP BY j.id, j.code, j.name ',
26 (tuple(move_state), period_id, tuple(self.journal_ids)))
27+ else:
28+ self.cr.execute('SELECT j.code, j.name, COALESCE(SUM(l.amount_currency),0.00) as amount_currency,c.symbol AS currency_code,l.currency_id, '
29+ 'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
30+ 'FROM account_move_line l '
31+ 'LEFT JOIN account_move am ON (l.move_id=am.id) '
32+ 'LEFT JOIN account_journal j ON (l.journal_id=j.id) '
33+ 'LEFT JOIN res_currency c on (l.currency_id=c.id)'
34+ 'WHERE am.state IN %s AND l.period_id=%s AND l.journal_id IN %s ' + self.query_get_clause + ' '
35+ 'GROUP BY j.id, j.code, j.name, COALESCE(l.amount_currency,0.00), c.symbol, l.currency_id ',
36+ (tuple(move_state), period_id, tuple(self.journal_ids)))
37 return self.cr.dictfetchall()
38
39 def _set_get_account_currency_code(self, account_id):
40
41=== modified file 'account/report/account_general_journal.rml'
42--- account/report/account_general_journal.rml 2011-01-14 00:11:01 +0000
43+++ account/report/account_general_journal.rml 2011-09-15 16:34:28 +0000
44@@ -342,7 +342,7 @@
45 </tr>
46 </blockTable>
47 <section>
48- <para style="Standard">[[ repeatIn(lines(o.id),'line')]]</para>
49+ <para style="Standard">[[ repeatIn(lines(o.id, data['form']['amount_currency']),'line')]]</para>
50 <blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Detail">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
51 <tr>
52 <td>
53@@ -364,7 +364,7 @@
54 </blockTable>
55 </section>
56 <section>
57- <para style="Standard">[[ repeatIn(lines(o.id),'line')]]</para>
58+ <para style="Standard">[[ repeatIn(lines(o.id, data['form']['amount_currency']),'line')]]</para>
59 <blockTable colWidths="100.0,100.0,73.0,80.0,80.0,80.0" style="Table_Journal_Detail">[[ display_currency(data) or removeParentNode('blockTable') ]]
60 <tr>
61 <td><para style="terp_default_9">[[ line['code'] ]]</para></td>
62
63=== modified file 'account/report/account_general_journal.sxw'
64Binary files account/report/account_general_journal.sxw 2011-01-14 00:11:01 +0000 and account/report/account_general_journal.sxw 2011-09-15 16:34:28 +0000 differ