Merge lp:~camptocamp/account-financial-report/7.0-add-ref-in-open-invoice-jge into lp:~account-report-core-editor/account-financial-report/7.0

Proposed by Joël Grand-Guillaume @ camptocamp
Status: Merged
Merged at revision: 84
Proposed branch: lp:~camptocamp/account-financial-report/7.0-add-ref-in-open-invoice-jge
Merge into: lp:~account-report-core-editor/account-financial-report/7.0
Diff against target: 126 lines (+18/-38)
5 files modified
account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html (+6/-2)
account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html (+5/-1)
account_financial_report_webkit/report_menus.xml (+7/-4)
account_financial_report_webkit/wizard/print_journal.py (+0/-20)
account_financial_report_webkit/wizard/print_journal_view.xml (+0/-11)
To merge this branch: bzr merge lp:~camptocamp/account-financial-report/7.0-add-ref-in-open-invoice-jge
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp code review Approve
Yannick Vaucher @ Camptocamp code review, no tests Approve
Review via email: mp+204890@code.launchpad.net

Description of the change

Hi,

I just added the ref of the move line in the open invoice report. This seems very useful to find to which context an open invoice belong.

Regards

To post a comment you must log in.
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

LGTM (only rev 66 will be applied)

review: Approve (code review, no tests)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

I checked and Yannick is right. The rev66 has been merged already. A bit weird to see it in the diff though.

Thanks, LGTM

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html'
2--- account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html 2013-11-21 15:55:29 +0000
3+++ account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html 2014-02-05 11:57:01 +0000
4@@ -36,9 +36,11 @@
5 ## move
6 <div class="act_as_cell" style="width: 70px;">${_('Entry')}</div>
7 ## journal
8- <div class="act_as_cell" style="width: 70px;">${_('Journal')}</div>
9+ <div class="act_as_cell" style="width: 50px;">${_('Journal')}</div>
10+ ## move reference
11+ <div class="act_as_cell" style="width: 75px;">${_('Ref.')}</div>
12 ## label
13- <div class="act_as_cell" style="width: 255px;">${_('Label')}</div>
14+ <div class="act_as_cell" style="width: 200px;">${_('Label')}</div>
15 ## reconcile
16 <div class="act_as_cell" style="width: 80px;">${_('Rec.')}</div>
17 ## maturity
18@@ -83,6 +85,8 @@
19 <div class="act_as_cell">${line.get('move_name') or ''}</div>
20 ## journal
21 <div class="act_as_cell">${line.get('jcode') or ''}</div>
22+ ## move reference
23+ <div class="act_as_cell">${line.get('lref') or ''}</div>
24 ## label
25 <div class="act_as_cell">${label}</div>
26 ## reconcile
27
28=== modified file 'account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html'
29--- account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html 2013-11-21 15:55:29 +0000
30+++ account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html 2014-02-05 11:57:01 +0000
31@@ -33,9 +33,11 @@
32 ## move
33 <div class="act_as_cell" style="width: 70px;">${_('Entry')}</div>
34 ## journal
35- <div class="act_as_cell" style="width: 70px;">${_('Journal')}</div>
36+ <div class="act_as_cell" style="width: 50px;">${_('Journal')}</div>
37 ## partner
38 <div class="act_as_cell" style="width: 60px;">${_('Partner')}</div>
39+ ## move reference
40+ <div class="act_as_cell" style="width: 75px;">${_('Ref.')}</div>
41 ## label
42 <div class="act_as_cell" style="width: 255px;">${_('Label')}</div>
43 ## reconcile
44@@ -86,6 +88,8 @@
45 <div class="act_as_cell">${line.get('jcode') or ''}</div>
46 ## partner
47 <div class="act_as_cell overflow_ellipsis">${line.get('partner_name') or ''}</div>
48+ ## move reference
49+ <div class="act_as_cell">${line.get('lref') or ''}</div>
50 ## label
51 <div class="act_as_cell">${label}</div>
52 ## reconcile
53
54=== modified file 'account_financial_report_webkit/report_menus.xml'
55--- account_financial_report_webkit/report_menus.xml 2013-09-12 20:53:27 +0000
56+++ account_financial_report_webkit/report_menus.xml 2014-02-05 11:57:01 +0000
57@@ -26,10 +26,13 @@
58 parent="account.menu_journals_report" action="action_account_print_journal_menu_webkit"
59 groups="account.group_account_manager,account.group_account_user" id="account.menu_account_print_journal"/>
60
61- <menuitem icon="STOCK_PRINT" name="Sale/Purchase Journals"
62- parent="account.menu_journals_report" action="action_account_print_journal_sale_purchase_menu_webkit"
63- groups="account.group_account_manager,account.group_account_user" id="account.menu_account_print_sale_purchase_journal"
64- sequence="1"/>
65+ <!--
66+ Hide Sale / Purchase Journals menu, replaced by a unique
67+ "Journals" menu
68+ -->
69+ <record id="account.menu_account_print_sale_purchase_journal" model="ir.ui.menu">
70+ <field name="groups">base.group_no_one</field>
71+ </record>
72
73 </data>
74 </openerp>
75
76=== modified file 'account_financial_report_webkit/wizard/print_journal.py'
77--- account_financial_report_webkit/wizard/print_journal.py 2013-11-03 12:55:27 +0000
78+++ account_financial_report_webkit/wizard/print_journal.py 2014-02-05 11:57:01 +0000
79@@ -105,26 +105,6 @@
80 res['value'] = {'period_from': start_period, 'period_to': end_period, 'date_from': False, 'date_to': False}
81 return res
82
83- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
84- '''
85- used to set the domain on 'journal_ids' field: we exclude or only propose the journals of type
86- sale/purchase (+refund) accordingly to the presence of the key 'sale_purchase_only' in the context.
87- '''
88- if context is None:
89- context = {}
90- res = super(AccountReportPrintJournalWizard, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
91- doc = etree.XML(res['arch'])
92-
93- if context.get('sale_purchase_only'):
94- domain = "[('type', 'in', ('sale','purchase','sale_refund','purchase_refund'))]"
95- else:
96- domain = "[('type', 'not in', ('sale','purchase','sale_refund','purchase_refund'))]"
97- nodes = doc.xpath("//field[@name='journal_ids']")
98- for node in nodes:
99- node.set('domain', domain)
100- res['arch'] = etree.tostring(doc)
101- return res
102-
103 def _print_report(self, cursor, uid, ids, data, context=None):
104 context = context or {}
105 # we update form with display account value
106
107=== modified file 'account_financial_report_webkit/wizard/print_journal_view.xml'
108--- account_financial_report_webkit/wizard/print_journal_view.xml 2013-09-12 20:53:27 +0000
109+++ account_financial_report_webkit/wizard/print_journal_view.xml 2014-02-05 11:57:01 +0000
110@@ -86,16 +86,5 @@
111 <field name="model">account.journal.period</field>
112 </record>
113
114- <record id="action_account_print_journal_sale_purchase_menu_webkit" model="ir.actions.act_window">
115- <field name="name">Journals</field>
116- <field name="type">ir.actions.act_window</field>
117- <field name="res_model">print.journal.webkit</field>
118- <field name="view_type">form</field>
119- <field name="view_mode">form</field>
120- <field name="view_id" ref="account_report_print_journal_view_webkit"/>
121- <field name="context">{'sale_purchase_only':True}</field>
122- <field name="target">new</field>
123- </record>
124-
125 </data>
126 </openerp>

Subscribers

People subscribed via source and target branches

to status/vote changes: