Merge lp:~juan-munoz-clearcorp/openerp-ccorp-addons/voucher_check_feature into lp:openerp-ccorp-addons/6.1

Proposed by Juan Felipe Muñoz Ramos
Status: Merged
Merged at revision: 550
Proposed branch: lp:~juan-munoz-clearcorp/openerp-ccorp-addons/voucher_check_feature
Merge into: lp:openerp-ccorp-addons/6.1
Diff against target: 139 lines (+56/-10)
3 files modified
account_voucher_check/account_voucher_check_view.xml (+31/-1)
account_voucher_check/report/check_voucher.mako (+13/-9)
account_voucher_check/report/check_voucher.py (+12/-0)
To merge this branch: bzr merge lp:~juan-munoz-clearcorp/openerp-ccorp-addons/voucher_check_feature
Reviewer Review Type Date Requested Status
ClearCorp development team Pending
Review via email: mp+104486@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_voucher_check/account_voucher_check_view.xml'
2--- account_voucher_check/account_voucher_check_view.xml 2012-01-04 20:11:15 +0000
3+++ account_voucher_check/account_voucher_check_view.xml 2012-05-03 05:26:22 +0000
4@@ -44,7 +44,37 @@
5 <field name="view_id" ref="account_voucher.view_vendor_payment_form"/>
6 <field name="act_window_id" ref="action_check_payment"/>
7 </record>
8-
9+
10+ <record model = "ir.ui.view" id = "rent_invoice_form_view">
11+ <field name = "name">check.invoice.supplier.form</field>
12+ <field name = "model">account.invoice</field>
13+ <field name = "type">form</field>
14+ <field name = "inherit_id" ref = "account.invoice_supplier_form"/>
15+ <field name = "arch" type="xml">
16+ <data>
17+ <field name="date_invoice" position="before">
18+ <field name = "name" />
19+ </field>
20+ </data>
21+ </field>
22+ </record>
23+
24+<!--
25+ <record model = "ir.ui.view" id = "rent_invoice_tree_view">
26+ <field name = "name">check.invoice.supplier.tree</field>
27+ <field name = "model">account.invoice</field>
28+ <field name = "type">tree</field>
29+ <field name = "inherit_id" ref = "account.invoice_tree"/>
30+ <field name = "arch" type="xml">
31+ <data>
32+ <field name="company_id" position="after">
33+ <field name = "name" />
34+ </field>
35+ </data>
36+ </field>
37+ </record>
38+-->
39+
40
41 <menuitem action="action_check_payment" icon="STOCK_JUSTIFY_FILL" sequence="12"
42 id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
43
44=== modified file 'account_voucher_check/report/check_voucher.mako'
45--- account_voucher_check/report/check_voucher.mako 2012-04-16 18:01:54 +0000
46+++ account_voucher_check/report/check_voucher.mako 2012-05-03 05:26:22 +0000
47@@ -38,11 +38,15 @@
48 <div id = "document_desc">
49 <p>&nbsp;</p>
50 <div class = "detail_desc">
51- %if check.narration:
52- <span class = "text_font">${check.narration or ''|entity}</span>
53- %else:
54- <span>&nbsp;</span>
55+ %if check.name:
56+ <span class = "text_font">${check.name or ''|entity}</span>
57+ %endif
58+ %for line in check.move_ids :
59+ %if line.invoice.name:
60+ <span class = "text_font">${ line.invoice.name or ''|entity}</span>
61+ <span>&nbsp;</span>
62 %endif
63+ %endfor
64 </div>
65 </div>
66 </br>
67@@ -50,7 +54,7 @@
68 <table width = "100%" id = "table_account" cellpadding = "0" cellspacing = "0">
69 <thead><tr><th>&nbsp;</th><th>&nbsp;</th><th>&nbsp;</th><th>&nbsp;</th></tr></thead>
70 <tbody>
71- %for line in check.line_cr_ids :
72+ %for line in check.move_ids :
73 <tr class = "account_line">
74 <td valign="top" class = "code_cell">
75 ${line.account_id.code}
76@@ -59,22 +63,22 @@
77 ${line.account_id.name}
78 </td>
79 <td valign="top" class = "amount_acc">
80- ${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}
81+ ${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.debit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}
82 </td>
83 <td valign="top" class = "amount_acc">
84- ${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}
85+ ${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}
86 </td>
87 </tr>
88 %endfor
89 %for line in check.line_dr_ids :
90- <tr class = "account_line">
91+ <!--tr class = "account_line">
92 <td valign="top" class = "code_cell">${line.account_id.code}</td>
93 <td valign="top" class = "account_id">
94 ${line.account_id.name}
95 </td>
96 <td valign="top" class = "amount_acc">${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}</td>
97 <td valign="top" class = "amount_acc">${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}</td>
98- </tr>
99+ </tr-->
100 %endfor
101 </tbody>
102 </table>
103
104=== modified file 'account_voucher_check/report/check_voucher.py'
105--- account_voucher_check/report/check_voucher.py 2012-04-16 18:01:54 +0000
106+++ account_voucher_check/report/check_voucher.py 2012-05-03 05:26:22 +0000
107@@ -4,6 +4,7 @@
108 # check_voucher.py
109 # account_voucher_check
110 # First author: Mag Guevara <mag.guevara@clearcorp.co.cr> (ClearCorp S.A.)
111+# Second author: Juan Felipe Muñoz <juan.munoz@clearcorp.co.cr> (ClearCorp S.A.)
112 # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
113 #
114 # Redistribution and use in source and binary forms, with or without modification, are
115@@ -49,6 +50,7 @@
116 'uid' : uid,
117 'get_text':self.get_text,
118 'count_text':self.count_text,
119+ 'get_concept':self.get_concept,
120 })
121 self.context = context
122 self._node = None
123@@ -79,6 +81,16 @@
124 res = len(self.get_text(amount,currency,lang,company_id))
125 return res
126
127+
128+ def get_concept(self,moves):
129+ res = 'error'
130+ for move in moves:
131+ move_line = self.pool.get('acccount.move.line').browse(self.cr,self.uid,move.id)
132+ invoice = self.pool.get('account.invoice').browse(self.cr,self.uid,move_line.invoice)
133+ if invoice.name != ''or invoice.name != False:
134+ res = invoice.name
135+ return res
136+
137 report_sxw.report_sxw(
138 'report.check.voucher.layout_ccorp',
139 'account.voucher',

Subscribers

People subscribed via source and target branches